Discuss and ask questions about CAD .NET library.
Moderators: SDS, support, admin
-
nthangaraj
- Posts: 19
- Joined: 31 Aug 2017, 09:47
Post
by nthangaraj » 25 Apr 2018, 12:39
I wanted to know id CAD.NET support Extended Data for an Entity. If so please let me know how i can access it.
IvanCAD (
http://www.ivancad.com/) has that functionality.
Code: Select all
foreach (Ivan.DrawingEntity drawingEntity in objEntities)
{
if (drawingEntity.HasXData == true)
{
try
{
objXData = drawingEntity.ExtendedData[REGISTEREDAPPNAME];
}
catch (Exception)
{
continue;
}
ProcessLightweightPolyline((Ivan.LightweightPolyline)drawingEntity, objXData);
}
}
private void ProcessLightweightPolyline(Ivan.LightweightPolyline polyline, Ivan.RegAppExtendedData xdata)
{
string strXDataValue;
//
// extract the xdata
//
if (xdata.DataItems[0].DataType == STRINGTYPE)
{
strXDataValue = (string)xdata.DataItems[0].Value;
}
else
{
strXDataValue = "Error: wrong xdata data type";
}
m_objWriter.WriteLine("xdata: " + strXDataValue);
}
Thanks
Thangaraj N
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 25 Apr 2018, 17:20
Hello,
At the moment CAD .NET doesn't support Extended Data for an entity, this feature will be available in a new version of the library.
Mikhail
-
nthangaraj
- Posts: 19
- Joined: 31 Aug 2017, 09:47
Post
by nthangaraj » 26 Apr 2018, 13:37
Can you please let us know when can we expect this functionality? Any Tentative date.
Thanks,
Thangaraj N
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 27 Apr 2018, 19:25
Hello,
The new version release was initially planned for April 2018, but was postponed until the end of May or possibly June. Please follow our updates on the
news section.
Mikhail
-
nthangaraj
- Posts: 19
- Joined: 31 Aug 2017, 09:47
Post
by nthangaraj » 12 Jun 2018, 07:52
is this scheduled to get release in June?
Thanks
Thangaraj N
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 14 Jun 2018, 14:04
Hello,
The new version is still at the development stage, so for now we cannot give you any information about the release date.
Mikhail
-
nthangaraj
- Posts: 19
- Joined: 31 Aug 2017, 09:47
Post
by nthangaraj » 02 Jul 2018, 15:31
Do you have any update on this?
Thanks
Thangaraj N
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 02 Jul 2018, 17:20
Hello,
Development of the new version is not finished yet, so we had to postpone the release date again. Please follow our updates on the
news section.
Mikhail
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 10 Sep 2018, 23:20
Hello,
A new CAD .NET version which supports Extended Data has been released. You can find more information in our
News section.
Mikhail
-
dredgehqdev
- Posts: 5
- Joined: 19 Sep 2016, 19:51
Post
by dredgehqdev » 10 Jan 2023, 18:39
Does the Editor support ExtendedData? I'd like to attach a name to an entity, such as a polyline.
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 11 Jan 2023, 12:08
dredgehqdev wrote: ↑10 Jan 2023, 18:39
Does the Editor support ExtendedData? I'd like to attach a name to an entity, such as a polyline.
Hi,
CAD .NET supports adding ExtendedData. Please, have a look at the code example below:
Code: Select all
private void menuItem10_Click(object sender, EventArgs e)
{
if (cadImage == null) return;
var poly = cadImage.SelectedEntities[0] as CADPolyLine;
poly.ExtendedData.Add(new Xtome("testExtData"));
poly.ExtendedData[0].Records.Add(Xdata.CreateRecord(1000, "PolyLineName"));
poly.Loaded(cadImage.Converter);
}
Best wishes,
Catherine.
-
GeoLaci
- Posts: 1
- Joined: 03 Feb 2023, 16:08
Post
by GeoLaci » 03 Feb 2023, 16:20
Hi,
CAD .NET supports reading ExtendedData from DWG.
I use this code, but no extended data found.
I can see the extended data in AutoCAD.
string filename = "c:\\test.dwg";
CADImage image = CADImage.CreateImageByExtension(filename);
image.LoadFromFile(filename);
foreach( var entity in image.Converter.Entities )
{
foreach( var data in entity.ExtendedData )
{
}
}
THX
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 06 Feb 2023, 14:49
GeoLaci wrote: ↑03 Feb 2023, 16:20
Hi,
CAD .NET supports reading ExtendedData from DWG.
I use this code, but no extended data found.
I can see the extended data in AutoCAD.
string filename = "c:\\test.dwg";
CADImage image = CADImage.CreateImageByExtension(filename);
image.LoadFromFile(filename);
foreach( var entity in image.Converter.Entities )
{
foreach( var data in entity.ExtendedData )
{
}
}
THX
Hi,
well, CAD .NET supports ExtendedData, so it should be read. Anyway, could you send me your file where you don't find extended data at
support@cadsofttools.com, so I could examine the file?
Catherine.
-
support
- Posts: 3272
- Joined: 30 Mar 2005, 11:36
-
Contact:
Post
by support » 08 Feb 2023, 12:17
support wrote: ↑06 Feb 2023, 14:49
GeoLaci wrote: ↑03 Feb 2023, 16:20
Hi,
CAD .NET supports reading ExtendedData from DWG.
I use this code, but no extended data found.
I can see the extended data in AutoCAD.
string filename = "c:\\test.dwg";
CADImage image = CADImage.CreateImageByExtension(filename);
image.LoadFromFile(filename);
foreach( var entity in image.Converter.Entities )
{
foreach( var data in entity.ExtendedData )
{
}
}
THX
Hi,
well, CAD .NET supports ExtendedData, so it should be read. Anyway, could you send me your file where you don't find extended data at
support@cadsofttools.com, so I could examine the file?
Catherine.
Hi,
Thank you for the sent file.
Our libraries support AutoCAD files, but they may not read all the information from the files generated from other third-party programs, e.g. AutoCAD Map 3D.
Catherine.