Hi @MTheDesigner. I think I may have an idea for you to explore for this situation. I'm assuming you don't want to use the Component.Replace("Part1:1", "C:\Temp\Part2.ipt", False) type snippet for some reason, so I thought of a way to extract the regular Matrix from the existing component first. Then gets its data to an array. Then convert its data from database units to document units (if different units). Then create a new DocumentUnitsMatrix object using the converted data from the original. Then use your Components.Add() snippet with that.
You can test with this a try if you want. You will obviously have to change component names, file names, and such first.
Dim oOccName As String = "Asm1:1"
Dim oFile As String = "C:\Temp\Asm2.iam"
Dim oExistingOccurrence As ComponentArgument = New ComponentArgument(oOccName)
Dim oPosition As Matrix = oExistingOccurrence.Occurrence.Occurrence.Transformation
Dim oCells() As Double = {}
oPosition.GetMatrixData(oCells)
UOM = ThisDoc.Document.UnitsOfMeasure
If UOM.LengthUnits <> UnitsTypeEnum.kDatabaseLengthUnits Then
For Each oCell In oCells
oCell = UOM.ConvertUnits(oCell, "cm", UOM.LengthUnits)
Next
End If
Dim oNewPosition As DocumentUnitsMatrix = ThisDoc.Geometry.Matrix(oCells)
Components.Add(oOccName, oFile, oNewPosition)
'Component.Replace(oOccName, oFile, False)
Wesley Crihfield

(Not an Autodesk Employee)