Inventor General Discussion

Inventor General Discussion

Reply
Active Contributor
48 Posts
3 Kudos
Registered: ‎02-23-2012
Post 1 of 3
Accepted Solution

iLogic to change the view representation in a part file

692 Views, 2 Replies
04-16-2012 09:14 AM

 

Hi,

There is an existing thread on this forum showing how to change the view rep in an assembly (using oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Item("Red").activate) - Thank you to Curtis Waguespack - however I am trying to achieve the same with iLogic in a part file (multi-solid). Is this possible please?

Many thanks

Following iLogic rule activates "View1" and should work both in a part or in an assembly.

Keep in mind that viewreps capture the part and body appearance in a multi-body part but not the face or feature appearance.

 

Dim odoc As Document
Dim ocompdef As ComponentDefinition
odoc = ThisApplication.ActiveDocument
ocompdef = odoc.ComponentDefinition
Try
ocompdef.RepresentationsManager.DesignViewRepresentations.Item("View1").Activate
Catch
MessageBox.Show("This viewrep does not exist", "Error")
End Try

 Bob

 

Product Support
578 Posts
47 Kudos
Registered: ‎11-23-2005
Post 2 of 3

Re: iLogic to change the view representation in a part file

04-16-2012 09:58 AM in reply to: CadlineSupport

Following iLogic rule activates "View1" and should work both in a part or in an assembly.

Keep in mind that viewreps capture the part and body appearance in a multi-body part but not the face or feature appearance.

 

Dim odoc As Document
Dim ocompdef As ComponentDefinition
odoc = ThisApplication.ActiveDocument
ocompdef = odoc.ComponentDefinition
Try
ocompdef.RepresentationsManager.DesignViewRepresentations.Item("View1").Activate
Catch
MessageBox.Show("This viewrep does not exist", "Error")
End Try

 Bob

 

Active Contributor
48 Posts
3 Kudos
Registered: ‎02-23-2012
Post 3 of 3

Re: iLogic to change the view representation in a part file

04-16-2012 12:59 PM in reply to: CadlineSupport

Superb! works perfectly thank you very much for the quick response

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!