Eplan Platform API
EPLAN API / User Guide / API DataModel / API Pro Panel / 3D macros
In This Topic
    3D macros
    In This Topic

    The standard class WindowMacro is used to represent both 3D and 2D window macros. It was extended with methods covering 3d functionality 

     

    Creating 3d window macros :

    C#
    Copy Code
    MultiLangString oMultiLangString = new MultiLangString();
    oMultiLangString.AddString(ISOCode.Language.L_en_US, "Window macro 3D description");
    string strWindowMacro3DFilePath = m_oTestProject.ProjectDirectoryPath + "\\test_window_macro3D.ema";
    
    WindowMacro oWMacro = new WindowMacro();
    oWMacro.Create(strWindowMacro3DFilePath, 0, new Placement3D[] { oComponent1, oComponent2, oComponent3 },true, oMultiLangString);
    
    
                         
    

    Inserting :

    C#
    Copy Code
    //preparing transformation
    Matrix3D oMatrix = new Matrix3D();
    Quaternion oQaternion = new Quaternion(new Vector3D(1.0, 1.0, 1.0), 0.2);
    oMatrix.Rotate(oQaternion);
    
    //preparing WindowMacro object
    string strWindowMacroName = "c:\\SIE.3LD9 284-1B.ema";
    WindowMacro oWMacro = new WindowMacro();
     oWMacro.Open(strWindowMacroName, m_oTestProject, 0);
    
    //insert macro into an InstallationSpace
    Insert3D oInsert3D = new Insert3D();
    StorableObject[] arrStorableObjects = oInsert3D.WindowMacro(oWMacro, nVariant, oInstallationSpace,
    oMatrix, Insert3D.MoveKind.Absolute,  WindowMacro.Enums.NumerationMode.None);