Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
662 Views, 8 Replies

Associative property in AdditionalOptions

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

JaneFan
in reply to: Anonymous

Hey @Anonymous , 

 

Is this what you are finding: DrawingView.PresentationViewAssociative?




Jane Fan
Inventor QA Engineer
Anonymous
in reply to: JaneFan

No. I am looking for "DesignViewAssociative". 

 

Thanks,

-Thilak Rao

Anonymous
in reply to: Anonymous

Any DevTech members who can have a look at this question?

 

Thanks,

-Thilak Rao

marcin_otręba
in reply to: Anonymous

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)

 

 

Anonymous
in reply to: marcin_otręba

Thank you. I can use this approach though I am not sure if this is intended behavior.

 

Thanks again.

-Thilak Rao

Anonymous
in reply to: marcin_otręba

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

marcin_otręba
in reply to: Anonymous

Sorry, you can't. you will get it's value only if it is set to associative.

DRoam
in reply to: Anonymous

@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