Is there a way to control a parameter in an assy based on positional rep with ilogic?
What is the code for this?
I would also like Inventor to run this Ilogic anytime the positional rep is changed, how do I do that?
I have tried this, but it is not working, I am still missing something.
thanks,
Jason
Solved! Go to Solution.
Solved by A.Acheson. Go to Solution.
This is accessed from the below rule. See API links for how to navigate and create the below rule.
Dim AssyDoc As AssemblyDocument = ThisDoc.Document
Dim AssyDef As AssemblyComponentDefinition = AssyDoc.ComponentDefinition
Dim RepMan As RepresentationsManager = AssyDef.RepresentationsManager
Dim ActivePos As PositionalRepresentation = RepMan.ActivePositionalRepresentation
If ActivePos.Name ="1" Then
MessageBox.Show("Success")
End If
Running the rule and detecting the position change will need an event trigger which can be complicated. A work around is to use a form and change a text parameter, this could then be used to change the active pos rep and the rest of the rule. It will depend on how you want to run the rules to function.