It is possible to add fields to the existing object data in a dwg file, with .net. Please suggest the way to add field to existing object data, if it is possible.
Yes, it is possible using managed Map API:
Look into Autodesk.Gis.Map.ObjectData.FieldDefinitions.Add()
In case you have not used managed MAp API:
1. In an Acad plug-in DLL project, set reference to ManagedMapApl.dll;
2. Write code to identify the target object data table
3. Create a FieldDefinition object;
4. Call Table.FieldDefinitions.AddColumn(myField)
5 If necessary, find all entities that has the target table record attached, and set value for the newly added field.
I've tried adding new field definitions to an existing table but it does not work. While debugging the code runs well, I don't get exceptions but the new field definition is not added.
Do I need to update or commit something after this?
A, found the solution. After adding new definitions you need to update the tables collection.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.