DataExtraction

DataExtraction

T.Ko.
Explorer Explorer
481 Views
2 Replies
Message 1 of 3

DataExtraction

T.Ko.
Explorer
Explorer

Hello,

 

I need an XML export of this DWG (see attached). I am aware that it is not a common request, normally we only supply GML. Both files look similar but that's besides my point. The end goal is unknown to me, I only know that the XML is needed.

 

Now i have found some scripts on two sites.

https://through-the-interface.typepad.com/through_the_interface/2008/04/extracting-data.html

and

https://adndevblog.typepad.com/autocad/2016/10/extracting-xml-data-of-selected-objects-from-current-...

 

The first link is an old script for AutoCad 2009, the second link is an updated version made in 2016.

I'm using Autocad 2021 and its loads succesfully but right after that (Command: ; error: bad function: "extd") appears.

Can somebody help me or explain to me what is going wrong with this code.

 

I'm not entirely new to using VLISP, but never written my own code.

Most important for me is that X, Y, and some general stuff are exported.

 

Or would you suggest to use command DataExtraction, open in Excel and export frome there with a selfmade XML scheme?

 

Thanks in advance.

 

0 Likes
Accepted solutions (2)
482 Views
2 Replies
Replies (2)
Message 2 of 3

devitg
Advisor
Advisor
Accepted solution

@T.Ko. First at all. both routine run under .NET, not LISP 

So you would get better help at the .NET forum 

 

.NET forum 

 

The data extraction and then convert XLS to HTLM,  seem to be more affordable.

Also it can be made as a CSV file, by lisp, if DataExtraction do not fulfill yours's need,   then open in XLS, and do conversion 

 

 

 

 

0 Likes
Message 3 of 3

T.Ko.
Explorer
Explorer
Accepted solution

Due to a combination of factors, I made this too difficult.

Like I already said we normally supply GML, and in here lies the solution.

With MapExport in C3D you're able to write a file with .xml behind the filename, which results in an XML document.

Thats what i needed.

 

Apart from that. Your reply helped a lot in the end. I was able to find the right examples to make the code work with Visual Studio.

0 Likes