Product Occurrence

Types

A3DMaterialAndVisualisationInfos

A3DViewMaterialAndVisualisationInfos

A3DAsmProductOccurrenceData

A3DAsmAttachmentsInfosSLW

A3DAsmProductOccurrenceDataSLW

A3DAsmProductOccurrenceDataCat

A3DAsmProductOccurrenceDataCV5

A3DPromotedBodyUg

A3DElementsByRefsetUg

A3DAsmProductOccurrenceDataUg

A3DAsmProductOccurrenceDataProe

A3DAsmProductOccurrenceDataInv

A3DAsmProductOccurrenceDataJT

A3DAsmLayer

A3DEProductLoadStatus

A3DEProductOccurrenceTypeCat

A3DEProductOccurrenceTypeInv

A3DEProductOccurrenceTypeSLW

A3DELayerDisplayStatus

Fields

kA3DProductLoadStatusUnknown

kA3DProductLoadStatusError

kA3DProductLoadStatusNotLoaded

kA3DProductLoadStatusNotLoadable

kA3DProductLoadStatusLoaded

A3DEProductOccurrenceTypeCat_unknown

A3DEProductOccurrenceTypeCat_model

A3DEProductOccurrenceTypeCat_sessionModel

A3DEProductOccurrenceTypeCat_session

A3DEProductOccurrenceTypeCat_export

A3DEProductOccurrenceTypeInv_none

A3DEProductOccurrenceTypeInv_iam

A3DEProductOccurrenceTypeInv_ipt

A3DEProductOccurrenceTypeSLW_ContainerTess

A3DEProductOccurrenceTypeSLW_Container

A3DEProductOccurrenceTypeSLW_Part

A3DEProductOccurrenceTypeSLW_Assembly

A3DEProductOccurrenceTypeSLW_Drawing

A3DEProductOccurrenceTypeSLW_Unknown

A3DEProductOccurrenceTypeSLW_PartTesselated

A3DEProductOccurrenceTypeSLW_AssemblyTesselated

A3DEProductOccurrenceTypeSLW_StandalonePart

kA3DLayerDisplayShow

kA3DLayerDisplayHide

kA3DLayerDisplayIsolate

kA3DLayerDisplayUnknown

Functions

A3DStatus

A3DAsmProductOccurrenceGet

A3DStatus

A3DAsmProductOccurrenceCreate

A3DStatus

A3DAsmProductOccurrenceSetProductPrototype

A3D_API_DEPRECATED

A3DStatus

A3DAsmProductOccurrenceGetFilePathName

A3DStatus

A3DAsmProductOccurrenceGetOriginalFilePathName

A3DStatus

A3DAsmProductOccurrenceAddView

A3DStatus

A3DAsmProductOccurrenceEdit

A3DStatus

A3DAsmProductOccurrenceDeepCopy

A3DStatus

A3DAsmProductOccurrenceGetFather

A3DStatus

A3DAsmProductOccurrenceGetSLW

A3DStatus

A3DAsmProductOccurrenceGetCat

A3DStatus

A3DAsmProductOccurrenceGetCV5

A3DStatus

A3DAsmProductOccurrenceGetUg

A3DStatus

A3DAsmProductOccurrenceGetProe

A3DStatus

A3DAsmProductOccurrenceGetInv

A3DStatus

A3DAsmProductOccurrenceGetJT

A3DStatus

A3DAsmProductOccurrenceGetLayerList

A3DStatus

A3DAsmProductOccurrenceGetIdentifier

Detailed Description

group a3d_productoccurrence

Creates and accesses product occurrence PRC entities.

A product occurrence denotes an assembly tree. If the assembly tree contains a single part, the product occurrence points directly to a part definition. In the case of a more complex assembly tree, a product occurrence is a hierarchy of child product occurrences. And a product occurrence can reference product occurrences that are designated as ProductPrototypes or ExternalData. Such ProductOccurrences denote subassembly structures, which in turn can point to PartDefinitions.

Entity type is kA3DTypeAsmProductOccurrence.

Type Documentation

enum A3DEProductLoadStatus

Load status of the PRC model file.

Version

2.1

Values:

enumerator kA3DProductLoadStatusUnknown

Unknown status.

enumerator kA3DProductLoadStatusError

Loading error.

For example, there is a missing file.

enumerator kA3DProductLoadStatusNotLoaded

Not loaded.

enumerator kA3DProductLoadStatusNotLoadable

Not loadable.

For example, limitations exist that prevent the product from loading.

enumerator kA3DProductLoadStatusLoaded

The product was successfully loaded.

enum A3DEProductOccurrenceTypeCat

A3DAsmProductOccurrenceData extension for CATIA V4

Version

8.2

Values:

enumerator A3DEProductOccurrenceTypeCat_unknown

Unknwon CATIA V4 type.

enumerator A3DEProductOccurrenceTypeCat_model

CATIA V4 Model.

enumerator A3DEProductOccurrenceTypeCat_sessionModel

CATIA V4 Session Model.

enumerator A3DEProductOccurrenceTypeCat_session

CATIA V4 Session.

enumerator A3DEProductOccurrenceTypeCat_export

CATIA V4 Export.

enum A3DEProductOccurrenceTypeInv

A3DAsmProductOccurrenceData extension for Inventor

Version

8.2

Values:

enumerator A3DEProductOccurrenceTypeInv_none

Unknown Inventor type.

enumerator A3DEProductOccurrenceTypeInv_iam

Inventor assembly.

enumerator A3DEProductOccurrenceTypeInv_ipt

Inventor Part.

enum A3DEProductOccurrenceTypeSLW

A3DAsmProductOccurrenceData extension for SolidWorks

Version

8.2

Values:

enumerator A3DEProductOccurrenceTypeSLW_ContainerTess

SolidWorks Container with tessellation.

enumerator A3DEProductOccurrenceTypeSLW_Container

SolidWorks Container.

enumerator A3DEProductOccurrenceTypeSLW_Part

SolidWorks Part.

enumerator A3DEProductOccurrenceTypeSLW_Assembly

SolidWorks Assembly.

enumerator A3DEProductOccurrenceTypeSLW_Drawing

SolidWorks 2D Drawing.

enumerator A3DEProductOccurrenceTypeSLW_Unknown

Unknown Solidworks type.

enumerator A3DEProductOccurrenceTypeSLW_PartTesselated

SolidWorks Part with tessellation.

enumerator A3DEProductOccurrenceTypeSLW_AssemblyTesselated

SolidWorks Assembly with tessellation.

enumerator A3DEProductOccurrenceTypeSLW_StandalonePart

SolidWorks Stand-alone Part.

enum A3DELayerDisplayStatus

Layer display status.

Version

24.5

Values:

enumerator kA3DLayerDisplayShow

Shown layer, the elements referenced by this layer are shown (note: other layers can change the visibility of these elements, it can depend of the behavior of each CAD software program).

enumerator kA3DLayerDisplayHide

Hidden layer, the elements referenced by this layer are hidden (note: other layers can change the visibility of these elements, it can depend of the behavior of each CAD software program).

enumerator kA3DLayerDisplayIsolate

Isolated layer, it means only the layers with this status are shown.

enumerator kA3DLayerDisplayUnknown

Layer display status unknown.

Function Documentation

A3DStatus A3DAsmProductOccurrenceGet(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrenceData *pData)

Populates the A3DAsmProductOccurrenceData structure.

Version

2.0

Sample code

A3DInt32 iErr = A3D_SUCCESS;
A3DAsmProductOccurrence pOccurrence = NULL;

/* Should call something here in order to get a valid A3DAsmProductOccurrence */

A3DAsmProductOccurrenceData sData;
A3D_INITIALIZE_DATA(sData);
iErr = A3DAsmProductOccurrenceGet( pOccurrence , &sData );
if ( iErr == A3D_SUCCESS )
{
    /* Insert here your own code to parse through members of ProductOccurrence */
    iErr = A3DAsmProductOccurrenceGet( NULL, &sData );
}

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceCreate(const A3DAsmProductOccurrenceData *pData, A3DAsmProductOccurrence **ppProductOccurrence)

Creates an A3DAsmProductOccurrence from A3DAsmProductOccurrenceData structure.

Version

2.0

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 A3DAsmProductOccurrenceSetProductPrototype(A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrence *pProductPrototype)

Sets up an A3DAsmProductOccurrence entity as a prototype to another A3DAsmProductOccurrence entity.

This function sets an A3DAsmProductOccurrence entity as a prototype to another A3DAsmProductOccurrence entity, and duplicates the A3DAsmProductOccurrenceData structure.

Version

2.0

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

Warning

doxygenfunction: Unable to resolve function “A3D_API_DEPRECATED” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name. [error at 53] A3D_API_DEPRECATED (A3DStatus, A3DGetCurveAsAnalytic,(const A3DCrvBase *pCurve, double dTol, A3DCrvBase **pAnalyticCurve, A3DEAnalyticType *peAnalyticType)) —————————————————–^ If the function has a return type: Error in declarator If declarator-id with parameters-and-qualifiers: Invalid C++ declaration: Expected identifier in nested name. [error at 19] A3D_API_DEPRECATED (A3DStatus, A3DGetCurveAsAnalytic,(const A3DCrvBase *pCurve, double dTol, A3DCrvBase **pAnalyticCurve, A3DEAnalyticType *peAnalyticType)) ——————-^ If parenthesis in noptr-declarator: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DGetCurveAsAnalytic,(const A3DCrvBase *pCurve, double dTol, A3DCrvBase **pAnalyticCurve, A3DEAnalyticType *peAnalyticType)) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DGetCurveAsAnalytic,(const A3DCrvBase *pCurve, double dTol, A3DCrvBase **pAnalyticCurve, A3DEAnalyticType *peAnalyticType)) —————————–^

A3DStatus A3DAsmProductOccurrenceGetFilePathName(const A3DAsmProductOccurrence *pProductOccurrence, A3DUTF8Char **ppcFileName)

Returns the full path name of the file associated with the product occurrence.

Version

4.0

Warning

Using this function on a product occurrence holding a prototype is not recommended, as the result is influenced by how the data is originally stored in the CAD file.

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 A3DAsmProductOccurrenceGetOriginalFilePathName(const A3DAsmProductOccurrence *pProductOccurrence, A3DUTF8Char **ppcFileName)

Returns the original file name stored in the CAD file.

Version

8.2

Warning

Using this function on a product occurrence holding a prototype is not recommended, as the result is influenced by how the data is originally stored in the CAD file.

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 A3DAsmProductOccurrenceAddView(A3DAsmProductOccurrence *pProductOccurrence, A3DMkpView *pView)

Adds a view in the Array of views.

Version

4.1

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 A3DAsmProductOccurrenceEdit(const A3DAsmProductOccurrenceData *pData, A3DAsmProductOccurrence *pProductOccurrence)

Allows to modify some data of a product occurrence.

These fields from A3DAsmProductOccurrenceData are not supported and ignored:

  • m_eProductLoadStatus

  • m_uiProductFlags

  • m_bUnitFromCAD

  • m_dDensityVolumeUnit

  • m_dDensityMassUnit

  • m_eModellerType

  • m_bInactivateAnnotations

  • m_uiConstraintsSize

  • m_pPublicationSet

  • m_ppConstraints

The m_dUnit field from A3DAsmProductOccurrenceData is supported only for these formats:

  • CATIA V4

  • CATIA V5

  • Creo - Pro/E

  • NX

  • STEP

  • U3D

Version

5.1

Warning

This function must not be applied within a HOOPS Visualize context. See Quickstart.

Return values:
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceDeepCopy(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrence **ppNewProductOccurrence)

Creates a new product occurrence by making a deep copy of the data.

The Copy can be processed on a member of an assembly at different levels. Here an assembly sample and the several copied product added.

The deep copy will copied all the data and create new part, for the new instances.

../_images/po_deep_copy_asm.jpg

The prototype mechanism is still present after the copy to assure the possibility to distinguish instances.

Due to his position in the tree the product occurrence of a part can reach its part definition by traversing multiple prototype. It’s the case of the product A/B1/C1/D1.

../_images/po_deep_copy_tree.jpg

After the deep clone, only last prototype is necessary,

All intermediate prototypes are removed and possible redefinition (color,

) or data (attributes) are moved to the new product member.../_images/po_deep_copy_tree_member.jpg

A/B1/C1/D1 -> B/C1/D1 -> C/D1 -> D
Becomes
Copy A/B1/C1/D1 + intermediate properties -> Copy D

Version

11.2

Return values:
  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_ERROR

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetFather(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrence **ppProductOccurrenceFather)

Get the father of a product occurrence.

The father is NULL for root product occurrences and root prototypes (i.e. prototypes with no prototype). For external data the father is the “member” product occurrence that targets it.

Version

13.0

Return values:
  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_ERROR

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetSLW(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrenceDataSLW *pData)

Populates the A3DAsmProductOccurrenceDataSLW structure.

Version

8.2

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetCat(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrenceDataCat *pData)

Populates the A3DAsmProductOccurrenceDataCat structure.

Version

8.2

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetCV5(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrenceDataCV5 *pData)

Populates the A3DAsmProductOccurrenceDataCV5 structure.

Version

8.2

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetUg(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrenceDataUg *pData)

Populates the A3DAsmProductOccurrenceDataUg structure.

Version

8.2

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetProe(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrenceDataProe *pData)

Populates the A3DAsmProductOccurrenceDataProe structure.

Version

8.2

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetInv(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrenceDataInv *pData)

Populates the A3DAsmProductOccurrenceDataInv structure.

Version

8.2

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetJT(const A3DAsmProductOccurrence *pProductOccurrence, A3DAsmProductOccurrenceDataJT *pData)

Populates the A3DAsmProductOccurrenceDataJT structure.

Version

8.2

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetLayerList(const A3DAsmProductOccurrence *pProductOccurrence, A3DUns32 *piLayers, A3DAsmLayer **ppLayerArray)

Allow to get the layer name of an item from his layer defined by A3DMiscCascadedAttributesData::m_usLayer.

Version

11.1

Return values:
  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DAsmProductOccurrenceGetIdentifier(const A3DAsmProductOccurrence *pProductOccurrence, A3DUTF8Char **ppcIdentifier)

Combine Part ID and Occurrence identifier.

Version

9.1

Return values:
  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure