Adding more Third Party Importers via PTC Granite 'gPlugs' Mechanism
Okino evaluated several new emerging CAD translation technologies and decided to license and fully integrate the "Granite Interoperability Kernel" from PTC Corp (makers of Pro/Engineer and other high-end CAD products). The immediate benefit of doing this for Okino customers was the quick addition of the most requested solids-based (BREP) CAD importers to Okino's PolyTrans & NuGraf products: ACIS® SAT®, IGES (solids), Parasolid®, ProE® native parts & assemblies, Pro/DESKTOP®, STEP & VDA-FS.
However, there was one other "hidden" and long term benefit to Okino customers, the Granite "gPlugs" back door mechanism. In the simplest of terms, this allows Okino customers (who own the Granite/Pack add-on license) to
download additional free
CAD importer modules from the PTC WEB site to expand upon the number of importers already provided by the Granite/Pack license.
This is best illustrated by the following diagram. The Alias .wire, IronCAD .ics and Raindrop Geomagic .wrp gPlug importer modules are downloaded from the PTC WEB site and installed in the Okino "vcplugins\gplugs" directory. After the addition of some cursory ".rti" files to the Okino "vcplugin" directory, new menus items will appear in the Import files list for these additional importers. Invoking any one of these importers will cause the normal Okino Granite importer module to be executed, which itself will then execute the custom gPlug importer module. To the Okino software user, it will just appear that 3 new importer plug-ins have been added to the software. In addition, this works equally well with the special native plug-in version of PolyTrans for 3DS MAX (PolyTrans-for-MAX) and Maya (PolyTrans-for-Maya).
How to Download and Install the 'gPlug' Modules from the PTC WEB Site
This section will outline the fairly simple steps required to download and install the free gPlug CAD importer modules from the PTC WEB site. Please note that you need to have a valid Granite/Pack add-on license for Okino software.
First, visit the main PTC gPlugs home page. Scroll down to the "Download the Available gPlugs" section. Download the ZIP files listed in this section, but don't download the "Pro/DESKTOP" gPlug (that is included in Okino's Granite distribution).
Now, unzip the various files you downloaded into the "vcplugin\gplug" directory. The "vcplugin" directory is a sub-directory in the
main NuGraf or PolyTrans home directory. If the "gplug" directory does not exist then please create it first.
Download and unzip this file into the "vcplugin" directory (and not into the "vcplugin\gplug" directory). This will add additional "runtime information" files which will inform NuGraf or PolyTrans at boot-up stage that additional import file converters are available. These .rti files describe the name of the new importers, their file extensions, which technology will be used to handle them (imp_granite.dll in our cases) and their unique GUIDs. Please do not modify these .rti files.
Read the "Additional Important Installation Information" section below and perform the operations requested. For example, you need to self-register the IronCAD support DLLs before that importer will work.
Exit NuGraf or PolyTrans, PolyTrans-for-MAX, PolyTrans-for-Maya, etc. Re-enter the software. You should now see the new CAD converters listed in the import menu or list.
Execute the new importer. In particular, try importing from the Alias .wire file format. There is a sample ".wire" file which comes with their importer.
Wait a few minutes for the process to complete. In general this gPlug importer mechanism is slower than a normal import process due to the extra layers of complexity involved; for example, the Alias .wire file importer will itself spawn a stand-alone program to convert from the .wire file to a .g (Granite) file, after which point the Okino Granite importer will use the gPlug mechanism to import the .g file.
Additional Important Installation Information
This Okino tutorial in by no means an official document to describe the installation of third party gPlug modules. After you download each gPlug module from the PTC WEB site, please read the "readme.txt" file which comes with each ZIP file to see what steps are necessary to install the gPlug module.
In particular, the IronCAD .ics importer will require that you self-register their DLL modules. In general, this would require that you do the following:
Start up Explorer on your computer. Navigate to the NuGraf or PolyTrans "vcplugin\gplug" directory.
Right click on each of the 3d*.dll files (there should be at least 4 of them) and choose "Register DLL".
And that's it!
How To Fix a gPlug Module Which Won't Work
In general, for a gPlug module to work it needs to be able to find and dynamically link against two other PTC Granite DLL modules,
"granite20.dll" and "gpi20.dll" (or any subsequently newer versions such as granite30.dll). By default, these are installed in the home NuGraf or PolyTrans directory by all recent Okino installers. In the future new gPlug modules may require updated versions of these core Granite DLL modules, in which case you will have to contact Okino for an update.
But if all gPlug modules do not work then it means that they cannot find the "granite20.dll" and "gpi20.dll" files on your
machine. To do so, your global Microsoft Windows "PATH variable needs to be modified so that it has an entry pointing to the main NuGraf or PolyTrans home directory. You can check or modify it in this manner:
Go to the Windows control panel, double click on the "System" icon and follow these instructions:
Choose the "Environment" tab.
In the "System Variables" section click on the "Path" variable.
At the bottom of the dialog box place the cursor in the
"Value" type-in box and move the cursor all the way to the
end of the current path text.
Confirm that one of the entries in the "Path" environment variable
points to the main NuGraf or PolyTrans home directory. This is
typically "c:\program files\nugraf" or "c:\program files\polytrans". Note that there should only be a single reference to this directory in the list.
Press the "Set" button and then the 'OK" button on the dialog box.
Reboot your machine. You need to do this so that the PATH variable gets propagated throughout your machine.
Note that we have seen cases where the PATH variable is too long and Windows internally will ignore the entries added at the end of the PATH variable. We don't know what is the exact maximum length. If you feel the PATH variable is too long, then remove the redundant entries.
How to Write Your Own Okino '.rti' File For a New Third Party gPlug Module
Okino's software is made aware of new import and export converters through the use of ASCII ".rti" (run time information) files located in the "vcplugin" directory. Each file format should and does have its own .rti file. In the case of the PTC Granite-based importers, there are multiple files named imp_granite_*.dll; each defines a unique Granite-supported file format (ACIS® SAT®, IGES, Parasolid®, ProE®, Pro/DESKTOP®, STEP & VDA-FS) but also each points to the single "imp_granite.dll" module as the main handler which imports and parses those file formats.
If a third party developer creates and makes available a new gPlug module on the PTC WEB site, then a new Okino .rti file will need to be created and saved to the "vcplugin" directory. In general, this should remain the job of Okino programmers but nevertheless the info below will document the process on how to create a new .rti file.
For the sake of this example, let's assume the new gPlug importer is an "Okino .bdf file importer".
First, go to the vcplugin directory and copy the "imp_granite_alias_wire.rti" file to "imp_granite_okino_bdf.rti" (with the "okino_bdf" appropriately changed to the company and file format associated with the new gPlug module).
Edit the "imp_granite_okino_bdf.rti" file with Notepad.exe. The lines we need to change are these:
GUID = {5F8CDB78-3E11-4bee-9318-0539F57039AB}
Demo_Mode_Desc = "imports data in the Alias .wire file format"
Plugin_Descriptive_Name = "Alias .wire Files"
Menu_Description = "Alias .wire (via PTC Granite g-plugs)"
FileOpen_Filter_Spec = "Alias .wire Files (*.wire)|*.wire|"
Use "guidgen.exe" (available in Microsoft Visual Studio) to create a new GUID for the .rti file.
Edit the "Demo_Mode_Desc", "Plugin_Descriptive_Name" and "Menu_Description" entries appropriately.
Change the "FileOpen_Filter_Spec" entry as necessary, and modify the file extensions supported by the new gPlug (such as ".bdf" in our example).
And that's all there is to it. When NuGraf or PolyTrans is restarted, the new importer will appear in the File/Import list. Executing that importer should pop up a file selector showing the file filter defined in the "FileOpen_Filter_Spec" entry above. The associated gPlug will then be executed to import the data.
PTC, Granite and "gPlug" are trademarks or registered trademarks of Parametric Technology Corporation or its subsidiaries in the United States and in other countries.
The "Built on PTC Granite" Technology Logo is used under license from Parametric Technology Corporation, Needham, MA, USA. ACIS and SAT are registered trademarks of Spatial Corp. Parasolid is a registered trademark of UGS Corp.