Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i logic view representation

1 REPLY 1
Reply
Message 1 of 2
AbellS
412 Views, 1 Reply

i logic view representation

Hi,
I had some help from the group to write script to change view reps in a part file skeleton sketch and now I want to do the same in an assembly.
the original code is:

Dim oPrtCompDef As PartComponentDefinition
oPrtCompDef = ThisApplication.ActiveDocument.ComponentDefinition

 

(With this line setting one view active)

 

oPrtCompDef.RepresentationsManager.DesignViewRepresentations.Item("FO-Solutions").Activate

(Or the other view active)

oPrtCompDef.RepresentationsManager.DesignViewRepresentations.Item("FR-Solutions").Activate

 

I rebuilt my skeleton in an assembly file and want to do the same thing in the assembly file but
the deffinition: Dim oPrtCompDef As PartComponentDefinition
is not valid for obvious reasons...
I thought it would be something like "AssemblyComponentDefinition"
But that does not appear to be valid eigther.
I need to find the magical incantation that would replace the "PartComponentDefinition"
So that I can change view reps.
Where last time i was just turning on and off sketchs this time I expect I will be turning on and off not only sketches but assembly components as well.
Thanks in advance...

 

 

1 REPLY 1
Message 2 of 2
jasper.du.saar
in reply to: AbellS

You should try ComponentDefinition instead of PartComponentDefinition...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report