
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everybody!
I have an assembly with several components in it and I want to change their offset using VBA.
I’m here: Assembly -> Component -> iProperties -> Occurrence -> X/Y/Z Offset.
This is how far I’ve got:
[code]
Sub Test_Occurrence()
Dim od As Document
Set od = ThisApplication.ActiveDocument
Dim oAsmCompDef As AssemblyComponentDefinition
Set oAsmCompDef = od.ComponentDefinition
Dim oOccurrence As ComponentOccurrence
For Each oOccurrence In oAsmCompDef.Occurrences
Dim oName As String
oName = oOccurrence.Name
oOccurrence.Grounded = True 'not necessary, just to show that it works
‘manage offsets ???
Next
End Sub
[/code]
So, I can access the occurrence settings of each component. But I just don’t know the correct command for changing the offsets.
Can anyone help me, please?
Regards
Heiko1985
Solved! Go to Solution.