Same appearance in all views

Same appearance in all views

m_baczewski
Advocate Advocate
150 Views
1 Reply
Message 1 of 2

Same appearance in all views

m_baczewski
Advocate
Advocate

Hi,

 

Is it possible to set the same appearance for a part in every view? Currently, I have multiple views, and my iLogic code changes the part's appearance, but only in the active view. I need the multiple views because, in the end, I generate a .png image from each view and save them in a folder.

m_baczewski_0-1697715434693.pngm_baczewski_1-1697715473104.png

How to "copy" the appearance of one view to another. I'm not changing the appearance within individual parts. The code to change the view is, its just part of code:

 

Dim czarny As Asset
czarny = oDoc.AppearanceAssets.Item(1)
Select Case KOLOR_LAWETY
	Case = "Czarny (RAL 9005)"
		kolor = czarny
End select If CZY_KOLOR_LAWETY2 = False clearOverrideColor Else If CZY_KOLOR_LAWETY2 = True Try Component.InventorComponentInThisContext("Profil platforma uchylna").Appearance = kolor Component.InventorComponentInThisContext("Platforma spawana").Appearance = kolor
End if

 

0 Likes
151 Views
1 Reply
Reply (1)
Message 2 of 2

FINET_Laurent
Advisor
Advisor

Hi @m_baczewski,

 

You could simply loop through each design view representation, activate it, and fire the code each time, as folowing :

Dim doc As Inventor.AssemblyDocument = ThisApplication.ActiveDocument
Dim acd As Inventor.AssemblyComponentDefinition = doc.ComponentDefinition

For Each v As Inventor.DesignViewRepresentation In acd.RepresentationsManager.DesignViewRepresentations
	If v Is acd.RepresentationsManager.DesignViewRepresentations.Item(1) Then Continue For	
	v.Activate

	'paste code for chaning color here
	
Next

 

Kind regards,

FINET L.

 

 

 

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes