DATAKIT API  V2025.4
sw::sww Namespace Reference

Data Structures

class  FileDescription
 This class provides several informations about a Solidworks File.
It can be used with sw::OpenPart and OpenAssembly functions to specify file properties. More...
 
class  Instance
 This class provides Instance about a Solidworks File.
It can be used with sw::sww::OpenAssembly functions to Add Instance. More...
 

Enumerations

enum  language {
  french = 0, english = 1, italian = 2, deutch = 3,
  chinese = 4
}
 

Functions

Dtk_ErrorStatus AddEntity (const Dtk_EntityPtr &inEntity)
 Write the entity provided in parameter. More...
 
Dtk_ErrorStatus AddInstanceComponent (Instance &inInstance)
 Add an instance into the Current Assembly (sldasm). More...
 
Dtk_ErrorStatus AddMetaData (const Dtk_MetaDataPtr &inEntity)
 
Dtk_ErrorStatus AddParasolidBodyStream (const char *inFlux, size_t inSize, const Dtk_InfoPtr &inInfo)
 Add parasolid stream with only one body without header. More...
 
Dtk_ErrorStatus AddParasolidFile (const Dtk_string &inParasolidFile)
 Add parasolid file. More...
 
Dtk_ErrorStatus AddParasolidId (const Dtk_Int32 &inParasolidId)
 Add parasolid Id body. More...
 
Dtk_ErrorStatus CloseAssembly ()
 Write effectively the Assembly initialized by OpenAssembly. More...
 
Dtk_ErrorStatus ClosePart ()
 Free data allocated by sw::sww::OpenPart
More...
 
Dtk_ErrorStatus EndWriter ()
 Free the Solidworks Writer
More...
 
Dtk_ErrorStatus InitWriter (const Dtk_string &inLogFile, Licence_dtk inLicFct, sw::sww::language inLanguage=sw::sww::english)
 Initialize the Solidworks Writer
More...
 
Dtk_ErrorStatus OpenAssembly (const Dtk_string &inFileName, const sw::sww::FileDescription &inFileDescription=sw::sww::FileDescription(), Dtk_Unit inUnit=DTK_UNIT_MM, const Dtk_string &inConfigurationName=Dtk_string())
 Initialize a Assembly . More...
 
Dtk_ErrorStatus OpenPart (const Dtk_string &inSolidworksFile, const sw::sww::FileDescription &inFileDescription=sw::sww::FileDescription(), Dtk_Unit inUnit=DTK_UNIT_MM, const Dtk_string &inConfigurationName=Dtk_string())
 Initialize the part
More...
 
void OptionRemoveComment (Dtk_Int32 inRemoveComment)
 option to not store the comment More...
 
void OptionStoreBodyColor (Dtk_Int32 inStoreBodyColor)
 option to store the body color More...
 
void SetIsAlreadyStart (const Dtk_Int32 &inStop)
 ONLY for PSKERNEL user. More...
 

Enumeration Type Documentation

◆ language

Enumerator
french 
english 
italian 
deutch 
chinese 

Function Documentation

◆ AddEntity()

Dtk_ErrorStatus sw::sww::AddEntity ( const Dtk_EntityPtr inEntity)

Write the entity provided in parameter.

Parameters
[in]inEntity: The Entity to be written
Returns
dtkNoError if it is OK.
Remarks
This function is used to write entities .

◆ AddInstanceComponent()

Dtk_ErrorStatus sw::sww::AddInstanceComponent ( Instance inInstance)

Add an instance into the Current Assembly (sldasm).

Parameters
[in]inInstance: Instance definitionwith (Full path name , instance name and position.
Returns
dtkNoError if it is OK.

◆ AddMetaData()

Dtk_ErrorStatus sw::sww::AddMetaData ( const Dtk_MetaDataPtr inEntity)

◆ AddParasolidBodyStream()

Dtk_ErrorStatus sw::sww::AddParasolidBodyStream ( const char *  inFlux,
size_t  inSize,
const Dtk_InfoPtr inInfo 
)

Add parasolid stream with only one body without header.

Parameters
[in]inFlux: parasolid flux from one body
[in]inSize: size of inFlux
[in]inInfo: info for body

◆ AddParasolidFile()

Dtk_ErrorStatus sw::sww::AddParasolidFile ( const Dtk_string inParasolidFile)

Add parasolid file.

Parameters
[in]inParasolidFile: Name of the Parasolid File to be added.
Remarks
only work with pskernel writer.

◆ AddParasolidId()

Dtk_ErrorStatus sw::sww::AddParasolidId ( const Dtk_Int32 inParasolidId)

Add parasolid Id body.

Parameters
[in]inParasolidId: Id of the Parasolid body to be added.
Remarks
only work with pskernel writer.

◆ CloseAssembly()

Dtk_ErrorStatus sw::sww::CloseAssembly ( )

Write effectively the Assembly initialized by OpenAssembly.

Returns
dtkNoError if it is OK.

◆ ClosePart()

Dtk_ErrorStatus sw::sww::ClosePart ( )

Free data allocated by sw::sww::OpenPart

Returns
dtkNoError if it is OK.
Remarks
used at the end of conversion.

◆ EndWriter()

Dtk_ErrorStatus sw::sww::EndWriter ( )

Free the Solidworks Writer

Returns
dtkNoError if it is OK.
Remarks
used at the last function used for the writer.

◆ InitWriter()

Dtk_ErrorStatus sw::sww::InitWriter ( const Dtk_string inLogFile,
Licence_dtk  inLicFct,
sw::sww::language  inLanguage = sw::sww::english 
)

Initialize the Solidworks Writer

Returns
dtkNoError if it is OK.
Remarks
This is the first function called for the writer.
Parameters
[in]inLogFile: Log file
[in]inLicFct: Licence fuction or Null
[in]inLanguage: by default sw::sww::english

◆ OpenAssembly()

Dtk_ErrorStatus sw::sww::OpenAssembly ( const Dtk_string inFileName,
const sw::sww::FileDescription inFileDescription = sw::sww::FileDescription(),
Dtk_Unit  inUnit = DTK_UNIT_MM,
const Dtk_string inConfigurationName = Dtk_string() 
)

Initialize a Assembly .

Parameters
[in]inFileName: Name of the Solidworks Assembly (sldasm) file to be written.
[in]inConfigurationName: Name of the configuration of the Solidworks Assembly (sldasm) file to be written.
[in]inFileDescription: Description File
Returns
dtkNoError if it is OK.
Remarks
The given path into inFileName must exist and you must have write permission in this folder.

◆ OpenPart()

Dtk_ErrorStatus sw::sww::OpenPart ( const Dtk_string inSolidworksFile,
const sw::sww::FileDescription inFileDescription = sw::sww::FileDescription(),
Dtk_Unit  inUnit = DTK_UNIT_MM,
const Dtk_string inConfigurationName = Dtk_string() 
)

Initialize the part

Remarks
used at the beginning of conversion.
Parameters
[in]inOutputFile: Name of the Solidworks Part (sldprt) file to be Written.
[in]inFileDescription: Description File
[in]inConfigurationName: Name of the Configuration of the Solidworks Part (sldprt) file to be Written.
Remarks
The given path into inOutputFile must exist and you must have write permission in this folder.

◆ OptionRemoveComment()

void sw::sww::OptionRemoveComment ( Dtk_Int32  inRemoveComment)

option to not store the comment

Parameters
[in]inRemoveComment: used DTK_TRUE for not removing comment
Remarks
used after InitWriter

◆ OptionStoreBodyColor()

void sw::sww::OptionStoreBodyColor ( Dtk_Int32  inStoreBodyColor)

option to store the body color

Parameters
[in]inStoreBodyColor: used DTK_TRUE for enabled
Remarks
used after InitWriter

◆ SetIsAlreadyStart()

void sw::sww::SetIsAlreadyStart ( const Dtk_Int32 inStop)

ONLY for PSKERNEL user.

Returns
dtkNoError if it is OK.
Remarks
Informs that the session is started
Parameters
[in]inStop: set -1 after StartParasolid