Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Update the API for DrawingViews.Item() so we can specify Name Or Index Integer (currently only Integer allowed)

Update the API for DrawingViews.Item() so we can specify Name Or Index Integer (currently only Integer allowed)

Within Inventor's API (iLogic), please update the coding behind the DrawingViews object for its Item() property, so we can either specify the drawing view's name OR specify its index number.  Right now you can only specify an Integer there for its index, which is often practically useless, which leads to needing to loop through Each DrawingView in DrawingViews, checking the Name property of each, until we find the one with the name we're looking for.  This simple little change would make many scenarios much easier, and require a lot less code.  After many years of iLogic/VBA coding with Inventor, I can't really think of any reason why this might not be possible to set-up, or would cause any problems.

I want to be able get a specific DrawingView like this:

 

oView = oDrawingViews.Item("VIEW1")

 

instead of like this:

 

oView = oDrawingViews.Item(3)

 

 

I know there is an iLogic snippet for specifying a view by its name,

oView = ActiveSheet.View("VIEW1").View

 But that uses the ActiveSheet (ThisRule.ActiveSheet) object (which is an IManagedSheet Interface), then an iManagedDrawingView Interface , then finally a regular DrawingView object, but this only works with the 'active' sheet.  This assumes too much, and I generally don't like to use it, especially in an external rule that is processing many different drawing documents.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report