Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Michael.Navara
in reply to: mat_hijs

The easiest way is to define your UCS in assembly and use its transformation to move the component. Below is the relevant part of your code. Everything else stay unchanged.

...

' Set the Translation of the matrix
oMatrix.SetTranslation(oTransientGeometry.CreateVector(Location_X / 10, Location_Y / 10, Location_Z / 10))

' Transform matrix to UCS1
Dim oUcsMatrix As Matrix = oAsmCompDef.UserCoordinateSystems("UCS1").Transformation
oMatrix.PostMultiplyBy(oUcsMatrix)

' Set a reference to the Component Occurrences
Dim oOccurrences As ComponentOccurrences = oAsmCompDef.Occurrences

...