Model File
Types
Fields
Functions
Detailed Description
- group a3d_modelfile
Reads and writes a physical file containing a PRC model file; and creates and accesses model file entities.
The A3DAsmModelFile is the root entity of the PRC data. It is the starting point for parsing a PRC file. It is also one of the arguments used to create a 3D annotation within a PDF document.
Entity type is kA3DTypeAsmModelFile.
Type Documentation
-
enum A3DEModellerType
A3DSDKStructure.
Modeller type
- Version
2.1
Values:
-
enumerator kA3DModellerUnknown
User modeller.
-
enumerator kA3DModellerCatia
CATIA modeller.
-
enumerator kA3DModellerCatiaV5
CATIA V5 modeller.
-
enumerator kA3DModellerCadds
CADDS modeller.
-
enumerator kA3DModellerUnigraphics
Unigraphics modeller.
-
enumerator kA3DModellerParasolid
Parasolid modeller.
-
enumerator kA3DModellerEuclid
Euclid modeller.
-
enumerator kA3DModellerIges
IGES modeller.
-
enumerator kA3DModellerUnisurf
Unisurf modeller.
-
enumerator kA3DModellerVda
VDA modeller.
-
enumerator kA3DModellerStl
STL modeller.
-
enumerator kA3DModellerWrl
WRL modeller.
-
enumerator kA3DModellerDxf
DXF modeller.
-
enumerator kA3DModellerAcis
ACIS modeller.
-
enumerator kA3DModellerProE
Pro/E modeller.
-
enumerator kA3DModellerStep
STEP modeller.
-
enumerator kA3DModellerIdeas
I-DEAS modeller.
-
enumerator kA3DModellerJt
JT modeller.
-
enumerator kA3DModellerSlw
SolidWorks modeller.
-
enumerator kA3DModellerCgr
CGR modeller.
-
enumerator kA3DModellerPrc
PRC modeller.
-
enumerator kA3DModellerXvl
XVL modeller.
-
enumerator kA3DModellerHpgl
HPGL modeller.
-
enumerator kA3DModellerTopSolid
TopSolid modeller.
-
enumerator kA3DModellerOneSpaceDesigner
OneSpace designer modeller.
-
enumerator kA3DModeller3dxml
3DXML modeller.
-
enumerator kA3DModellerInventor
Inventor modeller.
-
enumerator kA3DModellerPostScript
Postscript modeller.
-
enumerator kA3DModellerPDF
PDF modeller.
-
enumerator kA3DModellerU3D
U3D modeller.
-
enumerator kA3DModellerIFC
IFC modeller.
-
enumerator kA3DModellerDWG
DWG modeller.
-
enumerator kA3DModellerDWF
DWF modeller.
-
enumerator kA3DModellerSE
SolidEdge modeller.
-
enumerator kA3DModellerOBJ
OBJ modeller.
-
enumerator kA3DModellerKMZ
KMZ modeller.
-
enumerator kA3DModellerDAE
COLLADA modeller.
-
enumerator kA3DModeller3DS
3DS modeller.
-
enumerator kA3DModellerRhino
Rhino modeller.
-
enumerator kA3DModellerXML
XML modeller.
-
enumerator kA3DModeller3mf
3MF modeller.
-
enumerator kA3DModellerScs
SCS modeller.
-
enumerator kA3DModeller3dHtml
3DHTML modeller.
-
enumerator kA3DModellerHsf
Hsf modeller.
-
enumerator kA3DModellerGltf
GL modeller.
-
enumerator kA3DModellerRevit
Revit modeller.
-
enumerator kA3DModellerFBX
FBX modeller.
-
enumerator kA3DModellerStepXML
StepXML modeller.
-
enumerator kA3DModellerPLMXML
PLMXML modeller.
Navisworks modeller.
-
enumerator kA3DModellerDGN
DGN modeller.
-
enumerator kA3DModellerLast
Function Documentation
-
A3DStatus A3DAsmModelFileGet(const A3DAsmModelFile *pModelFile, A3DAsmModelFileData *pData)
Populates the A3DAsmModelFileData structure.
- Version
2.0
Sample code
A3DInt32 iErr = A3D_SUCCESS; A3DAsmModelFile pModel = NULL; /* Should call something here in order to get a valid A3DAsmModelFile */ A3DAsmModelFileData sData; A3D_INITIALIZE_DATA(sData); iErr = A3DAsmModelFileGet( pModel , &sData ); if ( iErr == A3D_SUCCESS ) { /* Insert here your own code to parse through members of Model File */ for (A3DUns32 ui=0;ui<sData.m_uiPOccurrencesSize;ui++) { /* current product occurrence is sData.m_ppPOccurrences[ui] */ } iErr = A3DAsmModelFileGet( NULL, &sData ); }
- Parameters:
pModelFile – A reference to the model file, which is created by invoking A3DAsmModelFileLoadFromFile
pData – A reference to the A3DAsmModelFileData structure in which the library stores the model file data
- Return values:
A3D_INITIALIZE_NOT_CALLED –
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_MODELFILE_INCONSISTENT_EMPTY –
A3D_INVALID_ENTITY_NULL –
A3D_INVALID_ENTITY_TYPE –
A3D_SUCCESS –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DAsmModelFileCreate(const A3DAsmModelFileData *pData, A3DAsmModelFile **ppModelFile)
Creates a new A3DAsmModelFile using the data in the given A3DAsmModelFileData structure.
By creating a model file, you are responsible of deleting it later with A3DAsmModelFileDelete.
The new model file must have a root product occurrence. If the input data doesn’t contain any, A3DAsmModelFileCreate will implicitly create one. This new product occurrence can be retrieved back on calling A3DAsmModelFileGet with
ppModelFile
.- Version
2.0
- Parameters:
pData – [in] The data used to create the model file.
ppModelFile – [out] a handle to the newly created model file.
- Return values:
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DAsmModelFileDelete(A3DAsmModelFile *pModelFile)
Deletes the entire A3DAsmModelFile entity from memory.
This operation will recursively delete all entities inside the model file, thus deleting the whole PRC tree. This function is responsible for freeing the all memory allocated for
pModelFile
. After this call, access to the model file is no longer possible, andpModelFile
is invalid.See A3DEntityDelete for a more generic approach.
Remark
This function is only applicable to a model file.
See also
- Version
2.0
Warning
This function must not be applied within an HOOPS Visualize context. See Evaluating HOOPS Publish.
- Return values:
A3D_INVALID_ENTITY_NULL –
A3D_INVALID_ENTITY_TYPE –
A3D_SUCCESS –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DAsmModelFileUnloadParts(A3DAsmModelFile *pModelFile, A3DUns32 uiPartsSize, A3DAsmProductOccurrence **ppParts)
Removes all tessellation and geometry of an A3DAsmProductOccurrence entity This can only be done on parts.
- Version
9.1
- Parameters:
pModelFile – The model file
uiPartsSize – Size of input array.
ppParts – Array of parts to unload.
- Return values:
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_PRODUCTOCCURRENCE_INCONSISTENT_PART_EXTERNAL –
A3D_PRODUCTOCCURRENCE_INCONSISTENT_EMPTY –
A3D_SUCCESS –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DStatus A3DAsmModelFileGetUnit(const A3DAsmModelFile *pModelFile, A3DDouble *pdUnit)
Gives the unit of the model.
- Version
12.0
- Parameters:
pModelFile – A reference to the model file, which is created by invoking A3DAsmModelFileLoadFromFile
pdUnit – A reference to the unit value
- Return values:
A3D_INITIALIZE_NOT_CALLED –
A3D_INVALID_ENTITY_NULL –
A3D_INVALID_ENTITY_TYPE –
A3D_SUCCESS –
A3D_ERROR –
- Returns:
A3D_SUCCESS
on success, or an error code on failure
-
A3DEUnits A3DUnitGetFromValue(A3DDouble dUnit)
Gives the unit from of the model.
- Version
14.1
- Parameters:
dUnit – A unit value (in millimeter)
- Returns:
-
A3DDouble A3DUnitGetFromEnum(A3DEUnits eUnit)
Gives the unit of the model.
- Version
14.1
- Parameters:
eUnit – A unit enum
- Returns:
A3DDouble scale to the unit in millimeter. If eUnit is set to kA3DUnitUnknown, the function return 1.0