This is the current M3d v7.5 programming interface as defined in M3da.tlb
Unlock the full potential of your engineering projects with our state-of-the-art programming services powered by the M3da API. Our advanced solutions automate complex tasks, streamline workflows, and enhance productivity. Transform your processes, reduce manual effort, and elevate your projects to new heights with our innovative automated engineering solutions. Please contact us here for our Engineering Services here
See m3dDrive2.xlsm as an example of how to automate M3d from Excel.
M3d API interface as defined in M3d.tlb
Library: M3da
Main application class.
Objects:
Properties:
The database class which holds all the objects (point, lines, surfaces, FEMs e.t.c
Methods:
The base class of all objects stored in DBase
Properties:
The FEM Mesh Object which contains Nodes, Element, Loads, BC and results. There can be many FEMs in the DBase but only 1 active 1. Call GetActiveMesh() to retrieve.
Properties:
See m3dDrive2.xlsm as an example of how to automate M3d from Excel.
M3d API interface as defined in M3d.tlb
Library: M3da
Main application class.
Objects:
- CM3daDoc (dispinterface IM3da)
- DBase (dispinterface IDBase)
- G_Object (dispinterface IObject)
- ME_Object (dispinterface IME_Object)
Properties:
- ElLen: DOUBLE, property related to element length. (NOT USED, SUPERCEEDED)
- IMode: SHORT, property for mode identification. (NOT USED, SUPERCEEDED)
- NoElementsH: SHORT, number of elements horizontally. (NOT USED, SUPERCEEDED)
- NoElementsW: SHORT, number of elements vertically. (NOT USED, SUPERCEEDED)
- ElDeg: DOUBLE, property for element degree. (NOT USED, SUPERCEEDED)
- GetNo(): void, gets the number of elements. (NOT USED, SUPERCEEDED)
- GetModel(): IDispatch*, gets the model DBase.
- DeleteSelectedWG(): void, deletes the selected waveguide. (NOT USED, SUPERCEEDED)
- DesAll(): void, deselects all.
- ReDraw(): void, redraws the view.
- GenMesh(): void, generates the mesh. (NOT USED, SUPERCEEDED)
- ImportCat(BSTR FileName): void, imports catalog of FEMS.
- Tog1d2d(): SHORT, toggles between 1D and 2D. (NOT USED, SUPERCEEDED)
- ImportWG(BSTR sFName, BSTR WGName): SHORT, imports waveguide. (NOT USED, SUPERCEEDED)
- GetDBNoObjs(): LONG, gets the number of database objects.
- GetName(LONG Index): BSTR, gets the name by index.
- ImpSecT(BSTR sFName): void, imports section Table.
- SelectWG(BSTR inName): void, selects waveguide.
- InvertSel(): void, inverts the selection.
- AddPoint(DOUBLE x, DOUBLE y, DOUBLE z, LONG Lab): void, adds a point.
- AddLine(DOUBLE x1, DOUBLE y1, DOUBLE z1, DOUBLE x2, DOUBLE y2, DOUBLE z2, LONG Lab): void, adds a line.
- ImportWG2(BSTR sFName, BSTR sName): SHORT, imports second waveguide.
- BuildAssem(LPCTSTR sModName): SHORT, builds assembly.
- DisplayAll(): void, displays all.
- ExportUNV(BSTR sFName): SHORT, exports to UNV file.
- SelectAllWGs(): void, selects all waveguide.
- ExportNAS(BSTR inName): SHORT, exports to NAS file.
- MergeNodes(DOUBLE dTol): void, merges nodes.
- ExportGroups(BSTR sFName): void, exports groups.
- SendCommand(BSTR sCmd): void, sends command.
The database class which holds all the objects (point, lines, surfaces, FEMs e.t.c
Methods:
- GetNo(): LONG, gets the number of objects in the database.
- AddNode(DOUBLE X, DOUBLE Y, DOUBLE Z, LONG ID, LONG COL): void, adds a node to the current mesh.
- ReDrawWindow(): void, redraws the graphics.
- GetObject(LONG iNo): IDispatch*, gets the object by index.
- GetNoOnSrn(): LONG, gets the number of objects displayed on screen.
- GetOnSrnObject(LONG iNo): IDispatch*, gets the object on screen by index.
- GetActiveMesh(): IDispatch*, gets the active FEM model.
The base class of all objects stored in DBase
Properties:
- iColour: LONG, specifies the colour of the object.
- iLabel: LONG, object label.
- iObjType: LONG, main type of the object.
- iType: LONG, sub-type of the object.
- iFile: LONG, file number for the FE object or layer for geom.
- GetTest(): BSTR, gets a test string.
- GetObjectHeaders(VARIANT* pVariant): HRESULT, gets the object headers.
- GetObjectVars(VARIANT* pVariant): HRESULT, gets object variables as strings.
- PutObjectVars(VARIANT* pVariant): HRESULT, sets object variables from strings.
- GetObjectName(BSTR* pName): HRESULT, gets the name of the object.
The FEM Mesh Object which contains Nodes, Element, Loads, BC and results. There can be many FEMs in the DBase but only 1 active 1. Call GetActiveMesh() to retrieve.
Properties:
- iColour: LONG, specifies the color of the object.
- iLabel: LONG, object label.
- iObjType: LONG, main type of the object.
- iType: LONG, sub-type of the object.
- iFile: LONG, file number for the FE object.
- iIntID: LONG, internal mesh ID.
- iNdNo: LONG, number of nodes.
- iElNo: LONG, number of elements.
- iBCLDs: LONG, number of boundary conditions and loads.
- iCYS: LONG, number of coordinate systems.
- iNoLCs: LONG, number of load case sets.
- iCurLC: LONG, ID of current load case set.
- iNoBCs: LONG, number of boundary condition sets.
- iCurBC: LONG, ID of current boundary condition set.
- iNoTSets: LONG, number of temperature sets.
- iCurTSet: LONG, ID of current temperature set.
- iNoRes: LONG, number of results sets.
- iCurResSetDef: LONG, results set for deformation.
- iResValDef: LONG, results variable for deformation.
- iCVarDef: LONG, posted deformation value.
- iCurResSet: LONG, results set for contour.
- iResVal: LONG, results variable for contour.
- iPostOpt: LONG, secondary variable for contour.
- iCVar: LONG, posted contour value.
- iSecID: LONG, secondary contour variable.
- iCurResVecSet: LONG, results set for vector display.
- iSecVecID: LONG, secondary option for vector display.
- GetObjectHeaders(VARIANT* pVariant): HRESULT, gets the object headers.
- GetObjectVars(VARIANT* pVariant): HRESULT, gets object variables as strings.
- PutObjectVars(VARIANT* pVariant): HRESULT, sets object variables from strings.
- GetObjectName(BSTR* pName): HRESULT, gets the name of the object.
- GetFEMName(BSTR* pName): HRESULT, gets the FEM name.
- GetNodeByInd(LONG iNo): IDispatch*, gets the node by index.
- GetNodeByID(LONG iNID): IDispatch*, gets the node by ID.
- GetElementByInd(LONG iNo): IDispatch*, gets the element by index.
- GetElementByID(LONG iEID): IDispatch*, gets the element by ID.