PDA

View Full Version : Reading the CUI using VB.Net



bweir
2007-04-24, 10:32 PM
I'd like to create a standalone program to read my CUI files. I'd like to be able to list the icons used from each file and also check for Lisp files being loaded either from the Lisp section of the CUI or from the Macro Code for a command/button. I know that .Net has technology to read XML files to an object but I don't know what object type to use for the CUI files. Is this a good way to approach this? What Class should be used for the CUI file?

Snippet I found in the VS...


Dim reader As New XmlSerializer(GetType(CUIClass))
Dim file As New StreamReader(FilePath)
Dim fileData As CUIClass
fileData = CType(reader.Deserialize(file), CUIClass)

sinc
2007-04-25, 12:35 AM
I think you are looking for the stuff in the Autodesk.AutoCAD.Customization namespace.

Have you loaded the ObjectARX documentation?

bweir
2007-04-25, 02:37 PM
I think your right. I think I need to load another resource into my project. Any ideas? I'm looking through the docs at the moment, haven't see what resource to use yet.

bweir
2007-04-25, 02:45 PM
Think I found the required resource. I added the AcCui.dll into my References and now I have Autodesk.AutoCAD.Customization exposed.