Associative property in AdditionalOptions

Associative property in AdditionalOptions

Anonymous
適用対象外
736件の閲覧回数
8件の返信
メッセージ1/9

Associative property in AdditionalOptions

Anonymous
適用対象外

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 件のいいね
解決済み
737件の閲覧回数
8件の返信
返信 (8)
メッセージ2/9

JaneFan
Autodesk
Autodesk

Hey @Anonymous , 

 

Is this what you are finding: DrawingView.PresentationViewAssociative?




Jane Fan
Inventor/Fusion QA Engineer
0 件のいいね
メッセージ3/9

Anonymous
適用対象外

No. I am looking for "DesignViewAssociative". 

 

Thanks,

-Thilak Rao

0 件のいいね
メッセージ4/9

Anonymous
適用対象外

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

 

Thanks,

-Thilak Rao

0 件のいいね
メッセージ5/9

marcin_otręba
Advisor
Advisor
解決済み

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 件のいいね
メッセージ6/9

Anonymous
適用対象外

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

 

Thanks again.

-Thilak Rao

0 件のいいね
メッセージ7/9

Anonymous
適用対象外

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 件のいいね
メッセージ8/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 件のいいね
メッセージ9/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 件のいいね