DATAKIT API  V2025.4
sw::sww::Instance Class Reference

This class provides Instance about a Solidworks File.
It can be used with sw::sww::OpenAssembly functions to Add Instance. More...

Public Member Functions

void AddMetadata (const Dtk_tab< Dtk_MetaDataPtr > &inArrayMetadata)
 
const Dtk_Int32GetBlankedStatus ()
 
const Dtk_RGBGetColor ()
 
const Dtk_stringGetConfigurationName ()
 
const Dtk_stringGetInstanceName ()
 
const Dtk_transfoGetMatrix ()
 
const Dtk_tab< Dtk_MetaDataPtr > & GetMetadata ()
 
const Dtk_stringGetName ()
 
 Instance ()
 Default constructor. More...
 
 Instance (const Dtk_string &inSolidfileName, const Dtk_string &inInstanceName, const Dtk_transfo &inTransfo, const Dtk_RGB &inColorInstance=Dtk_RGB(-1, -1, -1, -1), const Dtk_Int32 &inBlankedStatus=DTK_FALSE, const Dtk_string &inConfigurationName=Dtk_string())
 Default constructor. More...
 
 ~Instance ()
 Destructor. More...
 

Protected Attributes

Dtk_Int32 _BlankedStatus
 
Dtk_RGB _Color
 
Dtk_string _ConfigurationName
 
Dtk_string _InstanceName
 
Dtk_transfo _Matrix
 
Dtk_string _Name
 
Dtk_tab< Dtk_MetaDataPtrm_ArrayMetadata
 

Detailed Description

This class provides Instance about a Solidworks File.
It can be used with sw::sww::OpenAssembly functions to Add Instance.

//...
soldiworksw::Instance instance;
Dtk_ErrorStatus dtkerror;
dtkerror = sw::sww::AddInstance( instance);
//...

Constructor & Destructor Documentation

◆ Instance() [1/2]

sw::sww::Instance::Instance ( )

Default constructor.

110  {
111  _Color = Dtk_RGB( -1, -1, -1, -1 );
113  }

◆ ~Instance()

sw::sww::Instance::~Instance ( )

Destructor.

117  {
118  }

◆ Instance() [2/2]

sw::sww::Instance::Instance ( const Dtk_string inSolidfileName,
const Dtk_string inInstanceName,
const Dtk_transfo inTransfo,
const Dtk_RGB inColorInstance = Dtk_RGB( -1, -1, -1, -1 ),
const Dtk_Int32 inBlankedStatus = DTK_FALSE,
const Dtk_string inConfigurationName = Dtk_string() 
)

Default constructor.

121  :
122  _Name( inSolidfileName ), _InstanceName( inInstanceName ), _Matrix( inTransfo ), _Color( inColorInstance ), _BlankedStatus( inBlankedStatus ), _ConfigurationName( inConfigurationName )
123  {
124 
125  };

Member Function Documentation

◆ AddMetadata()

void sw::sww::Instance::AddMetadata ( const Dtk_tab< Dtk_MetaDataPtr > &  inArrayMetadata)
158  {
159  m_ArrayMetadata = inArrayMetadata;
160  };

◆ GetBlankedStatus()

const Dtk_Int32& sw::sww::Instance::GetBlankedStatus ( )
153  {
154  return _BlankedStatus;
155  };

◆ GetColor()

const Dtk_RGB& sw::sww::Instance::GetColor ( )
148  {
149  return _Color;
150  };

◆ GetConfigurationName()

const Dtk_string& sw::sww::Instance::GetConfigurationName ( )
138  {
139  return _ConfigurationName;
140  };

◆ GetInstanceName()

const Dtk_string& sw::sww::Instance::GetInstanceName ( )
133  {
134  return _InstanceName;
135  };

◆ GetMatrix()

const Dtk_transfo& sw::sww::Instance::GetMatrix ( )
143  {
144  return _Matrix;
145  };

◆ GetMetadata()

const Dtk_tab<Dtk_MetaDataPtr>& sw::sww::Instance::GetMetadata ( )
163  {
164  return m_ArrayMetadata;
165  };

◆ GetName()

const Dtk_string& sw::sww::Instance::GetName ( )
128  {
129  return _Name;
130  };

Field Documentation

◆ _BlankedStatus

Dtk_Int32 sw::sww::Instance::_BlankedStatus
protected

◆ _Color

Dtk_RGB sw::sww::Instance::_Color
protected

◆ _ConfigurationName

Dtk_string sw::sww::Instance::_ConfigurationName
protected

◆ _InstanceName

Dtk_string sw::sww::Instance::_InstanceName
protected

◆ _Matrix

Dtk_transfo sw::sww::Instance::_Matrix
protected

◆ _Name

Dtk_string sw::sww::Instance::_Name
protected

◆ m_ArrayMetadata

Dtk_tab<Dtk_MetaDataPtr> sw::sww::Instance::m_ArrayMetadata
protected
catiav5w::inTransfo
const Dtk_string const Dtk_transfo & inTransfo
Definition: catiav5w.hpp:622
sw::sww::Instance::_ConfigurationName
Dtk_string _ConfigurationName
Definition: solidworksw.hpp:101
DTK_FALSE
#define DTK_FALSE
Definition: define.h:730
catiav5w::inBlankedStatus
const Dtk_string const Dtk_transfo const Dtk_bool inBlankedStatus
Definition: catiav5w.hpp:623
sw::sww::Instance::_Matrix
Dtk_transfo _Matrix
Definition: solidworksw.hpp:102
sw::sww::Instance::m_ArrayMetadata
Dtk_tab< Dtk_MetaDataPtr > m_ArrayMetadata
Definition: solidworksw.hpp:105
sw::sww::Instance::_BlankedStatus
Dtk_Int32 _BlankedStatus
Definition: solidworksw.hpp:104
catiav5w::AddInstance
Dtk_ErrorStatus AddInstance(const Dtk_ID &inDocId, const Dtk_string &inInstanceName, const Dtk_transfo &inTransfo, Dtk_ID &outInstanceId)
Add an instance to a DocID into the Current (Sub/Root) CATProduct.
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
sw::sww::Instance::_InstanceName
Dtk_string _InstanceName
Definition: solidworksw.hpp:100
sw::sww::Instance::_Name
Dtk_string _Name
Definition: solidworksw.hpp:99
catiav5w::inInstanceName
const Dtk_string & inInstanceName
Definition: catiav5w.hpp:621
Dtk_RGB
Definition: dtk_rgb.hpp:7
sw::sww::Instance::_Color
Dtk_RGB _Color
Definition: solidworksw.hpp:103