Message 1 of 6

Not applicable
03-13-2019
01:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Could anyone help me to modify this code, so a new part enters in the assembly where the mouse cursor is at that moment instead of on point 50,50,50?
Many thank
'[ Place Component Dim oAsmCompDef As AssemblyComponentDefinition oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition ' Create Matrix Dim oMatrix As Matrix oMatrix = ThisApplication.TransientGeometry.CreateMatrix Call oMatrix.SetTranslation(ThisApplication.TransientGeometry.CreateVector(50, 50, 50), True) 'insert new occurence Dim oOcc As ComponentOccurrence oOcc = oAsmCompDef.Occurrences.Add( _ oPathandName, oMatrix) oOcc.Grounded = False ThisDoc.Document.SelectSet.Select(oOcc) ']
Solved! Go to Solution.