I created an ObjectDBX for a custom object. When the DWG is opened in Navisworks, the custom geometry is not shown and [View]-->[Scene Statistics] reports an error:
Missing object enabler for application "MyCustomerObjectApp……”
How can I make my OE to work with Navisworks?
Basically, Navisworks uses RealDWG to read DWG files. The same mechanism for AutoCAD or RealDWG applaications’ demand loading works for Navisworks. Please take a look at [Demand Loading on Detection of Custom Objects] section of “ObjectARX Developer Guide” about how to register your OE for demand loading.
Assuming that your custom Object Enabler (OE) is correctly registered, there are a few points that you may want to be aware of:
· Navisworks cach (.nwc) file - when a dwg file is opened, Navisworks creates a cached file with the same file name with the extension .nwc by default. If you try to open a dwg file that has nwc is present in the same folder and nwc is younger than dwg file, navisworks will go straight to nwc. If you set the demand load after nwc is created, you will need to delete the nwc file to make sure navisworks will open the dwg again.
· Missing dependency - Another possibility of causing the failure of demand load is missing dlls that dbx is depending on. You can check it using a tool like depends or Dependency Walker.
· [Scene Statistics] – [View] >> [Scene Statistic] dialog shows you if there is missing dll or proxy objects in the dwg file. You may want to check here if the demand loading is really failing or not.
· Rendering – Navisworks uses RealDWG to open the drawings. However, they then convert it to their own proprietary format which they then render themselves. Resulting render appearance may not be exactly the same as AutoCAD. e.g. ObjectARX SDK sample polysamp defines an entity using shell geometry. In AutoCAD, the entity is not rendered, while in Navisworks, it renders it.
Here is more detailed description of how to define your OE.
1. Some of the built-in OEs used by Navisworks locate in <Navisworks Installation path>\lcdbx****, where **** means the corresponding version of DBX. e.g. AutoCAD 2010 DBX is put into <Navisworks Installation path>\lcdbx2010 (Fig. 1). Once your OE is available, you could put your OE under this path.
Figure 1: OE path
2. Registry: some options to let Navisworks know your OE
1) HKLM (or HKCU)\SOFTWARE\Autodesk\ObjectDBX\R18.0\Applications (Fig. 2)
The OE under this registry will be used for all Autodesk products.
Figure 2: registry of HKCU/HKLM ObjectDBX section
2) HKLM (or HKCU)\SOFTWARE\Autodesk\NavisWorks Manage\7.0\ObjectDBX\R***. Where *** means the corresponding version of DBX. e.g. AutoCAD 2010 corresponds to R18.0.
The OE under this registry is only used for Navisworks.
The key name must be the argument “APP” in ACRX_DXF_DEFINE_MEMBERS where the Custom Entity is defined. This name may not be the same as the DBX dll name. e.g. in the attached sample, The APP name is NWOEDBXAPP, while the DBX name is NWOEDBX. As shown in Fig. 3.
Figure 3: registry of HKCU/HKLM Host Application section
Location and order of search for demand loading setting is as follows:
· HKCU Host Application section
· HKLM Host Application section
· HKCU ObjectDBX section
· HKLM ObjectDBX section
3) HKLM (or HKCU)\SOFTWARE\Autodesk\Navisworks Manage\7.0\ObjectDBX Modules (Fig. 4)
The OE under this registry is only used for Navisworks, too. You can just create a string to specify the OE path. It forces to load all the time (as oppose to demand loading). This may be a tip while troubleshooting.
Figure 4: Registry of ObjectDBX Modules
If any of them contains the correct OE, it will successfully identify your custom entity. Otherwise, it will fail to know it and pop out the error: “Missing object enabler for application.”
3. In [Tools] >> [Global Options…] >> [File Readers] >> [DWG/DXF/SAT] >> [DWG Loader Version], please ensure your [DWG Loader Version] is set to 2010 if you are opening a DWG of AutoCAD 2010. (Figure 5)
Figure 5: DWG Loader Version