- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, everybody.
I am very interested in Inventor customization. But as for a non-programmer it can be very difficult to understand some features. I would really appreciate it if someone could explain the next thing:
In API.pdf we can see object model.
The same thing in the API help book:
At the top level, we see the application. Next comes the various documents, and then goes specific structure of the document.
For examle
"PartDocument - PartDocumentDefinition - PartFeatures";
"AssemblyDocument - AssemblyDocumentDefinition".
However, if we try to use something like this:
Dim partDoc as PartDocument = ThisApplication.ActiveDocument
Dim extrude As ExtrudeFeature = partDoc.PartComponentDefinition.PartFeatures.ExtrudeFeatures.Item(1)
this will not work, because there is no such a thing as "PartDocumentDefinition" or "AssemblyDocumentDefinition" and there is no "PartFeatures" thing too. Instead we should use "partDoc.ComponentDefinition" and "Features" as it is shown in API help examples...
Dim partDoc as PartDocument = ThisApplication.ActiveDocument
Dim extrude As ExtrudeFeature
extrude = partDoc.ComponentDefinition.Features.ExtrudeFeatures.Item(1)
First, they provide a theory and then give examples that do not match it. 😞
And it drives me crazy... I don't understand how to use this table then, if we can't believe it.
I couldn't find any explanation in the help for this issue. Perhaps, there is certain "general idea" that makes this transition in syntax understandable. If so, please share it with me. And if this example is just an exception, can you tell if there are other similar exceptions?
Solved! Go to Solution.