Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everybody,
I found this code from the iLogic Drawing Batch Tool 2015:
'check For Parameter And create If Not found Try oTest = Parameter("ActionList") Catch ' Get the active document. Assumes a part document is active. Dim partDoc As PartDocument partDoc = ThisApplication.ActiveDocument ' Get the UserParameters collection Dim userParams As UserParameters userParams = partDoc.ComponentDefinition.Parameters.UserParameters oParam = userParams.AddByValue("ActionList", "", UnitsTypeEnum.kTextUnits) End Try oApp = ThisApplication Auto = iLogicVb.Automation Dim iLogicAuto As Object iLogicAuto = Auto Dim oDoc As Document oDoc = ThisApplication.ActiveDocument Dim oIndexNumber As Integer 'sets index number for the first run If oIndexNumber < 0 Then oIndexNumber = 0 End If 'create list and add default value Dim oRuleList As New ArrayList 'get collection of rules Dim ruleName As String Dim rules As Object rules = iLogicAuto.rules(oDoc) 'make sure there are rules in the file 'and then add them to the list If Not (rules Is Nothing) Then For Each rule In rules ruleName = rule.Name If rule.Name.Contains("***") Then oRuleList.add(ruleName) 'Set List MultiValue.List("ActionList") = oRuleList End If Next Else 'no rules found Return End If
Is it possible to add the names of parts and subassemblies which are located in my main assembly to a list in a similar way?
Solved! Go to Solution.