Associative DVR - chow to check wiht API

Associative DVR - chow to check wiht API

Cris-Ideas
Advisor Advisor
330 Views
3 Replies
Message 1 of 4

Associative DVR - chow to check wiht API

Cris-Ideas
Advisor
Advisor

Hi,

Does anyone know how to check is component is currently set to be displayed using associative DVR?

 

I found how to get ActiveDesignViewRepresentation but there seems to be property about wheatear it is used in associative or non associative state.

 

Cris.

Cris,
https://simply.engineering
0 Likes
331 Views
3 Replies
Replies (3)
Message 2 of 4

clutsa
Collaborator
Collaborator

 

Dim compOcc = Component.InventorComponent("PartA:1")
Dim ADV = compOcc.IsAssociativeToDesignViewRepresentation
MessageBox.Show(ADV, "Title")

 

 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 3 of 4

Cris-Ideas
Advisor
Advisor

Thanks.

Aside of the question in the title.

 

Is it the case that for dim declarations VB automatically assigns proper data types for this variables?

 

Cris.

Cris,
https://simply.engineering
0 Likes
Message 4 of 4

clutsa
Collaborator
Collaborator

Sorry I guess to me iLogic is API too but here is code for VBA as well. 

Dim app As Application
Dim Doc As Document

Set app = ThisApplication
Set Doc = app.ActiveDocument
Dim compOcc As ComponentOccurrence
Set compOcc = Doc.ComponentDefinition.Occurrences.ItemByName("PartName:1")
Dim ADV As Boolean
ADV = compOcc.IsAssociativeToDesignViewRepresentation
Debug.Print (ADV)


Have you ever used the "object browser" under the View tab in VBA? There is a load of info about data types for the variables in that.  

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes