Export .rfa with UCS

Export .rfa with UCS

AnJanson
Advocate Advocate
462 Views
1 Reply
Message 1 of 2

Export .rfa with UCS

AnJanson
Advocate
Advocate

Hi,

I try to export a part file from Inventor to .rfa.

Everything works as expected, except for the assignment of a UserCoordinateSystem.

oUCSDef = oDocTemp.ComponentDefinition.UserCoordinateSystems.CreateDefinition
oUCSDef.Transformation = mat ' Matrix
Dim oUCS As UserCoordinateSystem
oUCS = oDoc.ComponentDefinition.UserCoordinateSystems.Add(oUCSDef)
oBIM = oDoc.ComponentDefinition.BIMComponent
oBIM.ComponentDescription.ComponentType = Omniclass.ManufacturingEquipment
Dim oBIMOrientType As BIMComponentOrientationTypeEnum = kUserCoordinateSystemOrientationType
oBIM.ComponentDescription.OrientationType = oBIMOrientType
' !!! Here I get an exception 
oBIM.ComponentDescription.UserCoordinateSystemOrientation = oUCS

The exception is:

System.Runtime.InteropServices.COMException: "Unbekannter Fehler (Ausnahme von HRESULT: 0x80004005 (E_FAIL))"

Does anybody know what's wrong?

 

Regards Andreas

0 Likes
463 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

You are right @AnJanson , just tested it with v2020. I hope @Sergio.D.Suárez  can help us with this, if he is not busy 🙂

0 Likes