Product Attributes

The product data transferred through the converter includes:

  • Information about a component: type (part or assembly unit), identifier, name, and comment.

  • Visual properties, material properties, and elementary attributes.

  • Information about an author and an organization.

This information is transferred by means of MbProductInfo and MbPersonOrganizationInfo attributes and any elementary attributes (MbElementaryAttribute) respectively.

MbProductInfo Component Information

The MbProductInfo class must be assigned to a MbItem model element that should be marked as a component, or to a model element of type MbInstance when the name, designation, or comment of the instance differs from the corresponding data of the used component.

The main constructor of the MbProductInfo class has the following signature:

MbProcuctInfo( const c3d::string_t & initId,
               const c3d::string_t & initName,
               const c3d::string_t & initDesc,
                     bool            isAssm );

The initId argument is used to pass the component identifier (designation), initName is the component name, initDesc is the comment, and isAssm is a flag indicating whether the component is an assembly unit.

The main way to obtain string data about a product is to call the method

void GetData( c3d::string_t & oId,
              c3d::string_t & oName,
              c3d::string_t & oDesc ) const;

The input parameters oId, oName, and oDesc are used to return the identifier, the name, and the comment respectively.

To obtain information on whether a component is an assembly unit, use the method

bool IsAssembly() const;

The MbProductInfo class also contains methods that take strings of type std::string. These methods perform conversions using the c3d::ToSTDstring() and c3d::ToC3Dstring() functions.

The MbProductInfo class contains the following constructor:

MbProductInfo(       bool          isAssm,
               const std::string & initId,
               const std::string & initName,
               const std::string & initDesc );

Information about a product is obtained using the method

void GetDataStd( std::string & oId,
                 std::string & oName,
                 std::string & oDesc ) const.