Autodesk Inventor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
pos rep, view rep and ilogic
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi
Is it in ilogic possible to check which pos rep that is active using a rule? Is it possible to activate a view rep using a rule?
I'd like to do something like:
If this "pos rep name" is active, then activate this "view rep name"
Autodesk Product Design Suite Ulitmate 2012 Sp1 / Vault Collaboration 2012 Sp1
HP EliteBook 8560w
Intel(R)Core(TM) i7 CPU Q 720 @ 2,0GHz 2,0GHz
16GB RAM
Windows 7 X64 SP1
Solved! Go to Solution.
Re: pos rep, view rep and ilogic
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I did not get the existing function in iLogic, but this can be accomplished via Inventor API -
Sub Main()
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oCompDef As AssemblyComponentDefinition
Set oCompDef = oDoc.ComponentDefinition
Dim sActivePR As String
sActivePV = oCompDef.RepresentationsManager.ActivePositionalRe
Dim sActiveDV As String
sActiveDV = oCompDef.RepresentationsManager.ActiveDesignViewRe
Dim sActiveLOD As String
sActiveLOD = oCompDef.RepresentationsManager.ActiveLevelOfDetai
End Sub
And you could also use this code sample in iLogic, and maybe the error shows up, and you could remove the "Set" in code line to fix it.
Thanks,
River
River Cai
Quality Assurance Team
Autodesk, Inc.
Re: pos rep, view rep and ilogic
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi amasva,
Here is an example that might help, along with some sample files.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
' set a reference to the assembly component definintion. ' This assumes an assembly document is open. Dim oAsmCompDef As AssemblyComponentDefinition oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition 'toggle Between Positional Representations If oAsmCompDef.RepresentationsManager.ActivePositionalRepresentation.Name = "Master" Then oAsmCompDef.RepresentationsManager.PositionalRepre sentations.Item("Stacked").activate ElseIf oAsmCompDef.RepresentationsManager.ActivePositiona lRepresentation.Name = "Stacked" Then oAsmCompDef.RepresentationsManager.PositionalRepre sentations.Item("Master").activate End if 'set View Representation based on of the active Positional Representation If oAsmCompDef.RepresentationsManager.ActivePositiona lRepresentation.Name = "Master" Then oAsmCompDef.RepresentationsManager.DesignViewRepre sentations.Item("Blue").activate ElseIf oAsmCompDef.RepresentationsManager.ActivePositiona lRepresentation.Name = "Stacked" Then oAsmCompDef.RepresentationsManager.DesignViewRepre sentations.Item("Red").activate End if

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Re: pos rep, view rep and ilogic
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you very much Curtis ![]()
Autodesk Product Design Suite Ulitmate 2012 Sp1 / Vault Collaboration 2012 Sp1
HP EliteBook 8560w
Intel(R)Core(TM) i7 CPU Q 720 @ 2,0GHz 2,0GHz
16GB RAM
Windows 7 X64 SP1

