API Reference > Functions > getDrawableShapeRepresentation Function
getDrawableShapeRepresentation Function
Syntax
C++
IFCCORE_EXPORT OdResult getDrawableShapeRepresentation(const OdArray<OdGiDrawablePtr>& entities, const OdDAIObjectId& subContextId, OdDAI::Model* pModel, OdDAIObjectId& shapeId, int shapeType);

IfcCore.h

Parameters 
Description 
const OdArray<OdGiDrawablePtr>& entities 
[in] An array of entities, which will be converted in the OdIfcShapeRepresentation object.  
const OdDAIObjectId& subContextId 
[in] An identifier of the sub-context object to which the shape representation will be added.  
OdDAI::Model* pModel 
[in] A raw pointer to the instance of the OdIfcModel class that represents the current model of the file.  
OdDAIObjectId& shapeId 
[out] A placeholder for the identifier of the created shape representation object.  

eOk if the shape representation object was successfully created; otherwise, the function returns an appropriate error code.

Creates shape representations for each provided GiDrawable entity and returns the array of identifiers for every newly created shape representation to the calling subroutine. Every newly created shape representation is assigned to a specified representation context.

The method sets identifier values of created shape representations, adds them into the provided identifiers array, and returns it to a calling subroutine.

Copyright (c) 2002-2021. Open Design Alliance. All rights reserved.