Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

I have a 4x4 transformation matrix. How can I directly apply that matrix to the transformation matrix?

            var txn = InventorApp.TransactionManager.StartTransactionForDocumentOpen("FDX Import");
            Document _document = InventorApp.ActiveDocument;
            AssemblyDocument aDoc = _document as AssemblyDocument;
            AssemblyComponentDefinition oPartCompDef = aDoc.ComponentDefinition;
            InventorApp.PartOptions.EnableConstructionEnvironment = false;
            aDoc.ObjectVisibility.Sketches = true;
            ObjectCollection oBodies = InventorApp.TransientObjects.CreateObjectCollection();
            string filePath = "D:\\StepFiles\\CCADAEB1A99EB29F20431D6F3761692C105ADF2E.stp";//bRepGeometry.FilePath;
            ImportedGenericComponentDefinition impPart = (ImportedGenericComponentDefinition)oPartCompDef.ImportedComponents.CreateDefinition(filePath);
            impPart.ReferenceModel = true;
            impPart.ImportedModelGeometryTypes = ImportedModelGeometryTypeEnum.kWiresModelGeometryType | ImportedModelGeometryTypeEnum.kSolidsModelGeometryType | ImportedModelGeometryTypeEnum.kMeshesModelGeometryType | ImportedModelGeometryTypeEnum.kSurfacesModelGeometryType;
            oPartCompDef.ImportedComponents.Add((ImportedComponentDefinition)impPart);
            impPart.IncludeAll();
            // ComponentOccurrence boxOccurrence = pDoc.ComponentDefinition.Occurrences(1).Definition.Occurrences(1);
            ComponentOccurrence oc1 = aDoc.ComponentDefinition.Occurrences[1];
            TransientGeometry transientGeometry = InventorApp.TransientGeometry;
            Matrix transMatrix = oc1.Transformation;           

            transMatrix.Cell[1, 4] = 0;
            transMatrix.Cell[2, 4] = 1;
            transMatrix.Cell[3, 4] =1;
            oc1.Transformation = transMatrix;
            txn.End();