I'm duplicating my thread here, but this one should focus on the .net aspects of this topic.
I'm using civil 3d 2014.
If one enters the "propertysetdefine" command or "stylemanager" command, a window pops up that lets you define properties for objects. You can then add these properties via the Extended Data tab of the Properties window.
I ultimately want to automate the process of entering this data once these properties exist, and also possibly adding the properties to begin with.
My searches have only gotten me to info about editing the civil 3d parts catalog, or stuff for ADA & MEP. I saw a nice article about being able to edit the Notes Property field which is in the extended data tab by default. But this will not suffice, due to client expectations.
Rick Jackson
Survey CAD Technician VI
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
It was suggested that I'm looking for exteded entity data, I found this code:
<CommandMethod("VXD")> _ Public Sub ViewXData() ' Get the current database and start a transaction Dim acCurDb As Autodesk.AutoCAD.DatabaseServices.Database acCurDb = Application.DocumentManager.MdiActiveDocument.Database Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument Dim appName As String = "MY_APP" Dim msgstr As String = "" Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() ' Request objects to be selected in the drawing area Dim acSSPrompt As PromptSelectionResult = acDoc.Editor.GetSelection() ' If the prompt status is OK, objects were selected If acSSPrompt.Status = PromptStatus.OK Then Dim acSSet As SelectionSet = acSSPrompt.Value ' Step through the objects in the selection set For Each acSSObj As SelectedObject In acSSet ' Open the selected object for read Dim acEnt As Entity = acTrans.GetObject(acSSObj.ObjectId, _ OpenMode.ForRead) ' Get the extended data attached to each object for MY_APP Dim rb As ResultBuffer = acEnt.GetXDataForApplication(appName) ' Make sure the Xdata is not empty If Not IsNothing(rb) Then ' Get the values in the xdata For Each typeVal As TypedValue In rb msgstr = msgstr & vbCrLf & typeVal.TypeCode.ToString() & ":" & typeVal.Value Next Else msgstr = "NONE" End If ' Display the values returned MsgBox(appName & " xdata on " & VarType(acEnt).ToString() & ":" & vbCrLf & msgstr) msgstr = "" Next End If ' Ends the transaction and ensures any changes made are ignored acTrans.Abort() ' Dispose of the transaction End Using End Sub
but this does not retrieve any properties that were created via propertsetdefine and assigned via the extended data tab of the properties window.
Looks like the propertyies you are looking for are Aec Dictionary objects. Here's a snip from the Object Browser for the AecBaseMgd.
Hope that gets you a starting point!
I'm curious as to how this will be (or is, if you are using it manually) used. What kind of information do you add to display there?
No, not the RXObject, that is the base AutoCAD object class. I was referring to the Dictuonary* objects. However, that isn't right anyway. If you add a reference to the AecPropDataMgd.dll, I think you will find everything in there you need. I'm looking now, but running out of time to do any testing.
I found some sample code over at theSwamp that should help:
http://www.theswamp.org/index.php?topic=37862.msg430653#msg430653
http://www.theswamp.org/index.php?topic=43114.msg510122#msg510122
http://www.theswamp.org/index.php?topic=40079.msg453458#msg453458
There are also a few references in the AutoCAD Architecture Customization forum: http://forums.autodesk.com/t5/AutoCAD-Architecture/bd-p/54
Good Luck!
Great, Thanks a lot.
I had seen these examples while searching, but since they were in architecture and/or MEP forums, and there was the whole Space object part, I continued to look elsewhere, without knowing that I was on the right track.