pycatia.drafting_interfaces.drawing_dimension

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.drafting_interfaces.drawing_dimension.DrawingDimension(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
DrawingDimension

Represents a drawing dimension in a Drawing view.

Returns sub parts of dimension: Extension lines, dimension line and dimension
value.
property cumulate_mode: bool

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property CumulateMode() As boolean (Read Only)

Returns cumulate mode or not.

Example:
This example retrieves cumulate mode or not MyDimension drawing
dimension.

oCumulateMode = MyDimension.CumulateMode
Return type:

bool

property dim_status: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property DimStatus() As CatDimAnalyse (Read Only)

Returns or sets status of dimension.

Example:
This example retrieves status of dimension MyDimension drawing
dimension.

oIsStatus = MyDimension.DimStatus
Returns:

enum cat_dim_analyse

Return type:

int

property dim_type: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property DimType() As CatDimType (Read Only)

Returns dimension type.

Example:
This example retrieves the dimension type MyDimension drawing
dimension.

oTypeDim = MyDimension.DimType
Returns:

enum cat_dim_type

Return type:

int

property dual_value: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property DualValue() As CatDimDualDisplay

Returns or sets dual value type of dimension value.

Example:
This example retrieves dual value type of dimension value MyDimension
drawing dimension.

oDualValue = MyDimension.DualValue
Returns:

enum cat_dim_dual_display

Return type:

int

property forshortened: bool

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Forshortened() As boolean

Returns or sets foreshortened mode or not.

Example:
This example retrieves foreshortened mode or not MyDimension drawing
dimension.

oForsh = MyDimension.Forshortened
Return type:

bool

get_boundary_box() tuple

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetBoundaryBox(CATSafeArrayVariant oValues)

Get boundary box coordinates of dimension value.

Parameters:

oValues
List of boundary box coordinates (X1,Y1,X2,Y2,…..X4,Y4).

Example:
This example gets boundary box coordinates of MyDimension
path.

MyDimension.GetBoundaryBox(oValues)
Return type:

tuple

get_clip() tuple[float, float, int]

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetClip(double X,
double Y,
long oKeptSide)

Gets informations of the dimension clipping. The value of this parameter
can be 1 or 2, and the kept side will be the one corresponding respectively to
ptldc1 and ptldc2 from GetGeomInfo method defined in CATIADrawingDimensionLine
idl interface. interface. If iKeptSide==0, there is no dimension
clipping.

Parameters:

oX
X coordinate of position.
oY
Y coordinate of position.
oKeptSide
returns the part of the dimension line will be clipped.

Example:

if MyDimension.IsClipped then
MyDimension.GetClip(X, Y, keptSide)
end if
Returns:

tuple[float, float, int]

Return type:

tuple

get_dim_ext_line() DrawingDimExtLine

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetDimExtLine() As DrawingDimExtLine

Returns the drawing extension line of the drawing
dimension.

Example:
This example retrieves in DimExtLine extension line of the MyDimension
drawing dimension.

Dim DimExtLine As DrawingDimExtLine
Set DimExtLine = MyDimension.GetDimExtLine


See also:
DrawingDimLine
Return type:

DrawingDimExtLine

get_dim_line() DrawingDimLine

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetDimLine() As DrawingDimLine

Returns the drawing dimension line of the drawing
dimension.

Example:
This example retrieves in DimDimLine dimension line of the MyDimension
drawing dimension.

Dim DimDimLine As DrawingDimLine
Set DimDimLine = MyDimension.GetDimLine


See also:
DrawingDimLine
Return type:

DrawingDimLine

get_tolerances() tuple[int, str, str, str, float, float, int]

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetTolerances(long oTolType,
CATBSTR oTolName,
CATBSTR oUpTol,
CATBSTR oLowTol,
double odUpTol,
double odLowTol,
long oDisplayMode)

Get tolerance information of dimension value.

Parameters:

oTolType
Tolerance type
oTolName
Tolerance name
oUpTol
Upper tolerance value (alpha numerical type)
oLowTol
Lower tolerance value (alpha numerical type)
odUpTol
Upper tolerance value (numerical type)
odLowTol
Lower tolerance value (numerical type)
oDisplayMode
Tolerance display mode
Example:
This example gets tolerance information of MyDimension
path.

MyDimension.GetTolerances(oTolType, oTolName, oUpTol, oLowTol,
odUpTol, odLowTol, oDisplayMode)
Returns:

tuple(int, str, str, str, float, float, int)

Return type:

tuple

get_value() DrawingDimValue

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetValue() As DrawingDimValue

Returns the drawing value of the drawing dimension.

Example:
This example retrieves in DimDimValue value of the MyDimension drawing
dimension.

Dim DimDimValue As DrawingDimValue
Set DimDimValue = MyDimension.GetValue


See also:
DrawingDimValue
Return type:

DrawingDimValue

property half_dim_mode: bool

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property HalfDimMode() As boolean

Returns or sets half dimension mode or not.

Example:
This example retrieves half dimension mode or not MyDimension drawing
dimension.

oHalfDimMode = MyDimension.HalfDimMode
Return type:

bool

property is_clipped: bool

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property IsClipped() As boolean (Read Only)

Returns the clipping status of the dimension. Returns TRUE if the dimension
si clipped
Example:
This example gets clipping status of MyDimension path.

myDimensionClippingStatus=MyDimension.IsClipped
Return type:

bool

move_value(x: float, y: float, sub_part: int, dim_angle_behavior: int) None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub MoveValue(double X,
double Y,
long SubPart,
long DimAngleBehavior)

Move dimension value.

Parameters:

X
X coordinate of position.
Y
Y coordinate of position.
SubPart
Defines which part of the dimension should be
moved.
-1 = Value (vertical move is take account according ptPos coordinates)
0 = Both dimension line and value
1 = Value
2 = Dimension line
3 = Secondary part
4 = Secondary part and value
5 = Secondary part and dimension line
6 = Secondary part, dimension line and value
7 = Value leader (for dimension line with leader one part or two parts)
DimAngleBehavior
Defines angle dimension line behavior.
0 = Sector angle is switched when ptPos is in opposite sector (Default)
1 = Sector angle is kept what ever ptPos placement
Example:
This example move dimension value MyDimension
path.

MyDimension.MoveValue(X, Y, SubPart,
DimAngleBehavior)
Parameters:
  • x (float) –

  • y (float) –

  • sub_part (int) –

  • dim_angle_behavior (int) –

Return type:

None

property nb_ext_line: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property NbExtLine() As long (Read Only)

Returns numbers of extension line of dimension.

Example:
This example retrieves numbers of extension line of dimension
MyDimension drawing dimension.

oNbExtline = MyDimension.NbExtLine
Return type:

int

property nb_symb: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property NbSymb() As long (Read Only)

Returns numbers of symbol of dimension.

Example:
This example retrieves numbers of symbol of dimension MyDimension
drawing dimension.

oNbSymb = MyDimension.NbSymb
Return type:

int

property parameters: Parameters

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Parameters() As Parameters (Read Only)

Returns the collection of parameters of the dimension.
Warning: The returned parameters collection does not support adding
parameters, it is mainly provided to access dimension
value.

Example:

This example retrieves in DimensionParameters the collection
of
parameters currently managed by a dimension.


Dim DimensionParameters As Parameters
Set DimensionParameters = MyDimension.Parameters
Dim DimValueParameter As Parameter
Set DimValueParameter = DimensionParameters.Item(“Measured length”)
Return type:

Parameters

restore_value_position() None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub RestoreValuePosition()

Restore dimension value position.
Example:
This example gets Restore dimension value position of MyDimension
path.

MyDimension.RestoreValuePosition()
Return type:

None

set_clip(x: float, y: float, i_kept_side: int) None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetClip(double X,
double Y,
long iKeptSide)

Creates a clip on the dimension at the given point, with respect to the
side given by iKeptSide. The value of this parameter can be 1 or 2, and the
kept side will be the one corresponding respectively to ptldc1 and ptldc2 from
GetGeomInfo method defined in CATIADrawingDimensionLine idl interface.
interface.

Parameters:

iX
X coordinate of position.
iY
Y coordinate of position.
iKeptSide
Defines which part of the dimension should be kept.

Example:
This example clips dimension MyDimension path.

MyDimension.SetClip(X, Y, 1)
Parameters:
  • x (float) –

  • y (float) –

  • i_kept_side (int) –

Return type:

None

set_tolerances(i_tol_type: int, itol_name: str, i_up_tol: str, i_low_tol: str, id_up_tol: float, id_low_tol: float, display_mode: int) None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetTolerances(long iTolType,
CATBSTR itolName,
CATBSTR iUpTol,
CATBSTR iLowTol,
double idUpTol,
double idLowTol,
long DisplayMode)

Set tolerance information of dimension value.

Parameters:

iTolType
Tolerance type
itolName
Tolerance name
iUpTol
Upper tolerance value (alpha numerical type)
iLowTol
Lower tolerance value (alpha numerical type)
idUpTol
Upper tolerance value (numerical type)
idLowTol
Lower tolerance value (numerical type)
DisplayMode
Tolerance display mode
Example:
This example sets tolerance information of MyDimension
path.

MyDimension.SetTolerances(iTolType, itolName, iUpTol, iLowTol,
idUpTol, idLowTol, DisplayMode)
Parameters:
  • i_tol_type (int) –

  • itol_name (str) –

  • i_up_tol (str) –

  • i_low_tol (str) –

  • id_up_tol (float) –

  • id_low_tol (float) –

  • display_mode (int) –

Return type:

None

property symbols_side: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property SymbolsSide() As long

Returns or sets symbol side of dimension line. Legal values: 0 : Automatic positioning (Inside or
Outside). 1 : Symbols are inside. 2 : Symbols are outside. 3 : First symbol inside , second symbol
outside. 4 : First symbol outside, second symbol inside.

Example:
This example retrieves symbol side of dimension line MyDimension
drawing dimension.

oSymbSide = MyDimension.SymbolsSide
Return type:

int

property true_dim_mode: bool

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property TrueDimMode() As boolean (Read Only)

Returns or sets true dimension mode or not.

Example:
This example retrieves true dimension mode or not MyDimension drawing
dimension.

oTrueDimMode = MyDimension.TrueDimMode
Returns:

bool

unclip() None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub Unclip()

Unclip the dimension if it is clipped.
Example:
This example unclip MyDimension path.

if MyDimension.IsClipped then
MyDimension.Unclip
Return type:

None

property value_angle: float

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property ValueAngle() As double

Returns or sets angle of dimension value.

Example:
This example retrieves angle of dimension value MyDimension drawing
dimension.

oValueAng = MyDimension.ValueAngle
Return type:

float

property value_auto_mode: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property ValueAutoMode() As long

Returns or sets auto mode of dimension value or not.

Example:
This example retrieves auto mode of dimension value or not MyDimension
drawing dimension.

oValueAutoMode = MyDimension.ValueAutoMode
Return type:

int

property value_display: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property ValueDisplay() As long

Returns or sets display of dimension value state.

Example:
This example retrieves display of dimension value state MyDimension
drawing dimension.

oValueDisplay = MyDimension.ValueDisplay
Return type:

int

property value_frame: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property ValueFrame() As CatDimFrame

Returns or sets frame type of dimension value.

Example:
This example retrieves frame type of dimension value MyDimension
drawing dimension.

oValueFrame = MyDimension.ValueFrame
Returns:

enum cat_dim_frame

Return type:

int

property value_in_out: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property ValueInOut() As long

Returns or sets in/out mode of dimension value or not.

Example:
This example retrieves in/out mode of dimension value or not
MyDimension drawing dimension.

oInOut = MyDimension.ValueInOut
Return type:

int

property value_orientation: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property ValueOrientation() As CatDimOrientation

Returns or sets orientation of dimension value.

Example:
This example retrieves orientation of dimension value MyDimension
drawing dimension.

oValueOrient = MyDimension.ValueOrientation
Returns:

enum cat_dim_orientation

Return type:

int

property value_reference: int

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property ValueReference() As CatDimReference

Returns or sets reference of dimension value.

Example:
This example retrieves reference of dimension value MyDimension drawing
dimension.

oValueRef = MyDimension.ValueReference
Returns:

enum cat_dim_reference

Return type:

int