Hello
Since this morning I have been looking for a solution to my problem but impossible to find. I would like to insert components and reposition them in an assembly according to the origin of the assembly or certain point, point 1, point 2 ...
I manage to create an assembly automatically, open all my files and even insert them into my assembly. The first component didn't even insert at the origin of the assembly and I don't know how you can reposition the whole thing on the origins or on points.
If anyone knows these two little lines of code, here are the lines of code that are interesting:
'Ouverture de l'assemblage
Set Part = swApp.OpenDoc6(ActiveSheet.Range("H100"), 2, 0, "", longstatus, longwarnings)
swApp.ActivateDoc2 ActiveSheet.Range("H100"), False, longstatus
'--------------------------------------------
'assemblage des plans
boolstatus = Part.AddComponent(ActiveSheet.Range("H101"), ActiveSheet.Range("E101"), ActiveSheet.Range("F101"), ActiveSheet.Range("G101"))
boolstatus = Part.AddComponent(ActiveSheet.Range("H102"), ActiveSheet.Range("E102"), ActiveSheet.Range("F102"), ActiveSheet.Range("G102"))
I just need more lines between each insertion to define the positioning point of each part/set.