Model File

Types

A3DAsmModelFileData

A3DEModellerType

Fields

kA3DModellerUnknown

kA3DModellerCatia

kA3DModellerCatiaV5

kA3DModellerCadds

kA3DModellerUnigraphics

kA3DModellerParasolid

kA3DModellerEuclid

kA3DModellerIges

kA3DModellerUnisurf

kA3DModellerVda

kA3DModellerStl

kA3DModellerWrl

kA3DModellerDxf

kA3DModellerAcis

kA3DModellerProE

kA3DModellerStep

kA3DModellerIdeas

kA3DModellerJt

kA3DModellerSlw

kA3DModellerCgr

kA3DModellerPrc

kA3DModellerXvl

kA3DModellerHpgl

kA3DModellerTopSolid

kA3DModellerOneSpaceDesigner

kA3DModeller3dxml

kA3DModellerInventor

kA3DModellerPostScript

kA3DModellerPDF

kA3DModellerU3D

kA3DModellerIFC

kA3DModellerDWG

kA3DModellerDWF

kA3DModellerSE

kA3DModellerOBJ

kA3DModellerKMZ

kA3DModellerDAE

kA3DModeller3DS

kA3DModellerRhino

kA3DModellerXML

kA3DModeller3mf

kA3DModellerScs

kA3DModeller3dHtml

kA3DModellerHsf

kA3DModellerGltf

kA3DModellerRevit

kA3DModellerFBX

kA3DModellerStepXML

kA3DModellerPLMXML

kA3DModellerNavisworks

kA3DModellerDGN

kA3DModellerLast

Functions

A3DStatus

A3DAsmModelFileGet

A3DStatus

A3DAsmModelFileCreate

A3DStatus

A3DAsmModelFileDelete

A3DStatus

A3DAsmModelFileUnloadParts

A3DStatus

A3DAsmModelFileGetUnit

A3DEUnits

A3DUnitGetFromValue

A3DDouble

A3DUnitGetFromEnum

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.

enumerator kA3DModellerNavisworks

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:
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, and pModelFile is invalid.

See A3DEntityDelete for a more generic approach.

Remark

This function is only applicable to a model file.

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:

A3DEUnits

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