Build more components in the assembly with iLogic

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I would like to build more components in one assembly with iLogic in the same time. I found a rule, but it is able built only one component in the assembly. I need build lots of components anywhere in the assembly.
' File path to use
oPath = "C:\Users\janos.buczko\Desktop\LUVE_ALL\30084924.ipt"
'[ Place component
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim oMatrix As Matrix = oTG.CreateMatrix
Dim oOccurrence As ComponentOccurrence
'get user input
oX = InputBox("Enter the X co-ordinate, in inches.", "iLogic", "0")
oY = InputBox("Enter the Y co-ordinate, in inches.", "iLogic", "0")
'placement co-ordinates in cm's
oMatrix.SetTranslation(oTG.CreateVector(oX * 2.54, oY* 2.54, 0))
oOccurrence = oAsmCompDef.Occurrences.Add(oPath, oMatrix)
oOccurrence.Grounded = True
'zoom all
ThisApplication.ActiveView.Fit
Could anyone help me please?
Many thanks in advance
Janos