- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Experts,
Inventor 2017 Professional
C# AddIn
While creating a standard base view using the Inventor API, the last argument is 'AdditionalOptions' where in amongst others you can also set 'DesignViewAssociative' to true or false.
The question is, how do I retrieve this setting from an existing view that is already set to associative?
Thanks,
-Thilak Rao
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
If you want only to check it you can use:
if oview.ActiveDesignViewRepresentation <> "" then
'is associative
endif
if you want to set it it is not possible, because of fact that you will not get ActiveDesignViewRepresentation from the view and will not be able to set it up. if you know name of design view then you can use oview.SetDesignViewRepresentation (name, true)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thank you. I can use this approach though I am not sure if this is intended behavior.
Thanks again.
-Thilak Rao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Let us assume 'ActiveDesignViewRepresentation' is set to something and is not associative. Now the View.ActiveDesignViewRepresentation returns null or "". Then how do I find out the DesignViewRepresentation set for this view ?
Thanks,
-Thilak Rao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Sorry, you can't. you will get it's value only if it is set to associative.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
@Anonymous, see this helpful explanation by @Jon.Balgley from this thread:
if the DrawingView is not associative with the DesignViewRepresentation (DVR), then subsequently calling DrawingView.ActiveDesignViewRepresentation will return the empty string.
I can give a halfway-good justification for that: Once you do myDrawingView.SetDesignViewRepresentation("myDVR", False) [or the "associative" box becomes unchecked by any other method], then [the drawing view] is using a "snapshot" of the state of the DVR; it's not really using the DVR after that point. After all, you can turn components on/off in the drawing, independently of their visibility in the DVR in the assembly. So subsequently asking for the "active" DVR of the drawing-view is no longer accurate. I think you're asking for "what was the last DVR assigned to this drawing view?" ... not the "active" one. That would be a new API property. Is that what you want? If so, you could enter that in the "Inventor Ideas" forum (or reply here and I can do it).
(Bracketed additions by me)
There is a feature request for this that you can vote for (please do):
API improvement: Reassociate a Drawing View with its Design View Representation
