Are there any .natvis Vizualizers for ObjectARX available?
http://blogs.msdn.com/b/vcblog/archive/2012/07/12/10329460.aspx
--Thomas
Interesting feature but, unfortunately, we don't have the XML files.
Interesting turn of events: after talking about that with AutoCAD engineer team, we started a small project on Github with this: https://github.com/ADN-DevTech/ObjectARX-Natvis
This sample contains some classes. We hope to improve, but now the community can also contribute! 🙂
Hi Augusto
Thats nice!
I just had a look at <Type Name="resbuf">
Why are restype==1 ... 5 mapped to rreal?
According to Autodesk techpubs the DXF code range 0..9 represent strings.
9 should be strings as well, 10, 16 and 17 should be 3D points.
--Thomas
At the "\ObjectARX 2015\docs\arxdev.chm" file, under "Autodesk ObjectARX for AutoCAD 2015: Developer Guide > Basic Interaction with AutoCAD > Basic Interaction with AutoCAD > ObjectARX Global Utility Functions > Variables, Types, and Values Defined in ObjectARX > Result Buffers and Type Codes", that's the table that I see:
Those are the RT codes which are used for resbufs that are used to spedify data types in lists for functions such as acedCmd. Resbufs also can hold dxf data which use dxf group codes as the type specifiers. Dxf group codes are in the range 0 - 1071.
The RT-codes 5000-5017 are mapped correctly in the acad.natvis file.
I still think that restype=1...17 entries are wrong and should be changed according to Autodesk techpub.
I have changed the <Type Name="resbuf"> section in my .natvis like this:
<Type Name="resbuf"> <DisplayString Condition="restype==5001">{resval.rreal}</DisplayString> <DisplayString Condition="restype==5002">{resval.rpoint[0]},{resval.rpoint[1]}</DisplayString> <DisplayString Condition="restype==5003">{resval.rint}</DisplayString> <DisplayString Condition="restype==5004">{resval.rreal}</DisplayString> <DisplayString Condition="restype==5005">{resval.rstring}</DisplayString> <DisplayString Condition="restype==5009">{resval.rpoint[0]},{resval.rpoint[1]},{resval.rpoint[2]}</DisplayString> <DisplayString Condition="restype==5010">{resval.rlong}</DisplayString> <DisplayString Condition="restype==5016">list-begin</DisplayString> <DisplayString Condition="restype==5017">list-end</DisplayString> <!--String--> <DisplayString Condition="(restype>=1) && (restype<=9)">{resval.rstring}</DisplayString> <DisplayString Condition="(restype==100) || (restype==102) || (restype==105)">{resval.rstring}</DisplayString> <DisplayString Condition="(restype>=300) && (restype<=309)">{resval.rstring}</DisplayString> <DisplayString Condition="(restype>=310) && (restype<=319)">{resval.rstring}</DisplayString> <DisplayString Condition="(restype>=320) && (restype<=329)">{resval.rstring}</DisplayString> <DisplayString Condition="(restype>=330) && (restype<=369)">{resval.rstring}</DisplayString> <DisplayString Condition="(restype==999)">{resval.rstring}</DisplayString> <DisplayString Condition="(restype>=1000) && (restype<=1009)">{resval.rstring}</DisplayString> <!--Double--> <DisplayString Condition="(restype>=140) && (restype<=147)">{resval.rreal} rreal</DisplayString> <!--1011-1013 are Double in DXF but 3D-points in XData. Debug display picks the first matching condition--> <DisplayString Condition="restype==1011">{resval.rpoint[0]} [,{resval.rpoint[1]},{resval.rpoint[2]}] if XDATA</DisplayString> <DisplayString Condition="restype==1012">{resval.rpoint[0]} [,{resval.rpoint[1]},{resval.rpoint[2]}] if XDATA</DisplayString> <DisplayString Condition="restype==1013">{resval.rpoint[0]} [,{resval.rpoint[1]},{resval.rpoint[2]}] if XDATA</DisplayString> <DisplayString Condition="(restype>=1010) && (restype<=1059)">{resval.rreal} rreal</DisplayString> <!--3D point--> <DisplayString Condition="(restype>=10) && (restype<=59)">{resval.rpoint[0]},{resval.rpoint[1]},{resval.rpoint[2]}</DisplayString> <!--8bit int--> <DisplayString Condition="(restype>=280) && (restype<=289)">{resval.rint} 8-bit rint</DisplayString> <!--16bit int--> <DisplayString Condition="(restype>=60) && (restype<=79)">{resval.rint} rint</DisplayString> <DisplayString Condition="(restype>=170) && (restype<=175)">{resval.rint} rint</DisplayString> <DisplayString Condition="(restype>=1060) && (restype<=1070)">{resval.rint} rint</DisplayString> <!--32bit int--> <DisplayString Condition="(restype>=90) && (restype<=99)">{resval.rlong} rlong</DisplayString> <DisplayString Condition="(restype==1071)">{resval.rlong} rlong</DisplayString> <Expand> <Item Name="rbnext">rbnext</Item> <Item Name="restype">restype</Item> </Expand> </Type>
Note that you have to use XML style for the comparison operators >, < and && (> < and &&).
Also note that 1011-1013 have type double in DXF but 3D-point in XDATA.
I also swapped rbnext and restype in the <Expand> section to avoid extra lines when expanding an rbnext. Now it looks like this in the debugger:
-rb1 0x00de5858 L"Hello" resbuf -rbnext 0x005dfd44 123.45600000000000 rreal resbuf * -rbnext 0x005dfd1c 11.1 [,22.2, 33.3] if XDATA resbuf * -rbnext 0x005dfcf4 123456789 rlong resbuf * -rbnext 0x005dfccc 0x00de58f8 L"Bye!" resbuf * +rbnext 0x00000000 resbuf *
Thanks for pointing that out about codes 1, 2, etc. The original rules were taking into account an internal runtime context, where sometimes those codes are equivalent to the ARX/Lisp function codes 5001, 5002, etc. But that isn't much use to you, of course, and it makes much more sense to assume an API context.
So we've updated the file with what we think are the correct group code ranges for DXF and XData resbufs. Expanding the rbnext field first was also a good suggestion.
The new (v1.0e) natvis file is posted on Kean's blog as well as on GitHub ADN-DevTech