Navisworks will convert some properties from original format of CAD file such as DWG. But for a custom entity, it requires some additional work to expose the properties.
The basic principle anyone adding properties to AutoCAD entities should follow is that if they can get it to appear in vanilla AutoCAD Property Manager via the usual routes of object enablers (OE), then it should work in Navisworks. In another word, if we want to see the properties in multiple DWG readers such as Navisworks, the corresponding OE exists and the properties are packaged by a COM wrapper. For custom entities, it is fine because the OE is designed by yourself. For native AutoCAD entities or any 3rd parties’ OE, we cannot do anything with them. So, although you can use Dynamic Properties to add additional properties to native AutoCAD entity in AutoCAD context, there is no way if you want to see the additional properties in Navisworks.
When the DWG reader launches, it will load the available COM wrapper in the registry:
** is the version number. e.g. AutoCAD 2011 will load from the key R18.1.
From the COM wrapper, the DWG reader knows the properties which can be loaded.
Following are the steps to create the custom entity and COM wrapper for the custom entity. The sample is introduced with VS2008 + SP1 and tested with AutoCAD 2011. We also provide a sample project of VS2010 which can work with AutoCAD 2013. The steps are similar to the project of VS 2008 + SP1.
1. First, create the custom entity project using the ObjectARX Wizard
2. Select 'ObjectDBX (custom object definition)' as the Project Type. Better select the MFC support.
3. In the COM options, tick COM Server. Make sure 'Use ATL' and 'Use ATL Extensions for Custom Objects' boxes are checked, and press Finish.
4. Add necessary head file folder and library file folder of Object ARX. Build to make sure there are no errors.
5. Use the wizard to create the custom entity. Right click the project „NW_AutoCAD_OE_Sample‟ from the solution explorer and select Add Class button. Then select “ObjectDBX Object Wizard” from the available list.
6. Input the custom entity name and select OK to accept the entries, and return to the ARX ClassWizard.
(to be continued)