Inventor General Discussion

Inventor General Discussion

Reply
Active Contributor
CadlineSupport
Posts: 48
Registered: ‎02-23-2012
Message 1 of 3 (579 Views)
Accepted Solution

iLogic to change the view representation in a part file

579 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

Product Support
bobvdd
Posts: 549
Registered: ‎11-23-2005
Message 2 of 3 (571 Views)

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
CadlineSupport
Posts: 48
Registered: ‎02-23-2012
Message 3 of 3 (556 Views)

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

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.