Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2023.
Loading...
Searching...
No Matches
SCADUtil Namespace Reference

Provide CAD objects edition and utility methods. More...

Functions

Object Convert (SFeature feature)
 Convert a feature into a CAD object. More...
 
Object Discretize (SShape shape)
 Convert the SShape into a discretized SPoly and a discretized SMultiline. More...
 
Object Export (string filename, Array< SShape > compTable, SMatrix coordinateSystemMatrix=SMatrix())
 Export a table of CAD objects in a IGES or STEP file. More...
 
Object Import (string filename)
 Import a IGES or STEP file into a CAD object. More...
 

Detailed Description

Provide CAD objects edition and utility methods.

Function Documentation

◆ Convert()

Object SCADUtil::Convert ( SFeature  feature)

Convert a feature into a CAD object.

License
This function requires the license AEC.
Parameters
feature(SFeature) The feature to convert
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: An error occurred
ret.Shape(SShape) The converted CAD object.

◆ Discretize()

Object SCADUtil::Discretize ( SShape  shape)

Convert the SShape into a discretized SPoly and a discretized SMultiline.

License
This function requires the license AEC.
Parameters
shape(SShape) The SShape to be discretized
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: An error occurred
ret.Poly(SPoly) The discretized SPoly
ret.MultiTbl(Array<SMultiline>) The array of discretized SMultiline

◆ Export()

Object SCADUtil::Export ( string  filename,
Array< SShape compTable,
SMatrix  coordinateSystemMatrix = SMatrix() 
)

Export a table of CAD objects in a IGES or STEP file.

Parameters
filename(string) The IGES or STEP filename
compTable(Array<SShape>) The table of CAD objects to export
coordinateSystemMatrix(SMatrix) The matrix to define a UCS used for the export (or identity to use the WCS)
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: Not a IGES or STEP file name
  • 2: Not all the CAD objects can be saved
  • 3: An error occurred while saving the file

◆ Import()

Object SCADUtil::Import ( string  filename)

Import a IGES or STEP file into a CAD object.

Warning
When you write a '\' in string you need to double it '\\' or use '/' instead. Pay especially attention to this when writing file paths in your scripts.
var path = 'C:/Point.asc'; // valid syntax
var path = 'C:\\Point.asc'; // valid syntax
var path = 'C:\Point.asc'; // invalid syntax
Parameters
filename(string) The IGES or STEP filename
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: Not a IGES or STEP file name
  • 2: Failed to retrieve the file
  • 3: An error occurred while loading the file
  • 4: A general error occurred
ret.Shape(SShape) The imported CAD object.