- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @pedro.lopezMGBEC. Here is a link to the online help page about how to set up the property mapping from non-Inventor files to native Inventor files, when Importing them. It tells you two ways to access those settings manually, one of which seems to be like a standalone application that works with Inventor, that can be started through the Windows start menu, under your Autodesk stuff.
To Map Properties from Imported CAD Data to Standard Inventor Properties
It seems like the property copy over part of the import task should be handled automatically for you, once you have those settings set the way you want them. With that in mind, I would assume that you do not need to include anything special in your code for that portion of the task.
Another little detail that may be important to pay attention to in this code process is the difference between the regular ImportedComponentDefinition API object Type, and the ImportedGenericComponentDefinition API object Type, which is a Type that is derived from the other, but has many more properties. The ImportedComponents collection object offers 3 methods. One is for adding a new ImportedComponent using what is says is an ImportedComponentDefinition, and the other 2 are for creating new definitions, but both methods say they will return a regular ImportedComponentDefinition. And the documentation for the ImportedGenericComponentDefinition says that the only natural way to access an object of that Type, is by copying one that already exists. But as you can see in the 'Mod the Machine' example (and others), we can declare our variable as an ImportedGenericComponentDefinition, then set the value of that variable with the ImportedComponents.CreateDefinition method, which still works because this type is derived from that other type. But you will most likely want to be using that derived type in order to access/use all of its added methods & properties. Just wanted to mention that, because derived Types can be confusing to deal with sometimes.
Wesley Crihfield
(Not an Autodesk Employee)