Associative property in AdditionalOptions

Associative property in AdditionalOptions

Anonymous
Not applicable
727 Views
8 Replies
Message 1 of 9

Associative property in AdditionalOptions

Anonymous
Not applicable

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

0 Likes
Accepted solutions (1)
728 Views
8 Replies
Replies (8)
Message 2 of 9

JaneFan
Autodesk
Autodesk

Hey @Anonymous , 

 

Is this what you are finding: DrawingView.PresentationViewAssociative?




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 3 of 9

Anonymous
Not applicable

No. I am looking for "DesignViewAssociative". 

 

Thanks,

-Thilak Rao

0 Likes
Message 4 of 9

Anonymous
Not applicable

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

 

Thanks,

-Thilak Rao

0 Likes
Message 5 of 9

marcin_otręba
Advisor
Advisor
Accepted solution

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)

 

 

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 6 of 9

Anonymous
Not applicable

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

 

Thanks again.

-Thilak Rao

0 Likes
Message 7 of 9

Anonymous
Not applicable

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

0 Likes
Message 8 of 9

marcin_otręba
Advisor
Advisor

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

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 9 of 9

DRoam
Mentor
Mentor

@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

0 Likes