Page 1 of 1

Support for ExtendedData

Posted: 25 Apr 2018, 12:39
by nthangaraj
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

Re: Support for ExtendedData

Posted: 25 Apr 2018, 17:20
by support
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

Re: Support for ExtendedData

Posted: 26 Apr 2018, 13:37
by nthangaraj
Can you please let us know when can we expect this functionality? Any Tentative date.

Thanks,
Thangaraj N

Re: Support for ExtendedData

Posted: 27 Apr 2018, 19:25
by support
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

Re: Support for ExtendedData

Posted: 12 Jun 2018, 07:52
by nthangaraj
is this scheduled to get release in June?

Thanks
Thangaraj N

Re: Support for ExtendedData

Posted: 14 Jun 2018, 14:04
by support
Hello,

The new version is still at the development stage, so for now we cannot give you any information about the release date.

Mikhail

Re: Support for ExtendedData

Posted: 02 Jul 2018, 15:31
by nthangaraj
Do you have any update on this?

Thanks
Thangaraj N

Re: Support for ExtendedData

Posted: 02 Jul 2018, 17:20
by support
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

Re: Support for ExtendedData

Posted: 10 Sep 2018, 23:20
by support
Hello,

A new CAD .NET version which supports Extended Data has been released. You can find more information in our News section.

Mikhail

Re: Support for ExtendedData

Posted: 10 Jan 2023, 18:39
by dredgehqdev
Does the Editor support ExtendedData? I'd like to attach a name to an entity, such as a polyline.

Re: Support for ExtendedData

Posted: 11 Jan 2023, 12:08
by support
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.

Re: Support for ExtendedData

Posted: 03 Feb 2023, 16:20
by GeoLaci
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

Re: Support for ExtendedData

Posted: 06 Feb 2023, 14:49
by support
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.

Re: Support for ExtendedData

Posted: 08 Feb 2023, 12:17
by support
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.