getProjectUnitConversionFactor

This function will return the conversion factor compared to the base SI unit. The possible unitType values are all enumeration values from enumeration type IfcUnitEnum. For example getProjectUnitConversionFactor(model, "LENGTHUNIT") returns 0.001 in case of MilliMeters. Optional arguments unitPrefix (for example "MILLI"), unitName (if defined) and SIUnitName (for example "METRE") can be requested.

Syntax

//
//   Strong typing definition
//
double                      getProjectUnitConversionFactor(
                                    SdaiModel               model,
                                    SdaiString              unitType,
                                    SdaiString              * unitPrefix,
                                    SdaiString              * unitName,
                                    SdaiString              * SIUnitName
                                );

static  inline  double  getProjectUnitConversionFactor(
                                SdaiModel               model,
                                char                    * unitType,
                                char                    ** unitPrefix,
                                char                    ** unitName,
                                char                    ** SIUnitName
                            )
{
    return  getProjectUnitConversionFactor(
                    model,
                    (SdaiString) unitType,
                    (SdaiString*) unitPrefix,
                    (SdaiString*) unitName,
                    (SdaiString*) SIUnitName
                );
}

static  inline  double  getProjectUnitConversionFactor(
                                SdaiModel               model,
                                SdaiString              unitType
                            )
{
    return  getProjectUnitConversionFactor(
                    model,
                    unitType,
                    (SdaiString*) nullptr,              //    unitPrefix
                    (SdaiString*) nullptr,              //    unitName
                    (SdaiString*) nullptr               //    SIUnitName
                );
}

static  inline  double  getProjectUnitConversionFactor(
                                SdaiModel               model,
                                char                    * unitType
                            )
{
    return  getProjectUnitConversionFactor(
                    model,
                    (SdaiString) unitType
                );
}


//
//   Weak typing definition
//
double  __declspec(dllexport) __stdcall getProjectUnitConversionFactor(
                                                int_t                   model,
                                                const char              * unitType,
                                                const char              ** unitPrefix,
                                                const char              ** unitName,
                                                const char              ** SIUnitName
                                            );

static  inline  double  getProjectUnitConversionFactor(
                                int_t                   model,
                                char                    * unitType,
                                char                    ** unitPrefix,
                                char                    ** unitName,
                                char                    ** SIUnitName
                            )
{
    return  getProjectUnitConversionFactor(
                    model,
                    (const SdaiString) unitType,
                    (const SdaiString*) unitPrefix,
                    (const SdaiString*) unitName,
                    (const SdaiString*) SIUnitName
                );
}

static  inline  double  getProjectUnitConversionFactor(
                                int_t                   model,
                                const char              * unitType
                            )
{
    return  getProjectUnitConversionFactor(
                    model,
                    unitType,
                    (const SdaiString*) nullptr,        //    unitPrefix
                    (const SdaiString*) nullptr,        //    unitName
                    (const SdaiString*) nullptr         //    SIUnitName
                );
}

static  inline  double  getProjectUnitConversionFactor(
                                int_t                   model,
                                char                    * unitType
                            )
{
    return  getProjectUnitConversionFactor(
                    model,
                    (const SdaiString) unitType
                );
}
    

Property model

Size: 32 bit / 4 byte (value)
The handle to the model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.

Property unitType

Size: 32 bit / 4 byte (reference)
...

Property unitPrefix

Size: 32 bit / 4 byte (reference)
???.

Property unitName

Size: 32 bit / 4 byte (reference)
???.

Property SIUnitName

Size: 32 bit / 4 byte (reference)
???.