View Rep driven rule

View Rep driven rule

Formsprag
Advocate Advocate
336 Views
1 Reply
Message 1 of 2

View Rep driven rule

Formsprag
Advocate
Advocate

I have a drawing with 64 View Reps, How do I use iLogic to run a rule based on the View Rep selected?

0 Likes
337 Views
1 Reply
Reply (1)
Message 2 of 2

J-Camper
Advisor
Advisor

Here is how you can get the current view rep and loop through all view reps.  Not sure what else you're trying to do.

 

Dim RepManager As RepresentationsManager = ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager
Dim viewReps As DesignViewRepresentations = RepManager.DesignViewRepresentations
Dim currentView As DesignViewRepresentation = RepManager.ActiveDesignViewRepresentation

'Loop through all
Dim viewFrame As DesignViewRepresentation
For Each viewFrame In viewReps
	'Test for what you are looking for
	If UCase(Left(viewFrame.Name, 5)) = "FRAME"
		viewFrame.Activate
		'Do what you want
	Else
		'Go to next
	End If
Next

'Return to Master View as active: viewReps.Item(1).Activate

Just redefine RepManager for documents in question

 

0 Likes