Hi,
I have a some data that appears to be stored in XData.
In the interface this appears in the properties tab as
Size: 6"
Tag: RO-1-1-FLO
Using AutoCAD's internal extract, the labels for those variable come out as Size and TAG1.
How can I find the labels using .Net ?
Many thanks!
(I can extract the data that's stored within the XDATA using the below)
ResultBuffer acResBuf = acEnt.XData; if (acResBuf != null) { TypedValue[] rvArr = acResBuf.AsArray(); foreach (TypedValue tv in rvArr) {
//string sField = //Label for associated Value string sValue = tv.Value.ToString(); } }
XData doesn't appear in the properties palette unless there's an 3rd-party application installed (or a component of an AutoCAD vertical) that makes that happen (using the appropriate APIs). Vanilla AutoCAD itself doesn't know what to do with XData, so it isn't going to show it in the Properties Palette.
Given that, the xdata and their display names are defined by the custom application (or vertical), and may not be stored anywhere in the DWG file that would allow you to access them.
So you have to consult with the application developer about that.
@Anonymous wrote:Hi,
I have a some data that appears to be stored in XData.
In the interface this appears in the properties tab as
Size: 6"
Tag: RO-1-1-FLO
Using AutoCAD's internal extract, the labels for those variable come out as Size and TAG1.
How can I find the labels using .Net ?
Many thanks!
(I can extract the data that's stored within the XDATA using the below)ResultBuffer acResBuf = acEnt.XData; if (acResBuf != null) { TypedValue[] rvArr = acResBuf.AsArray(); foreach (TypedValue tv in rvArr) {
//string sField = //Label for associated Value string sValue = tv.Value.ToString(); } }
Turned out I was pulling out the wrong data (although the information was stored in Xdata, that was a repeat of data stored else where... and that was what I was seeing on the properties tab in autocad (it was a standard installation of the software.
Thanks for your help though! got me to the right solution in the end 😉
Can't find what you're looking for? Ask the community or share your knowledge.