drafting_interfaces

drafting_setting_att

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.drafting_setting_att.DraftingSettingAtt(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
System.SettingController
DraftingSettingAtt

Manages drafting settings.
property create_new_sheet_from

Note

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

Returns the CreateNewSheetFrom parameter.
Returns

enum cat_drw_new_sheet_from

property display_reset_button

Note

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

Returns the DisplayResetButton parameter.
Returns

bool

get_create_new_sheet_from_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetCreateNewSheetFromInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the CreateNewSheetFrom
parameter.
Role:Retrieves the state of the CreateNewSheetFrom parameter in the current
environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_display_reset_button_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetDisplayResetButtonInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the DisplayResetButton
parameter.
Role:Retrieves the state of the DisplayResetButton parameter in the current
environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_lock_user_default_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetLockUserDefaultInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the LockUserDefault
parameter.
Role:Retrieves the state of the LockUserDefault parameter in the current
environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_prevent_background_access_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPreventBackgroundAccessInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the PreventBackgroundAccess
parameter.
Role:Retrieves the state of the PreventBackgroundAccess parameter in the
current environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_prevent_dim_driving3_d_cstr_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPreventDimDriving3DCstrInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the PreventDimDriving3DCstr
parameter.
Role:Retrieves the state of the PreventDimDriving3DCstr parameter in the
current environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_prevent_file_new_info(io_admin_level, io_locked, o_modified)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetPreventFileNewInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked,
boolean oModified)

Retrieves environment informations for the PreventFileNew
parameter.
Role:Retrieves the state of the PreventFileNew parameter in the current
environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

  • o_modified (bool) –

Returns

None

get_prevent_gen_view_style_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPreventGenViewStyleInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the PreventGenViewStyle
parameter.
Role:Retrieves the state of the PreventGenViewStyle parameter in the
current environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_prevent_set_as_default_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPreventSetAsDefaultInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the PreventSetAsDefault
parameter.
Role:Retrieves the state of the PreventSetAsDefault parameter in the
current environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_prevent_switch_standard_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPreventSwitchStandardInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the PreventSwitchStandard
parameter.
Role:Retrieves the state of the PreventSwitchStandard parameter in the
current environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_prevent_true_dimension_creation_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPreventTrueDimensionCreationInfo(CATBSTR
ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the PreventTrueDimensionCreation
parameter.
Role:Retrieves the state of the PreventTrueDimensionCreation parameter in
the current environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_prevent_update_standard_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPreventUpdateStandardInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the PreventUpdateStandard
parameter.
Role:Retrieves the state of the PreventUpdateStandard parameter in the
current environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_prevent_view_geom_upgrade_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPreventViewGeomUpgradeInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the PreventViewGeomUpgrade
parameter.
Role:Retrieves the state of the PreventViewGeomUpgrade parameter in the
current environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

get_use_style_create_objects_info(io_admin_level, io_locked)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetUseStyleCreateObjectsInfo(CATBSTR ioAdminLevel,
CATBSTR ioLocked) As boolean

Retrieves environment informations for the UseStyleCreateObjects
parameter.
Role:Retrieves the state of the UseStyleCreateObjects parameter in the
current environment.

Parameters:

ioAdminLevel

If the parameter is locked, AdminLevel gives the administration
level that imposes the value of the parameter.
If the parameter is not locked, AdminLevel gives the administration
level that will give the value of the parameter after a reset.

ioLocked
Indicates if the parameter has been locked.

Returns:
Indicates if the parameter has been explicitly modified or remain to
the administrated value.
Parameters
  • io_admin_level (str) –

  • io_locked (str) –

Returns

bool

property lock_user_default

Note

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

Returns the LockUserDefault parameter.
Returns

bool

property prevent_background_access

Note

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

Returns the PreventBackgroundAccess parameter.
Returns

bool

property prevent_dim_driving3_d_cstr

Note

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

Returns the PreventDimDriving3DCstr parameter.
Returns

bool

property prevent_file_new

Note

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

Returns the PreventFileNew parameter.
Returns

bool

property prevent_gen_view_style

Note

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

Returns the PreventGenViewStyle parameter.
Returns

bool

property prevent_set_as_default

Note

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

Returns the PreventSetAsDefault parameter.
Returns

bool

property prevent_switch_standard

Note

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

Returns the PreventSwitchStandard parameter.
Returns

bool

property prevent_true_dimension_creation

Note

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

Returns the PreventTrueDimensionCreation parameter.
Returns

bool

property prevent_update_standard

Note

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

Returns the PreventUpdateStandard parameter.
Returns

bool

property prevent_view_geom_upgrade

Note

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

Returns the PreventViewGeomUpgrade parameter.
Returns

bool

set_create_new_sheet_from_lock(i_locked)

Note

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

Locks or unlocks the CreateNewSheetFrom parameter.
Role:Locks or unlocks the CreateNewSheetFrom parameter if it is possible in
the current administrative context. In user mode this method will always return
E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_display_reset_button_lock(i_locked)

Note

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

Locks or unlocks the DisplayResetButton parameter.
Role:Locks or unlocks the DisplayResetButton parameter if it is possible in
the current administrative context. In user mode this method will always return
E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_lock_user_default_lock(i_locked)

Note

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

Locks or unlocks the LockUserDefault parameter.
Role:Locks or unlocks the LockUserDefault parameter if it is possible in
the current administrative context. In user mode this method will always return
E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_prevent_background_access_lock(i_locked)

Note

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

Locks or unlocks the PreventBackgroundAccess parameter.
Role:Locks or unlocks the PreventBackgroundAccess parameter if it is
possible in the current administrative context. In user mode this method will
always return E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_prevent_dim_driving3_d_cstr_lock(i_locked)

Note

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

Locks or unlocks the PreventDimDriving3DCstr parameter.
Role:Locks or unlocks the PreventDimDriving3DCstr parameter if it is
possible in the current administrative context. In user mode this method will
always return E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_prevent_file_new_lock(i_locked)

Note

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

Locks or unlocks the PreventFileNew parameter.
Role:Locks or unlocks the PreventFileNew parameter if it is possible in the
current administrative context. In user mode this method will always return
E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_prevent_gen_view_style_lock(i_locked)

Note

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

Locks or unlocks the PreventGenViewStyle parameter.
Role:Locks or unlocks the PreventGenViewStyle parameter if it is possible
in the current administrative context. In user mode this method will always
return E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_prevent_set_as_default_lock(i_locked)

Note

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

Locks or unlocks the PreventSetAsDefault parameter.
Role:Locks or unlocks the PreventSetAsDefault parameter if it is possible
in the current administrative context. In user mode this method will always
return E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_prevent_switch_standard_lock(i_locked)

Note

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

Locks or unlocks the PreventSwitchStandard parameter.
Role:Locks or unlocks the PreventSwitchStandard parameter if it is possible
in the current administrative context. In user mode this method will always
return E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_prevent_true_dimension_creation_lock(i_locked)

Note

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

Locks or unlocks the PreventTrueDimensionCreation
parameter.
Role:Locks or unlocks the PreventTrueDimensionCreation parameter if it is
possible in the current administrative context. In user mode this method will
always return E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_prevent_update_standard_lock(i_locked)

Note

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

Locks or unlocks the PreventUpdateStandard parameter.
Role:Locks or unlocks the PreventUpdateStandard parameter if it is possible
in the current administrative context. In user mode this method will always
return E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_prevent_view_geom_upgrade_lock(i_locked)

Note

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

Locks or unlocks the PreventViewGeomUpgrade parameter.
Role:Locks or unlocks the PreventViewGeomUpgrade parameter if it is
possible in the current administrative context. In user mode this method will
always return E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

set_use_style_create_objects_lock(i_locked)

Note

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

Locks or unlocks the UseStyleCreateObjects parameter.
Role:Locks or unlocks the UseStyleCreateObjects parameter if it is possible
in the current administrative context. In user mode this method will always
return E_FAIL.

Parameters:

iLocked
the locking operation to be performed Legal
values:
TRUE : to lock the parameter.
FALSE: to unlock the parameter.
Parameters

i_locked (bool) –

Returns

None

property use_style_create_objects

Note

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

Returns the UseStyleCreateObjects parameter.
Returns

bool

drawing_arrow

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_arrow.DrawingArrow(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
DrawingArrow

Represents a drawing arrow in a drawing view.
add_interruption(i_first_point_x, i_first_point_y, i_second_point_x, i_second_point_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub AddInterruption(double iFirstPointX,
double iFirstPointY,
double iSecondPointX,
double iSecondPointY)

Add an interruption to an arrow.

Parameters:

iFirstPointX
X coordinates of first point.
iFirstPointY
Y coordinates of first point.
iSecondPointX
X coordinates of second point.
iSecondPointY
Y coordinates of second point.
Example:
This example adds an interruption to MyArrow.

iFirstPointX = 10.
iFirstPointY = 20.
iSecondPointX = 20.
iSecondPointY = 20.
MyArrow.AddInterruption iFirstPointX, iFirstPointY, iSecondPointX,
iSecondPointY
Parameters
  • i_first_point_x (float) –

  • i_first_point_y (float) –

  • i_second_point_x (float) –

  • i_second_point_y (float) –

Returns

None

add_point(i_num, i_x, i_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub AddPoint(long iNum,
double iX,
double iY)

Add a point to an arrow.

Parameters:

iNum
Point number. Point will be inserted at iNum+1 position.

iX
X coordinates of point to add.
iY
Y coordinates of point to add.
Example:
This example adds a point to MyArrow.

iNum = 1
iX = 10.
iY = 20.
MyArrow.AddPoint iNum, iX, iY
Parameters
  • i_num (int) –

  • i_x (float) –

  • i_y (float) –

Returns

None

get_interruptions(o_interruptions)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetInterruptions(CATSafeArrayVariant oInterruptions) As
long

Get arrow path.

Parameters:

oInterruptions
List of interruptions coordinates (X1,Y1,X2,Y2,…..Xn,Yn).


Returns:
oNbInterruptions Number of interruptions.
Example:
This example gets interruptions of MyArrow path.

oNbInterruptions = MyArrow.GetInterruptions(oInterruptions)
Parameters

o_interruptions (tuple) –

Returns

int

get_point(i_num, o_x, o_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetPoint(long iNum,
double oX,
double oY)

Get arrow point coordinates.

Parameters:

iNum
Point number.
oX
X coordinates of point.
oY
Y coordinates of point.
Example:
This example gets a point to MyArrow.

iNum = 1
MyArrow.GetPoint(iNum, oX, oY)
Parameters
  • i_num (int) –

  • o_x (float) –

  • o_y (float) –

Returns

None

get_points(o_points)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPoints(CATSafeArrayVariant oPoints) As long

Get arrow path.

Parameters:

oPoints
List of points coordinates (X1,Y1,X2,Y2,…..Xn,Yn).


Returns:
oNbPoints Number of points.
Example:
This example gets points of MyArrow path.

oNbPoints = MyArrow.GetPoints(oPoints)
Parameters

o_points (tuple) –

Returns

int

property head_symbol

Note

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

Returns or sets symbol type of head side.

Example:
This example retrieves the symbol type of head side on MyArrow drawing
arrow.

oSymbol = MyArrow.HeadSymbol
Returns

enum cat_symbol_type

property head_target

Note

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

Returns or sets target element of head side.

Example:
This example retrieves the target element of head side on MyArrow
drawing arrow.

oTarget = MyArrow.HeadTarget
Returns

AnyObject

modify_point(i_num, i_x, i_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub ModifyPoint(long iNum,
double iX,
double iY)

Modify a point of an Arrow.

Parameters:

iNum
Point number to modify.
iX
X coordinates of new point.
iY
Y coordinates of new point.
Example:
This example modifies a point to MyArrow.

iNum = 1
iX = -10.
iY = -20.
MyArrow.ModifyPoint iNum, iX, iY
Parameters
  • i_num (int) –

  • i_x (float) –

  • i_y (float) –

Returns

None

property nb_interruption

Note

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

Returns the number of interruptions of arrow path.

Example:
This example retrieves the number of interruptions on MyArrow drawing
arrow.

oNbInterruption = MyArrow.NbInterruption
Returns

int

property nb_point

Note

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

Returns the number of points of arrow path.

Example:
This example retrieves the number of points on MyArrow drawing
arrow.

oNbPoint = MyArrow.NbPoint
Returns

int

remove_interruption(i_num)

Note

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

Remove an interruption to an arrow.

Parameters:

iNum
Interruption number to delete.
- If iNum equals to 0, all interruptions will be removed.

Example:
This example removes an interruption from MyArrow.

iNum = 2
MyArrow.RemoveInterruption iNum
Parameters

i_num (int) –

Returns

None

remove_point(i_num)

Note

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

Remove a point from an arrow.

Parameters:

iNum
Point number to delete.
Example:
This example removes a point from MyArrow.

iNum = 2
MyArrow.RemovePoint iNum
Parameters

i_num (int) –

Returns

None

property tail_symbol

Note

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

Returns or sets symbol type of tail side.

Example:
This example retrieves the symbol type of tail side on MyArrow drawing
arrow.

oSymbol = MyArrow.TailSymbol
Returns

enum cat_symbol_type

property tail_target

Note

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

Returns or sets target element of tail side.

Example:
This example retrieves the target element of tail side on MyArrow
drawing arrow.

oTarget = MyArrow.TailTarget
Returns

AnyObject

drawing_arrows

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_arrows.DrawingArrows(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingArrows

A collection of all the drawing arrows currently managed by a drawing view of
drawing sheet in a drawing document.
add(i_head_point_x, i_head_point_y, i_tail_point_x, i_tail_point_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(double iHeadPointX,
double iHeadPointY,
double iTailPointX,
double iTailPointY) As DrawingArrow

Creates a drawing arrow and adds it to the DrawingArrows
collection.

Parameters:

iHeadPointX,iHeadPointY
The x and y coordinates of head side of drawing arrow

iTailPointX,iTailPointY
The x and y coordinates of tail side of drawing arrow


Returns:
The created drawing arrow

Example:
The following example creates a drawing arrow and retrieved in MyArrow in
the drawing view collection of the MyView drawing view. This view belongs to
the drawing view collection of the drawing sheet

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim MyArrow As DrawingArrow
Set MyArrow = MyView.Arrows.Add(0., 0., 20., 50)
Parameters
  • i_head_point_x (float) –

  • i_head_point_y (float) –

  • i_tail_point_x (float) –

  • i_tail_point_y (float) –

Returns

DrawingArrow

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(long iIndex) As DrawingArrow

Returns a drawing arrow using its index from the DrawingArrows
collection.

Parameters:

iIndex
The index of the drawing arrow to retrieve from the collection of
drawing arrows. As a numerics, this index is the rank of the drawing arrow in
the collection. The index of the first drawing arrow in the collection is 1,
and the index of the last drawing arrow is Count.

Returns:
The retrieved drawing view
Example:
This example retrieves in ThisDrawingArrow the second drawing arrow, in
the drawing view collection of the active view in the active sheet, in the
active document supposed to be a drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingArrow As DrawingArrow
Set ThisDrawingArrow = MyView.Arrows.Item(2)
Parameters

i_index (int) –

Returns

DrawingArrow

remove(i_index)

Note

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

Removes a drawing arrow from the DrawingArrows collection.

Parameters:

iIndex
The index of the drawing arrow to remove from the collection of
drawing arrows. As a numerics, this index is the rank of the drawing arrow in
the collection. The index of the first drawing arrow in the collection is 1,
and the index of the last drawing arrow is Count.

Example:
The following example removes the third drawing arrow in the drawing
arrow collection of the active view of the active document, supposed to be a
drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.DrawingArrows.Remove(3)
Parameters

i_index (int) –

Returns

None

drawing_component

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_component.DrawingComponent(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
DrawingComponent

Represents a drawing component instance (ditto) in a drawing
view.
property angle

Note

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

Returns or sets the angle of the drawing component instance. The angle is
given in the axis system of the drawing view The angle is measured in radians
and is counted counterclockwise.

Example:
This example sets the angle of the MyComponent drawing component
instance to 90 degrees clockwise. You first need to compute the angle in
radians and set the minus sign to indicate the rotation is
clockwise.

PI = 3.1415926535
Angle90Clockwise = -PI/2
MyComponent.Angle = Angle90Clockwise
Returns

float

property comp_ref

Note

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

Returns the component reference of this drawing component instance. this is
a CATIADrawingView

Example:
This example gets the drawing component reference of the MyComponent
drawing component instance.

Dim ComponentRef As DrawingView
Set ComponentRef = MyComponent.CompRef
Returns

DrawingView

explode()

Note

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

Explodes the drawing component instance (every sub elements of the drawing
component are created). Note: The drawing component is not removed by Explode
method

Example:
This example Explodes the MyComponent drawing component instance and
removes it.

MyComponent.Explode
Set MySelection = CATIA.ActiveDocument.Selection
MySelection.clear
MySelection.add MyComponent
MySelection.delete
Returns

None

explode_and_select()

Note

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

Explodes the drawing component instance (every sub elements of the drawing
component are created) and put created sub elements in selection
set.

Example:
This example Explodes the MyComponent drawing component
instance.

MyComponent.ExplodeAndSelect
Returns

None

expose_comp_ref()

Note

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

Exposes the component reference of this drawing component instance in a new
detail sheet.

Example:
This example exposes the component reference of the MyComponent drawing
component instance in a new detail sheet.

MyComponent.ExposeCompRef
Returns

None

expose_comp_ref_in_sheet(i_sheet)

Note

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

Exposes the component reference of this drawing component instance in a
specific detail sheet.

Parameters:

iSheet
The drawing sheet where the reference component has to be exposed.
This sheet has to be a detail sheet, if not the component reference will be
placed in a new detail sheet.

Example:
This example exposes the component reference of the MyComponent
drawing component instance in the MyDetailSheet drawing
sheet.

MyComponent.ExposeCompRefInSheet
MyDetailSheet
Parameters

i_sheet (DrawingSheet) –

Returns

None

flip()

Note

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

Flips the drawing component instance around X axis To flip around Y axis
you have to flip the component around X and to add a rotation of 180
degrees.

Example:
This example Flips the MyComponent drawing component
instance.

MyComponent.Flip
Returns

None

get_flip()

Note

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

Returns the flip state of a drawing component instance around X
axis.

Example:
This example Get the flip info of the MyComponent drawing component
instance.

IsFlipped = MyComponent.GetFlip
Returns

bool

get_matrix(io_matrix)

Note

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

Gets the matrix of the drawing component instance. This matrix enables you
to define the position (index 4 and 5 of the matrix) and the scale, the angle
and the flip (index 0,1,2 and 3) of the drawing component instance at the same
time.

Parameters:

ioMatrix[0]
The 1st coordinate of the first vector
ioMatrix[1]
The 2nd coordinate of the first vector
ioMatrix[2]
The 1st coordinate of the second vector
ioMatrix[3]
The 2nd coordinate of the second vector
ioMatrix[4]
The x value of the translation vector
ioMatrix[5]
The y value of the translation vector
Parameters

io_matrix (tuple) –

Returns

None

get_modifiable_object(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetModifiableObject(CATVariant iIndex) As AnyObject

Gets a modifiable object by index or name in this drawing component
instance.

Example:
This example Gets the first modifiable object in the MyComponent
drawing component instance.

Object = MyComponent.GetModifiableObject(1)
Parameters

i_index (CATVariant) –

Returns

AnyObject

get_modifiable_objects_count()

Note

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

Gets the number of modifiable objects in this drawing component
instance.

Example:
This example Gets the number of modifiable objects in MyComponent
drawing component instance.

Count = MyComponent.GetModifiableObjectsCount
Returns

int

property scale2

Note

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

Returns or sets the scale of the drawing component instance (Workaround for
VBA keyword).

Example:
This example sets the scale of the MyComponent drawing component
instance to 0.5.

MyComponent.Scale2 = 0.5
Returns

float

set_matrix(i_matrix)

Note

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

Sets the matrix of the drawing component instance. This matrix enables you
to define the position (index 4 and 5 of the matrix) and the scale, the angle
and the flip (index 0,1,2 and 3) of the drawing component instance at the same
time.

Parameters:

ioMatrix[0]
The 1st coordinate of the first vector
ioMatrix[1]
The 2nd coordinate of the first vector
ioMatrix[2]
The 1st coordinate of the second vector
ioMatrix[3]
The 2nd coordinate of the second vector
ioMatrix[4]
The x value of the translation vector
ioMatrix[5]
The y value of the translation vector
Parameters

i_matrix (tuple) –

Returns

None

property x

Note

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

Returns or sets the x coordinate of the drawing component instance
position. It is expressed with respect to the view coordinate system. This
coordinate, like any length, is measured in millimeters.

Example:
This example sets the x coordinate of the position of the MyComponent
drawing component instance to 5 inches. You need first to convert the 5 inches
into millimeters.

NewXCoordinate = 5*25.4
MyComponent.x = NewXCoordinate
Returns

float

property y

Note

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

Returns or sets the y coordinate of the drawing component instance
position. It is expressed with respect to the view coordinate system. This
coordinate, like any length, is measured in millimeters.

Example:
This example sets the y coordinate of the position of the MyComponent
drawing component instance to 5 inches. You need first to convert the 5 inches
into millimeters.

NewYCoordinate = 5*25.4
MyComponent.y = NewYCoordinate
Returns

float

drawing_components

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_components.DrawingComponents(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingComponents

A collection of all the drawing components (ditto) currently managed by a
drawing view of drawing sheet in a drawing document.
add(i_drawing_component_ref, i_position_x, i_position_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(DrawingView iDrawingComponentRef,
double iPositionX,
double iPositionY) As DrawingComponent

Creates a drawing component instance and adds it to the DrawingComponents
collection.

Parameters:

iDrawingComponentRef
The view (i.e. the detail) that is the component reference . This
view also called a detail MUST belong to a sheet of component references (i.e.
details)
iPositionX,iPositionY
The drawing component x and y coordinates, expressed in
millimeters, with respect to the drawing view coordinate system


Returns:
The created drawing component instance

Example:
The following example creates a drawing component instance with a given
component reference MyComponentRef coming from a Sheet of component references
(i.e. details) SheetComponentRef and retrieved in MyComponentInst in the
drawing view collection of the MyView drawing view. This view belongs to the
drawing view collection of the drawing sheet

Dim MyComponentRef As DrawingView
Set MyComponentRef = SheetComponentRef.Views.Item(1)
Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim MyComponentInst As DrawingComponent
Set MyComponentInst = MyView.Components.Add(MyComponentRef, 100., 50.)
Parameters
  • i_drawing_component_ref (DrawingView) –

  • i_position_x (float) –

  • i_position_y (float) –

Returns

DrawingComponent

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(CATVariant iIndex) As DrawingComponent

Returns a drawing component instance using its index or its name from the
DrawingComponents collection.

Parameters:

iIndex
The index or the name of the drawing component instance to retrieve
from the collection of drawing components. As a numerics, this index is the
rank of the drawing component instance in the collection. The index of the
first drawing component instance in the collection is 1, and the index of the
last drawing component instance is Count. As a string, it is the name you
assigned to the drawing component instance using the


AnyObject.Name property
Returns:
The retrieved drawing component instance

Example:
This example retrieves in ThisDrawingComponent the second drawing component
instance, MyView in the drawing view collection of the active sheet in the
active document, supposed to be a drawing document.

Dim MySheet As DrawingSheet
Set MySheet = CATIA.ActiveDocument.Sheets.ActiveSheet
Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingComponent As DrawingComponent
Set ThisDrawingComponent = MyView.Components.Item(2)
Parameters

i_index (CATVariant) –

Returns

DrawingComponent

remove(i_index)

Note

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

Removes a drawing component from the DrawingComponents
collection.

Parameters:

iIndex
The index of the drawing component to remove from the collection of
drawing components. As a numerics, this index is the rank of the drawing
component in the collection. The index of the first drawing component instance
in the collection is 1, and the index of the last drawing component instance is
Count. As a string, it is the name you assigned to the drawing component using
the

AnyObject.Name property

Example:
The following example removes the third drawing component instance in the
drawing component collection of the active view of the active document,
supposed to be a drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.Components.Remove(3)
Parameters

i_index (CATVariant) –

Returns

None

drawing_dim_ext_line

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_dim_ext_line.DrawingDimExtLine(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
DrawingDimExtLine

Manages extension lines of a dimension in drawing view.

This interface is obtained from DrawingDimension.GetExtLine
method.
add_interrupt(i_index, i_two_points)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub AddInterrupt(long iIndex,
CATSafeArrayVariant iTwoPoints)

Add an interrupt to an extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
iTwoPoints
Defines the first and second point of the gap to create.

Example:
This example adds an interrupt to MyExtLine path.

MyExtLine.AddInterrupt(iIndex, iTwoPoints)
Parameters
  • i_index (int) –

  • i_two_points (tuple) –

Returns

None

property color

Note

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

Returns or sets color of extension line.

Example:
This example retrieves color of extension line MyExtLine drawing
dimension.

oColorExtLine = MyExtLine.Color
Returns

int

property ext_line_slant

Note

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

Returns or sets slant angle of extension line.

Example:
This example retrieves slant angle of extension line MyExtLine drawing
dimension.

oExtLineSlant = MyExtLine.ExtLineSlant
Returns

float

property ext_line_type

Note

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

Returns extension line type of dimension.

Example:
This example retrieves extension line type of dimension MyExtLine
drawing dimension.

oExtLineType = MyExtLine.ExtLineType
Returns

int

get_funnel(i_index, o_mode, o_angle, o_height, o_width)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetFunnel(long iIndex,
long oMode,
double oAngle,
double oHeight,
double oWidth)

Get funnel information of dimension extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
oMode
funnel inside/outside mode.
oAngle
funnel angle.
oHeight
funnel height.
oWidth
funnel width.
Example:
This example gets funnel information of MyExtLine
path.

MyExtLine.GetFunnel(iIndex, oMode, oAngle, oHeight,
oWidth)
Parameters
  • i_index (int) –

  • o_mode (int) –

  • o_angle (float) –

  • o_height (float) –

  • o_width (float) –

Returns

None

get_gap(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetGap(long iIndex) As double

Get gap of dimension extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
oGap
Gap.
Example:
This example gets gap of MyExtLine path.

Gap = MyExtLine.GetGap(iIndex)
Parameters

i_index (int) –

Returns

float

get_geom_info(i_index, o_geom_infos)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetGeomInfo(long iIndex,
CATSafeArrayVariant oGeomInfos)

Get geometrical information of dimension extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
oGeomInfos
List of geometric coordinates (X1,Y1,X2,Y2,X3,Y3).

Example:
This example gets geometrical information of MyExtLine
path.

MyExtLine.GetGeomInfo(iIndex, oGeomInfos)
Parameters
  • i_index (int) –

  • o_geom_infos (tuple) –

Returns

None

get_interrupt(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetInterrupt(long iIndex) As long

Get the number of interruptions stored in each extension
lines.

Parameters:

iIndex
1: first extension line 2: second extension line
oNbIntOnExtLine
The number of interruptions.
Example:
This example gets the number of interruptions of MyExtLine
path.

NbIntOnExtLine = MyExtLine.GetInterrupt(iIndex)
Parameters

i_index (int) –

Returns

int

get_overrun(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetOverrun(long iIndex) As double

Get overrun of dimension extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
oOverrun
Overrun
Example:
This example gets overrun of MyExtLine path.

Overrun = MyExtLine.GetOverrun(iIndex)
Parameters

i_index (int) –

Returns

float

get_visibility(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetVisibility(long iIndex) As long

Get visibility of dimension extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
oGap
Gap.
Example:
This example gets visibility of MyExtLine path.

ExtlineVisibility = MyExtLine.GetVisibility(iIndex)
Parameters

i_index (int) –

Returns

int

remove_interrupt(i_index)

Note

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

Remove interruption on extension lines.

Parameters:

iIndex
1: first extension line 2: second extension line
Example:
This example Remove interruption on MyExtLine
path.

MyExtLine.RemoveInterrupt(iIndex)
Parameters

i_index (int) –

Returns

None

set_funnel(i_index, i_mode, i_angle, i_height, i_width)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFunnel(long iIndex,
long iMode,
double iAngle,
double iHeight,
double iWidth)

Set funnel information of dimension extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
iMode
funnel inside/outside mode.
iAngle
funnel angle.
iHeight
funnel height.
iWidth
funnel width.
Example:
This example sets funnel information of MyExtLine
path.

MyExtLine.SetFunnel(iIndex, iMode, iAngle, iHeight,
iWidth)
Parameters
  • i_index (int) –

  • i_mode (int) –

  • i_angle (float) –

  • i_height (float) –

  • i_width (float) –

Returns

None

set_gap(i_index, i_gap)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetGap(long iIndex,
double iGap)

Set gap of dimension extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
iGap
gap
Example:
This example sets gap of MyExtLine path.

MyExtLine.SetGap(iIndex, iGap)
Parameters
  • i_index (int) –

  • i_gap (float) –

Returns

None

set_overrun(i_index, i_overrun)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetOverrun(long iIndex,
double iOverrun)

Set overrun of dimension extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
iOverrun
Overrun
Example:
This example sets overrun of MyExtLine path.

MyExtLine.SetOverrun(iIndex, iOverrun)
Parameters
  • i_index (int) –

  • i_overrun (float) –

Returns

None

set_visibility(i_index, i_extline_visibility)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetVisibility(long iIndex,
long iExtlineVisibility)

Set visibility of dimension extension line.

Parameters:

iIndex
1: first extension line 2: second extension line
iExtlineVisibility
visibility
Example:
This example sets visibility of MyExtLine path.

MyExtLine.SetVisibility(iIndex,
iExtlineVisibility)
Parameters
  • i_index (int) –

  • i_extline_visibility (int) –

Returns

None

property thickness

Note

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

Returns or sets thickness of extension line.

Example:
This example retrieves thickness of extension line MyExtLine drawing
dimension.

oThickExtLine = MyExtLine.Thickness
Returns

float

drawing_dim_line

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_dim_line.DrawingDimLine(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
DrawingDimLine

Manages dimension line of a dimension in drawing view.

This interface is obtained from DrawingDimension.GetDimLine
method.
property color

Note

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

Returns or sets color of dimension line.

Example:
This example retrieves color of dimension line MyDimLine drawing
dimension.

oColorDimLine = MyDimLine.Color
Returns

int

property dim_line_graph_rep

Note

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

Returns or graphic representation of dimension line.

Example:
This example retrieves graphic representation of dimension line
MyDimLine drawing dimension.

odimLineGraphRep = MyDimLine.DimLineGraphRep
Returns

enum cat_dim_line_graph_rep

property dim_line_orientation

Note

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

Returns or orientation of dimension line.

Example:
This example retrieves orientation of dimension line MyDimLine drawing
dimension.

odimLineOrient = MyDimLine.DimLineOrientation
Returns

enum cat_dim_orientation

property dim_line_reference

Note

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

Returns or reference of dimension line.

Example:
This example retrieves reference of dimension line MyDimLine drawing
dimension.

odimLineRef = MyDimLine.DimLineReference
Returns

enum cat_dim_reference

property dim_line_rep

Note

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

Returns or representation of dimension line.

Example:
This example retrieves representation of dimension line MyDimLine
drawing dimension.

odimLineRep = MyDimLine.DimLineRep
Returns

enum cat_dim_line_rep

property dim_line_type

Note

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

Returns type of dimension line.

Example:
This example retrieves type of dimension line MyDimLine drawing
dimension.

odimLineType = MyDimLine.DimLineType
Returns

int

get_dim_line_dir(o_dir_x, o_dir_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetDimLineDir(double oDirX,
double oDirY)

Returns direction of a dimension line in case of a catDimUserDefined
representation mode. To retrieve the representation mode:
DrawingDimLine.get_DimLineRep.

Parameters:

oDirX,oDirY
The components of the direction vector
Example:
This example retrieves the direction vector of a dimension line
MyDimLine drawing dimension.

MyDimLine.GetDimLineDir oDirX, oDirY
Parameters
  • o_dir_x (float) –

  • o_dir_y (float) –

Returns

None

get_geom_info(o_geom_infos)

Note

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

Get geometrical information of dimension line.

Parameters:

oGeomInfos
geometrical information.
Example:
This example gets geometrical information of MyDimLine
path.

MyDimLine.GetGeomInfo(oGeomInfos)
Parameters

o_geom_infos (tuple) –

Returns

None

get_symb_color(index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetSymbColor(long Index) As long

Get symbol color of dimension line.

Parameters:

Index
1:first symbol 2:second symbol 3:leader symbol
oColorSymb
symbol color.
Example:
This example gets symbol color of MyDimLine path.

ColorSymb = MyDimLine.GetSymbColor(Index)
Parameters

index (int) –

Returns

int

get_symb_thickness(index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetSymbThickness(long Index) As double

Get symbol thickness of dimension line.

Parameters:

Index
1:first symbol 2:second symbol 3:leader symbol
oThickSymb
symbol thickness.
Example:
This example gets symbol thickness of MyDimLine
path.

ThickSymb = MyDimLine.GetSymbThickness(Index)
Parameters

index (int) –

Returns

float

get_symb_type(index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetSymbType(long Index) As CatDimSymbols

Get symbol type of dimension line.

Parameters:

Index
1:first symbol 2:second symbol 3:leader symbol
oTypeSymb
symbol type.
Example:
This example gets symbol type of MyDimLine path.

typeSymb = MyDimLine.GetSymbType(Index)
Parameters

index (int) –

Returns

enum cat_dim_symbols

set_symb_color(index, i_color_symb)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetSymbColor(long Index,
long iColorSymb)

Set symbol color of dimension line.

Parameters:

Index
1:first symbol 2:second symbol 3:leader symbol
oColorSymb
symbol color.
Example:
This example sets symbol color of MyDimLine path.

MyDimLine.SetSymbColor(Index, iColorSymb)
Parameters
  • index (int) –

  • i_color_symb (int) –

Returns

None

set_symb_thickness(index, i_thick_symb)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetSymbThickness(long Index,
double iThickSymb)

Set symbol thickness of dimension line.

Parameters:

Index
1:first symbol 2:second symbol 3:leader symbol
oThickSymb
symbol thickness.
Example:
This example sets symbol thickness of MyDimLine
path.

MyDimLine.GetSymbThickness(Index, iThickSymb)
Parameters
  • index (int) –

  • i_thick_symb (float) –

Returns

None

set_symb_type(index, i_symb_type)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetSymbType(long Index,
CatDimSymbols iSymbType)

Set symbol type of dimension line.

Parameters:

Index
1:first symbol 2:second symbol 3:leader symbol
iSymbType
symbol type.
Example:
This example sets symbol type of MyDimLine path.

MyDimLine.SetSymbType(Index, iSymbType)
Parameters
  • index (int) –

  • i_symb_type (CatDimSymbols) –

Returns

None

property thickness

Note

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

Returns or sets thickness of dimension line.

Example:
This example retrieves thickness of dimension line MyDimLine drawing
dimension.

oThickDimLine = MyDimLine.Thickness
Returns

float

drawing_dim_value

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_dim_value.DrawingDimValue(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
DrawingDimValue

Manages dimension value of a dimension in drawing view.

This interface is obtained from DrawingDimension.GetValue
method.
property fake_dim_type

Note

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

Returns or sets fake dimension type of value.

Example:
This example retrieves fake dimension type of value MyDimValue drawing
dimension.

oFakeType = MyDimValue.FakeDimType
Returns

enum cat_dim_fake

get_bault_text(i_index, o_before, o_after, o_upper, o_lower)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetBaultText(long iIndex,
CATBSTR oBefore,
CATBSTR oAfter,
CATBSTR oUpper,
CATBSTR oLower)

Get bault text of dimension value.

Parameters:

iIndex
1: main value 2: dual value
oBefore
before text.
oAfter
after text
oUpper
upper text
oLower
lower text
Example:
This example gets bault text of MyValue path.

MyValue.GetBaultText(iIndex, oBefore, oAfter, oUpper,
oLower)
Parameters
  • i_index (int) –

  • o_before (str) –

  • o_after (str) –

  • o_upper (str) –

  • o_lower (str) –

Returns

None

get_display_unit(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetDisplayUnit(long iIndex) As long

Get display unit of dimension value.

Parameters:

Index
1: main value 2: dual value
oDisplUnit
before text.
Example:
This example gets format unit of MyValue path.

FrmUnit = MyValue.GetDisplayUnit(iIndex)
Parameters

i_index (int) –

Returns

int

get_fake_dim_value(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetFakeDimValue(long iIndex) As CATBSTR

Get fake value of dimension.

Parameters:

iIndex
1: main value 2: dual value
oFakeDimValue
before text.
Example:
This example gets fake value of MyValue path.

FakeDimValue = MyValue.GetFakeDimValue(iIndex)
Parameters

i_index (int) –

Returns

str

get_format_display_factor(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetFormatDisplayFactor(long iIndex) As long

Get format display factor of dimension value.

Parameters:

iIndex
1: main value 2: dual value
oFrmDspFact
before text.
Example:
This example gets format display factor of MyValue
path.

FrmDspFact = MyValue.GetFormatDisplayFactor(iIndex)
Parameters

i_index (int) –

Returns

int

get_format_name(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetFormatName(long iIndex) As CATBSTR

Get format name of dimension value.

Parameters:

iIndex
1: main value 2: dual value
oFmName
before text.
Example:
This example gets format name of MyValue path.

FmName = MyValue.GetFormatName(iIndex)
Parameters

i_index (int) –

Returns

str

get_format_precision(index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetFormatPrecision(long Index) As double

Get format precision of dimension value.

Parameters:

iIndex
1: main value 2: dual value
oFrmPrecision
before text.
Example:
This example gets format precision of MyValue
path.

FrmPrecision = MyValue.GetFormatPrecision(iIndex)
Parameters

index (int) –

Returns

float

get_format_type(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetFormatType(long iIndex) As long

Get format type of dimension value.

Parameters:

iIndex
1: main value 2: dual value
oFrmType
before text.
Example:
This example gets format type of MyValue path.

FrmType = MyValue.GetFormatType(iIndex)
Parameters

i_index (int) –

Returns

int

get_format_unit(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetFormatUnit(long iIndex) As long

Get format unit of dimension value.

Parameters:

Index
1: main value 2: dual value
oFrmUnit
before text.
Example:
This example gets format unit of MyValue path.

FrmUnit = MyValue.GetFormatUnit(iIndex)
Parameters

i_index (int) –

Returns

int

get_ps_text(i_index, o_prefix, o_suffix)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetPSText(long iIndex,
CATBSTR oPrefix,
CATBSTR oSuffix)

Get PS text to dimension value.

Parameters:

iIndex
1: main value 2: dual value
oPrefix
prefix text.
oSuffix
suffix text
Example:
This example gets PS text of MyValue path.

MyValue.GetBaultText(iIndex, oPrefix, oSuffix)
Parameters
  • i_index (int) –

  • o_prefix (str) –

  • o_suffix (str) –

Returns

None

get_scored_element(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetScoredElement(long iIndex) As boolean

Get dimension scored element.

Parameters:

iIndex
1: main value 2: dual value
oScoredElement
TRUE: Scoring is applied to the all bloc text. FALSE: Scoring is
only applied to the value.
Example:
This example gets dimension scored element of MyValue
path.

ScoredElement = MyValue.GetScoredElement(iIndex)
Parameters

i_index (int) –

Returns

bool

property scoring_mode

Note

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

Get dimension scoring mode.
Example:
This example gets dimension scoring mode of MyValue path.

ValueScoreType = MyValue.ScoringMode
Returns

enum cat_dim_score

set_bault_text(i_index, i_before, i_after, i_upper, i_lower)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetBaultText(long iIndex,
CATBSTR iBefore,
CATBSTR iAfter,
CATBSTR iUpper,
CATBSTR iLower)

Set bault text to dimension value.

Parameters:

iIndex
1: main value 2: dual value
iBefore
before text.
iAfter
after text
iUpper
upper text
iLower
lower text
Example:
This example sets bault text of MyValue path.

MyValue.SetBaultText(iIndex, iBefore, iAfter, iUpper,
iLower)
Parameters
  • i_index (int) –

  • i_before (str) –

  • i_after (str) –

  • i_upper (str) –

  • i_lower (str) –

Returns

None

set_fake_dim_value(i_index, i_fake_dim_value)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFakeDimValue(long iIndex,
CATBSTR iFakeDimValue)

Set fake value of dimension value.

Parameters:

iIndex
1: main value 2: dual value
iFakeDimValue
before text.
Example:
This example gets fake value of MyValue path.

MyValue.SetFakeDimValue(iIndex, iFakeDimValue)
Parameters
  • i_index (int) –

  • i_fake_dim_value (str) –

Returns

None

set_format_display_factor(i_index, i_frm_dsp_fact)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFormatDisplayFactor(long iIndex,
long iFrmDspFact)

Set format display factor of dimension value.

Parameters:

iIndex
1: main value 2: dual value
iFrmDspFact
before text.
Example:
This example gets format display factor of MyValue
path.

MyValue.SetFormatDisplayFactor(iIndex,
iFrmDspFact)
Parameters
  • i_index (int) –

  • i_frm_dsp_fact (int) –

Returns

None

set_format_name(i_index, i_frm_name)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFormatName(long iIndex,
CATBSTR iFrmName)

Set format name of dimension value.

Parameters:

iIndex
1: main value 2: dual value
iFrmName
before text.
Example:
This example gets format name of MyValue path.

MyValue.SetFormatName(iIndex, iFrmName)
Parameters
  • i_index (int) –

  • i_frm_name (str) –

Returns

None

set_format_precision(i_index, i_frm_precision)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFormatPrecision(long iIndex,
double iFrmPrecision)

Set format precision of dimension value.

Parameters:

iIndex
1: main value 2: dual value
iFrmPrecision
before text.
Example:
This example gets format precision of MyValue
path.

MyValue.SetFormatPrecision(iIndex, iFrmPrecision)
Parameters
  • i_index (int) –

  • i_frm_precision (float) –

Returns

None

set_format_type(i_index, i_frm_type)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFormatType(long iIndex,
long iFrmType)

Set format type of dimension value.

Parameters:

iIndex
1: main value 2: dual value
iFrmType
before text.
Example:
This example gets format type of MyValue path.

MyValue.SetFormatType(iIndex, iFrmType)
Parameters
  • i_index (int) –

  • i_frm_type (int) –

Returns

None

set_format_unit(i_index, i_frm_unit)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFormatUnit(long iIndex,
long iFrmUnit)

Set format unit of dimension value.

Parameters:

iIndex
1: main value 2: dual value
iFrmUnit
before text.
Example:
This example gets format unit of MyValue path.

MyValue.SetFormatUnit(iIndex, iFrmUnit)
Parameters
  • i_index (int) –

  • i_frm_unit (int) –

Returns

None

set_ps_text(i_index, i_prefix, i_suffix)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetPSText(long iIndex,
CATBSTR iPrefix,
CATBSTR iSuffix)

Set PS text to dimension value.

Parameters:

iIndex
1: main value 2: dual value
iPrefix
prefix text.
iSuffix
suffix text
Example:
This example sets PS text of MyValue path.

MyValue.SetBaultText(iIndex, iPrefix, iSuffix)
Parameters
  • i_index (int) –

  • i_prefix (str) –

  • i_suffix (str) –

Returns

None

set_scored_element(i_index, i_scored_element)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetScoredElement(long iIndex,
boolean iScoredElement)

Set dimension scored element.

Parameters:

iIndex
1: main value 2: dual value
iScoredElement
TRUE: Scoring is applied to the all bloc text. FALSE: Scoring is
only applied to the value.
Example:
This example gets dimension scored element of MyValue
path.

MyValue.SetScoredElement(iIndex, iScoredElement)
Parameters
  • i_index (int) –

  • i_scored_element (bool) –

Returns

None

property value

Note

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

Returns value of dimension.

Example:
This example retrieves value of dimension MyDimValue drawing
dimension.

oValue = MyDimValue.Value
Returns

float

property value_framed_element

Note

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

Get dimension framed element.
Example:
This example gets dimension framed element of MyValue
path.

ValueFramedElement = MyValue.ValueFramedElement
Returns

enum cat_dim_framed_element

property value_framed_group

Note

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

Returns or sets dimension framed group.

Example:
This example retrieves dimension framed group MyDimValue drawing
dimension.

oValueFramedGroup = MyDimValue.FakeDimType
Returns

enum cat_dim_framed_group

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

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
Returns

bool

property dim_status

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

property dim_type

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

property dual_value

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

property forshortened

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
Returns

bool

get_boundary_box(o_values)

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)
Parameters

o_values (tuple) –

Returns

None

get_clip(x, y, o_kept_side)

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
Parameters
  • x (float) –

  • y (float) –

  • o_kept_side (int) –

Returns

None

get_dim_ext_line()

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
Returns

DrawingDimExtLine

get_dim_line()

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
Returns

DrawingDimLine

get_tolerances(o_tol_type, o_tol_name, o_up_tol, o_low_tol, od_up_tol, od_low_tol, o_display_mode)

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)
Parameters
  • o_tol_type (int) –

  • o_tol_name (str) –

  • o_up_tol (str) –

  • o_low_tol (str) –

  • od_up_tol (float) –

  • od_low_tol (float) –

  • o_display_mode (int) –

Returns

None

get_value()

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
Returns

DrawingDimValue

property half_dim_mode

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
Returns

bool

property is_clipped

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
Returns

bool

move_value(x, y, sub_part, dim_angle_behavior)

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) –

Returns

None

property nb_ext_line

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
Returns

int

property nb_symb

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
Returns

int

property 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”)
Returns

Parameters

restore_value_position()

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()
Returns

None

set_clip(x, y, i_kept_side)

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) –

Returns

None

set_tolerances(i_tol_type, itol_name, i_up_tol, i_low_tol, id_up_tol, id_low_tol, display_mode)

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) –

Returns

None

property symbols_side

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
Returns

int

property true_dim_mode

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()

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
Returns

None

property value_angle

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
Returns

float

property value_auto_mode

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
Returns

int

property value_display

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
Returns

int

property value_frame

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

property value_in_out

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
Returns

int

property value_orientation

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

property value_reference

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

drawing_dimensions

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_dimensions.DrawingDimensions(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingDimensions

A collection of all the drawing dimensions currently managed by a drawing view
of drawing sheet in a drawing document.
add(i_type_dim, i_geom_elem, i_pt_coord_elem, i_line_rep)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(CatDimType iTypeDim,
CATSafeArrayVariant iGeomElem,
CATSafeArrayVariant iPtCoordElem,
CatDimLineRep iLineRep) As DrawingDimension

Creates a drawing dimension and adds it to the DrawingDimensions
collection.

Parameters:

iTypeDim
Dimension type
iGeomElem
Parent geometrical element(s) of dimension
iPtCoordElem
Array of pointers on the selection points of each element of
iGeomElem
iLineRep
Basic representation mode

Returns:
The created drawing dimension

Example:
The following example creates a drawing angle dimension between two lines
and a partial curvilinear length dimension on an ellipse and retrieved in
MyDimension1 and MyDimension2 in the drawing view collection of the MyView
drawing view. This view belongs to the drawing view collection of the drawing
sheet

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim Fact2D As Factory2D
Set Fact2D = MyView.Factory2D
Dim Line1 As Line2D
Dim Line2 As Line2D
Set Line1 = Fact2D.CreateLine(50, 10, 150, 10)
Set Line2 = Fact2D.CreateLine(50, 10, 120, 100)
Dim Ellipse1 As Ellipse2D
Set Ellipse1 = Fact2D.CreateEllipse(-40, 100, 120, 180,120,90,0, 3)
Dim Point1 As Point2D
Dim Point2 As Point2D
Set Point1 = Fact2D.CreatePoint(-10,190)
Set Point2 = Fact2D.CreatePoint(-120,90)
Dim iType As catDimType
iType = catDimAngle
Dim myElements1(1)
myElements1(1) = Array(Line1,Line2)
Dim selpoints(3)
selpoints(3) = Array(150, 10, 120, 100)
Dim MyDimension1 As DrawingDimension
Set MyDimension1 = MyView.Dimensions.Add(iType, myElements1(1), selpoints(3),catDimAuto)
iType = catDimLengthCurvilinear
Dim myElements2(2)
myElements2(2) = Array(Point1,Point2,Ellipse1)
selpoints(3) = Array(0, 0, 0, 0)
Dim MyDimension2 As DrawingDimension
Set MyDimension2 = MyView.Dimensions.Add(iType, myElements2(1), selpoints(3),catDimOffset)
Parameters
  • i_type_dim (CatDimType) –

  • i_geom_elem (tuple) –

  • i_pt_coord_elem (tuple) –

  • i_line_rep (enum) –

Returns

DrawingDimension

add2(i_type_dim, i_geom_elem, i_pt_coord_elem, i_ldc_ref_elem, i_ldc_ref_angle)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add2(CatDimType iTypeDim,
CATSafeArrayVariant iGeomElem,
CATSafeArrayVariant iPtCoordElem,
CATVariant iLDCRefElem,
long iLDCRefAngle) As DrawingDimension

Creates a drawing dimension along a direction and adds it to the
DrawingDimensions collection.

Parameters:

iTypeDim
Dimension type (available types : catDimDistance, catDimLength, catDimRadiusTangent and
catDimDiameterTangent)
iGeomElem
Parent geometrical element(s) of dimension
iPtCoordElem
Array of pointers on the selection points of each element of
iGeomElem
iLDCRefElem
Reference geometrical element for the direction of the dimension
line .iLDCRefElem can be null: in this case, the view is the reference element

iLDCRefAngle
Angle between the reference element and the direction of the
dimension line

Returns:
The created drawing dimension (The property CATDimLineRep of the
dimension line of the created dimension is set to catDimUserDefined)


Example:
The following example creates a drawing distance dimension between two
points along the direction of a line and retrieved in MyDimension in the
drawing view collection of the MyView drawing view. This view belongs to the
drawing view collection of the drawing sheet

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim Fact2D As Factory2D
Set Fact2D = MyView.Factory2D
Dim Point1 As Point2D
Dim Point2 As Point2D
Set Point1 = Fact2D.CreatePoint(40, 230)
Set Point2 = Fact2D.CreatePoint(80, 210)
Dim Line1 As Line2D
Set Line1 = Fact2D.CreateLine(50, 10, 150, 10)
Dim iType As catDimType
iType = catDimDistance
Dim myElements(1)
myElements(1) = Array(Point1,Point2)
Dim selpoints(3)
selpoints(3) = Array(0, 0, 0, 0)
Dim MyDimension As DrawingDimension
Set MyDimension = MyView.Dimensions.Add2(iType, myElements(1), selpoints(3), Line1, 0)
Parameters
  • i_type_dim (CatDimType) –

  • i_geom_elem (tuple) –

  • i_pt_coord_elem (tuple) –

  • i_ldc_ref_elem (CATVariant) –

  • i_ldc_ref_angle (int) –

Returns

DrawingDimension

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(CATVariant iIndex) As DrawingDimension

Returns a drawing dimension using its index or its name from the
DrawingDimensions collection.

Parameters:

iIndex
The index or the name of the drawing dimension to retrieve from the
collection of drawing dimensions. As a numerics, this index is the rank of the
drawing dimension in the collection. The index of the first drawing dimension
in the collection is 1, and the index of the last drawing dimension is Count.
As a string, it is the name you assigned to the drawing dimension using the


AnyObject.Name property or when creating it using the Add method.

Returns:
The retrieved drawing dimension
Example:

This example retrieves in ThisDrawingDimension the second drawing
dimension,
and in ThatDrawingDimension the drawing dimension
named
MyDimension in the drawing dimension collection of the active
view.


Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingDimension As DrawingDimension
Set ThisDrawingDimension = MyView.Dimensions.Item(2)
Dim ThatDrawingDimension As DrawingDimension
Set ThatDrawingDimension = MyView.Dimensions.Item(“MyDimension”)
Parameters

i_index (CATVariant) –

Returns

DrawingDimension

remove(i_index)

Note

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

Removes a drawing dimension from the DrawingDimensions
collection.

Parameters:

iIndex
The index of the drawing dimension to remove from the collection of
drawing dimensions. As a numerics, this index is the rank of the drawing
dimension in the collection. The index of the first drawing dimension in the
collection is 1, and the index of the last drawing dimension is Count.


Example:
The following example removes the third drawing dimension in the
drawing dimension collection of the active view of the active document,
supposed to be a drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.Dimensions.Remove(3)
Parameters

i_index (CATVariant) –

Returns

None

drawing_document

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_document.DrawingDocument(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
InfInterfaces.Document
DrawingDocument

Represents the Document object for drawings.
property drawing_root

Note

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

Retrieves the drawing root in the drawing document.

Example:
This example retrieves the drawing from the active document, supposed
to be a drawing document.

CATIA.ActiveDocument.DrawingRoot
Returns

DrawingRoot

isolate()

Note

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

Isolates all the drawing views of all the drawing sheets of the drawing
document.

Example:
This example isolates all the drawing views of all the drawing sheets
of the active document, supposed to be a drawing
document.

CATIA.ActiveDocument.Isolate
Returns

None

property 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 drawing
document.

Example:

This example retrieves in DrawingParameters the collection
of
parameters currently managed by the active document, supposed to be
a
drawing document.


Dim DrawingParameters As Parameters
Set DrawingParameters = CATIA.ActiveDocument.Parameters
Returns

Parameters

property relations

Note

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

Returns the collection of relations of the drawing
document.

Example:

This example retrieves in DrawingRelations the collection
of
relations currently managed by the active document, supposed to be
a
drawing document.


Dim DrawingRelations As Relations
Set DrawingRelations = CATIA.ActiveDocument.Relations
Returns

Relations

property sheets

Note

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

Returns the collection of drawing sheets of the drawing
document.

Example:
This example retrieves in SheetCollection the collection of sheets
currently managed by the active document, supposed to be a drawing
document.

Dim SheetCollection As DrawingSheets
Set SheetCollection = CATIA.ActiveDocument.Sheets
Returns

DrawingSheets

property standard

Note

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

Returns or sets the drawing standard of the drawing
document.

Example:
This example sets the drawing standard of the active document, supposed
to be a drawing document, to ISO.

CATIA.ActiveDocument.Standard = catISO
Returns

enum cat_drawing_standard

update()

Note

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

Updates all the drawing sheets of the drawing document.

Example:
This example updates the active document, supposed to be a drawing
document.

CATIA.ActiveDocument.Update
Returns

None

drawing_leader

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_leader.DrawingLeader(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
DrawingLeader

Represents a drawing leader in a drawing view.
add_interruption(i_first_point_x, i_first_point_y, i_second_point_x, i_second_point_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub AddInterruption(double iFirstPointX,
double iFirstPointY,
double iSecondPointX,
double iSecondPointY)

Add an interruption to an leader.

Parameters:

iFirstPointX
X coordinates of first point.
iFirstPointY
Y coordinates of first point.
iSecondPointX
X coordinates of second point.
iSecondPointY
Y coordinates of second point.
Example:
This example adds an interruption to MyLeader.

iFirstPointX = 10.
iFirstPointY = 20.
iSecondPointX = 20.
iSecondPointY = 20.
MyLeader.AddInterruption iFirstPointX, iFirstPointY,
iSecondPointX, iSecondPointY
Parameters
  • i_first_point_x (float) –

  • i_first_point_y (float) –

  • i_second_point_x (float) –

  • i_second_point_y (float) –

Returns

None

add_point(i_num, i_x, i_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub AddPoint(long iNum,
double iX,
double iY)

Add a point to an leader.

Parameters:

iNum
Point number. Point will be inserted at iNum+1 position.

iX
X coordinates of point to add.
iY
Y coordinates of point to add.
Example:
This example adds a point to MyLeader.

iNum = 1
iX = 10.
iY = 20.
MyLeader.AddPoint iNum, iX, iY
Parameters
  • i_num (int) –

  • i_x (float) –

  • i_y (float) –

Returns

None

property all_around

Note

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

Returns or sets the status of all around.

Example:
This example retrieves the status of all around on MyLeader drawing
leader.

oSymbol = MyLeader.AllAround
Returns

bool

property anchor_point

Note

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

Returns or sets anchor point.

Example:
This example retrieves the anchor point on MyLeader drawing
leader.

oAnchorPoint = MyLeader.AnchorPoint
Returns

int

get_interruptions(o_interruptions)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetInterruptions(CATSafeArrayVariant oInterruptions) As
long

Get leader path.

Parameters:

oInterruptions
List of interruptions coordinates (X1,Y1,X2,Y2,…..Xn,Yn).


Returns:
oNbInterruptions Number of interruptions.
Example:
This example gets interruptions of MyLeader path.

oNbInterruptions = MyLeader.GetInterruptions(oInterruptions)
Parameters

o_interruptions (tuple) –

Returns

int

get_point(i_num, o_x, o_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetPoint(long iNum,
double oX,
double oY)

Get leader point coordinates.

Parameters:

iNum
Point number.
oX
X coordinates of point.
oY
Y coordinates of point.
Example:
This example gets a point to MyLeader.

iNum = 1
MyLeader.GetPoint(iNum, oX, oY)
Parameters
  • i_num (int) –

  • o_x (float) –

  • o_y (float) –

Returns

None

get_points(o_points)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetPoints(CATSafeArrayVariant oPoints) As long

Get leader path.

Parameters:

oPoints
List of points coordinates (X1,Y1,X2,Y2,…..Xn,Yn).


Returns:
oNbPoints Number of points.
Example:
This example gets points of MyLeader path.

oNbPoints = MyLeader.GetPoints(oPoints)
Parameters

o_points (tuple) –

Returns

int

property head_symbol

Note

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

Returns or sets symbol type of head side.

Example:
This example retrieves the symbol type of head side on MyLeader drawing
leader.

oSymbol = MyLeader.HeadSymbol
Returns

enum cat_symbol_type

property head_target

Note

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

Returns or sets target element of head side.

Example:
This example retrieves the target element of head side on MyLeader
drawing leader.

oTarget = MyLeader.HeadTarget
Returns

AnyObject

property leaders

Note

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

Returns the secondary drawing leader collection of the drawing
leader.

Example:
This example retrieves in LeaderCollection the collection of leaders of
the Myleader drawing leader.

Dim LeaderCollection As DrawingLeaders
Set LeaderCollection = MyLeader.Leaders
Returns

DrawingLeaders

modify_point(i_num, i_x, i_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub ModifyPoint(long iNum,
double iX,
double iY)

Modify a point of an leader.

Parameters:

iNum
Point number to modify.
iX
X coordinates of new point.
iY
Y coordinates of new point.
Example:
This example modifies a point to MyLeader.

iNum = 1
iX = -10.
iY = -20.
MyLeader.ModifyPoint iNum, iX, iY
Parameters
  • i_num (int) –

  • i_x (float) –

  • i_y (float) –

Returns

None

property nb_interruption

Note

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

Returns the number of interruptions of leader path.

Example:
This example retrieves the number of interruptions on MyLeader drawing
leader.

oNbInterruption = MyLeader.NbInterruption
Returns

int

property nb_point

Note

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

Returns the number of points of leader path.

Example:
This example retrieves the number of points on MyLeader drawing
leader.

oNbPoint = MyLeader.NbPoint
Returns

int

remove_interruption(i_num)

Note

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

Remove an interruption to an leader.

Parameters:

iNum
Interruption number to delete.
- If iNum equals to 0, all interruptions will be removed.

Example:
This example removes an interruption from
MyLeader.

iNum = 2
MyLeader.RemoveInterruption iNum
Parameters

i_num (int) –

Returns

None

remove_point(i_num)

Note

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

Remove a point from an leader.

Parameters:

iNum
Point number to delete.
Example:
This example removes a point from MyLeader.

iNum = 2
MyLeader.RemovePoint iNum
Parameters

i_num (int) –

Returns

None

drawing_leaders

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_leaders.DrawingLeaders(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingLeaders

A collection of all the drawing leaders currently managed by a drawing view of
drawing sheet in a drawing document.
add(i_head_point_x, i_head_point_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(double iHeadPointX,
double iHeadPointY) As DrawingLeader

Creates a drawing leader and adds it to the DrawingLeaders
collection.

Parameters:

iHeadPointX,iHeadPointY
The x and y coordinates of head side of drawing leader


Returns:
The created drawing leader

Example:
The following example creates a drawing leader and retrieved in MyLeader in
the drawing text collection of the MyText drawing text. This text belongs to
the drawing text collection of the drawing view

Dim MyTexts As DrawingTexts
Set MyTexts = MySheet.Views.ActiveView
Dim MyText As DrawingText
Set MyText = MyTexts.Item(1)
Dim MyLeader As DrawingLeader
Set MyLeader = MyText.Leaders.Add(20., 50)
Parameters
  • i_head_point_x (float) –

  • i_head_point_y (float) –

Returns

DrawingLeader

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(long iIndex) As DrawingLeader

Returns a drawing leader using its index from the DrawingLeaders
collection.

Parameters:

iIndex
The index of the drawing leader to retrieve from the collection of
drawing arrows. As a numerics, this index is the rank of the drawing leader in
the collection. The index of the first drawing leader in the collection is 1,
and the index of the last drawing leader is Count.


Returns:
The retrieved drawing view
Example:
This example retrieves in ThisDrawingLeader the second drawing leader,
in the drawing view collection of the active view in the active sheet, in the
active document supposed to be a drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingLeader As DrawingLeader
Set ThisDrawingLeader = MyView.Leaders.Item(2)
Parameters

i_index (int) –

Returns

DrawingLeader

remove(i_index)

Note

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

Removes a drawing leader from the DrawingLeaders
collection.

Parameters:

iIndex
The index of the drawing leader to remove from the collection of
drawing leaders. As a numerics, this index is the rank of the drawing leader in
the collection. The index of the first drawing leader in the collection is 1,
and the index of the last drawing leader is Count.


Example:
The following example removes the third drawing leader in the drawing
leader collection of the active view of the active document, supposed to be a
drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.DrawingLeaders.Remove(3)
Parameters

i_index (int) –

Returns

None

drawing_page_setup

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_page_setup.DrawingPageSetup(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
InfInterfaces.PageSetup
DrawingPageSetup

Represents the page setup for the drawing documents.

The page setup is the object that stores data which defines how your documents
and images are actually printed on paper. This data includes namely the paper
size, the orientation, the bottom, top, right, and left margins, the zoom
factor, the banner, the printing quality, the choice of the best orientation,
and the choice to fit either the drawing sheet format or the printer
format.
property choose_best_orientation

Note

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

Activates or deactivates the choice of the best
orientation.

Example:
This example requests the best orientation to be chosen for
MySheet.

MySheet.DrawingPageSetUp.ChooseBestOrientation = TRUE
Returns

bool

property fit_to_printer_format

Note

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

Fits the format of the print to the printer format.

Example:
This example turns this calculation on.

MySheet.DrawingPageSetUp.FitToPrinterFormat = TRUE
Returns

bool

property fit_to_sheet_format

Note

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

Fits the format of the print to the sheet format.

Example:
This example turns this calculation on.

MySheet.DrawingPageSetUp.FitToSheetFormat = TRUE
Returns

bool

drawing_picture

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_picture.DrawingPicture(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
DrawingPicture

Represents a drawing picture in a drawing view.
property crop_bottom

Note

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

Returns or sets the cropBottom of the drawing picture. The cropBottom is
the size of the margin on the bottom of the picture. The cropBottom, like any
length, is measured in millimeters.

Example:
This example sets the cropBottom of the MyPicture drawing picture to 10
mm

MyPicture.cropBottom = 10.
Returns

float

property crop_left

Note

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

Returns or sets the cropLeft of the drawing picture. The cropLeft is the
size of the margin on the left of the picture. The cropLeft, like any length,
is measured in millimeters.

Example:
This example sets the cropLeft of the MyPicture drawing picture to 10
mm

MyPicture.cropLeft = 10.
Returns

float

property crop_right

Note

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

Returns or sets the cropRight of the drawing picture. The cropRight is the
size of the margin on the right of the picture. The cropRight, like any length,
is measured in millimeters.

Example:
This example sets the cropRight of the MyPicture drawing picture to 10
mm

MyPicture.cropRight = 10.
Returns

float

property crop_top

Note

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

Returns or sets the cropTop of the drawing picture. The cropTop is the size
of the margin on the top of the picture. The cropTop, like any length, is
measured in millimeters.

Example:
This example sets the cropTop of the MyPicture drawing picture to 10
mm

MyPicture.cropTop = 10.
Returns

float

property format

Note

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

Sets the picture format.

Parameters:

iPictureFormat
Compression format.

Returns:

Legal values:

S_OK
Method correctly executed.
E_FAIL
Method execution failed.
Reasons of the failure are not given.
E_IMPL
No implementation available for this method.

See also:
CatPictureFormat
Returns

enum cat_picture_format

get_original_height()

Note

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

Gets the original height of the drawing picture. The height, like any
length, is measured in millimeters.

Example:
This example gets the original height of the MyPicture drawing
picture

Height = MyPicture.GetOriginalHeight()
Returns

float

get_original_width()

Note

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

Gets the original width of the drawing picture. The width, like any length,
is measured in millimeters.

Example:
This example gets the original width of the MyPicture drawing
picture

Width = MyPicture.GetOriginalWidth()
Returns

float

property height

Note

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

Returns or sets the height of the drawing picture. The height, like any
length, is measured in millimeters.

Example:
This example gets the height of the MyPicture drawing
picture

Height = MyPicture.height
Returns

float

property ratio_lock

Note

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

Returns or sets the ratioLock of the drawing picture. The ratioLock is a
boolean value If ratioLock is True it means that the size must not be changed
by command in a interactive session.But it does not avoid size modifications
thru VBScript exec (height and width still available for
modification).

Example:
This example sets the ratioLock of the MyPicture drawing picture to
True

MyPicture.ratioLock = True
Returns

bool

property width

Note

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

Returns or sets the width of the drawing picture. The width, like any
length, is measured in millimeters.

Example:
This example gets the width of the MyPicture drawing
picture

Width = MyPicture.width
Returns

float

property x

Note

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

Returns or sets the x coordinate of the drawing picture position. It is
expressed with respect to the view coordinate system. This coordinate, like any
length, is measured in millimeters.

Example:
This example sets the x coordinate of the position of the MyPicture
drawing picture to 5 inches. You need first to convert the 5 inches into
millimeters.

NewXCoordinate = 5*25.4
MyPicture.x = NewXCoordinate
Returns

float

property y

Note

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

Returns or sets the y coordinate of the drawing picture position. It is
expressed with respect to the view coordinate system. This coordinate, like any
length, is measured in millimeters.

Example:
This example sets the y coordinate of the position of the MyPicture
drawing picture to 5 inches. You need first to convert the 5 inches into
millimeters.

NewYCoordinate = 5*25.4
MyPicture.y = NewYCoordinate
Returns

float

drawing_pictures

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_pictures.DrawingPictures(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingPictures

A collection of all the drawing pictures currently managed by a drawing view of
drawing sheet in a drawing document.
add(i_drawing_picture_path, i_position_x, i_position_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(CATBSTR iDrawingPicturePath,
double iPositionX,
double iPositionY) As DrawingPicture

Inserts a drawing picture in the drawing view and adds it to the
DrawingPictures collection.

Parameters:

iDrawingPicturePath
The path of the picture file (ex : “C:/tmp/ball.bmp”) .
iPositionX,iPositionY
The drawing picture x and y coordinates, expressed in millimeters,
with respect to the drawing view coordinate system


Returns:
The inserted drawing picture

Example:
The following example inserts a drawing picture from a given picture file
path The MyView is the active view in the active drawing
sheet

Dim MySheet As DrawingSheet
Set MySheet = CATIA.ActiveDocument.Sheets.ActiveSheet
Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim MyDrawingPicture1 As DrawingPicture
Set MyDrawingPicture1 = MyView.Pictures.Add(“C:/tmp/ball.bmp”, 100., 50.)
Parameters
  • i_drawing_picture_path (str) –

  • i_position_x (float) –

  • i_position_y (float) –

Returns

DrawingPicture

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(CATVariant iIndex) As DrawingPicture

Returns a drawing picture using its index or its name from the
DrawingPictures collection.

Parameters:

iIndex
The index or the name of the drawing picture to retrieve from the
collection of drawing pictures. As a numerics, this index is the rank of the
drawing picture in the collection. The index of the first drawing picture in
the collection is 1, and the index of the last drawing picture is Count. As a
string, it is the name you assigned to the drawing picture using the


AnyObject.Name property
Returns:
The retrieved drawing picture

Example:
This example retrieves in ThisDrawingPicture the second drawing picture,
MyView in the drawing view collection of the active sheet in the active
document, supposed to be a drawing document.

Dim MySheet As DrawingSheet
Set MySheet = CATIA.ActiveDocument.Sheets.ActiveSheet
Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingPicture As DrawingPicture
Set ThisDrawingPicture = MyView.Pictures.Item(2)
Parameters

i_index (CATVariant) –

Returns

DrawingPicture

remove(i_index)

Note

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

Removes a drawing picture from the DrawingPictures
collection.

Parameters:

iIndex
The index of the drawing picture to remove from the collection of
drawing pictures. As a numerics, this index is the rank of the drawing picture
in the collection. The index of the first drawing picture in the collection is
1, and the index of the last drawing picture is Count. As a string, it is the
name you assigned to the drawing picture using the


AnyObject.Name property

Example:
The following example removes the third drawing picture in the drawing
pictures collection of the active view of the active document, supposed to be a
drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.Pictures.Remove(3)
Parameters

i_index (CATVariant) –

Returns

None

drawing_root

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_root.DrawingRoot(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
DrawingRoot

Represents the drawing object in drawing documents.

Warning: This interface is not available with 2D Layout for 3D
Design.
property active_sheet

Note

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

Retrieves or sets the active sheet of the drawing.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves the active sheet in the drawing of the active
document, supposed to be a drawing document.

CATIA.ActiveDocument.DrawingRoot.GetActiveSheet
Returns

DrawingSheet

isolate()

Note

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

Isolates all the drawing views of all the drawing sheets of the drawing
document.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example isolates all the drawing views of all the drawing sheets
of the active document, supposed to be a drawing
document.

CATIA.ActiveDocument.Isolate
Returns

None

property 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 drawing
document.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:

This example retrieves in DrawingParameters the collection
of
parameters currently managed by the active document, supposed to be
a
drawing document.


Dim DrawingParameters As Parameters
Set DrawingParameters = CATIA.ActiveDocument.Parameters
Returns

Parameters

property relations

Note

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

Returns the collection of relations of the drawing
document.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:

This example retrieves in DrawingRelations the collection
of
relations currently managed by the active document, supposed to be
a
drawing document.


Dim DrawingRelations As Relations
Set DrawingRelations = CATIA.ActiveDocument.Relations
Returns

Relations

reorder_sheets(i_ordered_sheets)

Note

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

Changes the positions of the sheets in this drawing according to the given
ordered list. iOrderedSheets is the result of a permutation applied to the list
of all the sheets of this drawing, with the following constraint: For every
non-detail sheet, there is not any detail sheet appearing before in
iOrderedSheets.

Example:
This example inverts the sheet order of a drawing made of exactly two
regular sheets.

Set drwsheets = CATIA.ActiveDocument.Sheets
Set drwsheetsorder = CATIA.ActiveDocument.DrawingRoot
Set sheet1 = drwsheets.item(1)
Set sheet2 = drwsheets.item(2)
newsheetorder = Array(sheet2, sheet1)
drwsheetsorder.reorder_Sheets(newsheetorder)
Parameters

i_ordered_sheets (tuple) –

Returns

None

property sheets

Note

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

Returns the collection of drawing sheets of the drawing
document.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in SheetCollection the collection of sheets
currently managed by the active document, supposed to be a drawing
document.

Dim SheetCollection As DrawingSheets
Set SheetCollection = CATIA.ActiveDocument.Sheets
Returns

DrawingSheets

property standard

Note

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

Returns or sets the drawing standard of the drawing
document.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example sets the drawing standard of the active document, supposed
to be a drawing document, to ISO.

CATIA.ActiveDocument.Standard = catISO
Returns

enum cat_drawing_standard

update()

Note

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

Updates all the drawing sheets of the drawing document.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example updates the active document, supposed to be a drawing
document.

CATIA.ActiveDocument.Update
Returns

None

drawing_sheet

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_sheet.DrawingSheet(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
DrawingSheet

Represents a drawing sheet of the drawing document.

The drawing sheet is included in a drawing document and contains drawing
views.
Warning: This interface is not available with 2D Layout for 3D
Design.
activate()

Note

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

Activates the drawing sheet. Activating a drawing sheet means that this
drawing sheet is the one on which the end user is now working. The window in
the application’s window collection which contains this drawing sheet becomes
the active one.

Example:
This example activates the MySheet drawing sheet.

MySheet.Activate
Returns

None

force_update()

Note

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

Forces the update of all the drawing views of the drawing sheet. This
update redraws all the views, whether their pointed objects have been modified
since the drawing sheet creation or last update or not. These pointed objects
can be CATIA Version 4 models, or CATIA Version 5 parts or
assemblies.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example forces the update of all the drawing views in the MySheet
drawing sheet.

MySheet.ForceUpdate
Returns

None

property gen_views_pos_mode

Note

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

Returns or sets the generative views position stability
mode.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example sets the stability mode of the MySheet drawing sheet so
that after an update, existing and unmodified geometries don’t move
globally.

MySheet.GenViewsPosMode = catFixedAxis
Returns

enum cat_sheet_gen_views_pos_mode

generate_dimensions()

Note

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

Generates dimensions in all the drawing views of the drawing sheet. These
dimensions are generated from the constraints of the pointed 3D part(s). One
dimension only is generated for a given constraint. Only dimensions for the
following constraints are generated: distance, length, angle, radius, and
diameter.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example generates the dimensions for all the views in the MySheet
drawing sheet.

MySheet.GenerateDimensions
Returns

None

get_paper_height()

Note

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

Gets the paper width of the drawing sheet.

Parameters:

oPaperHeight

Example:
This example get the height of the
DrawingSheet1.

DrawingSheet1.GetPaperHeight oPaperHeight
Returns

float

get_paper_width()

Note

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

Gets the paper width of the drawing sheet.

Parameters:

oPaperWidth

Example:
This example get the width of the
DrawingSheet1.

DrawingSheet1.GetPaperWidth oPaperWidth
Returns

float

is_detail()

Note

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

Checks whether the sheet is a detail sheet.
Warning: This method is not available with 2D Layout for 3D
Design.
TRUE if the sheet is a detail sheet.

Example:
This example checks whether MySheet is a detail sheet.

IsDetail = MySheet.IsDetail
Returns

bool

isolate()

Note

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

Isolates the drawing sheet.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example isolates the MySheet drawing sheet.

MySheet.Isolate
Returns

None

property orientation

Note

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

Returns or sets the paper orientation.

Example:
This example sets the paper orientation for the MySheet drawing sheet
to catPaperLandscape.

MySheet.Orientation = catPaperLandscape
Returns

enum cat_paper_orientation

property page_setup

Note

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

Returns the page setup.

Example:
This example returns the page setup for the MySheet drawing
sheet.

Dim MySheetPageSetup As DrawingPageSetup
Set MySheetPageSetup = MySheet.PageSetup
Returns

DrawingPageSetup

property paper_size

Note

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

Returns or sets the paper size.

Example:
This example sets the page size for the MySheet drawing sheet to
catPaperA4.

MySheet.PaperSize = catPaperA4
Returns

enum cat_paper_size

property print_area

Note

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

Returns the print area definition object.

Example:
This example returns the print area for the MySheet drawing
sheet.

Dim MyPrintArea As PrintArea
Set MyPrintArea = MySheet.PrintArea
Returns

PrintArea

print_out()

Note

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

Prints the drawing sheet according to its page setup on the default
printer.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example prints the DrawingSheet1 on the default
printer.

DrawingSheet1.PrintOut
Returns

None

print_to_file(file_name)

Note

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

Prints the drawing sheet according its page setup in a file instead of
being sent to a printer.

Parameters:

fileName
The full pathname of the file receiving the data.
Warning: This method is not available with 2D Layout for 3D Design.


Example:
This example prints the DrawingSheet1 in a file.

DrawingSheet1.PrintToFile “e://temp//sheet1.prn”
Parameters

file_name (str) –

Returns

None

property projection_method

Note

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

Returns or sets the sheet projection mode .

Example:
This example sets the projection mode of the MySheet drawing sheet to
catFirstAngle.

MySheet.ProjectionMethod = catFirstAngle
Returns

enum cat_sheet_projection_method

reorder_views(i_ordered_views)

Note

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

Changes the positions of the views in this sheet according to the given
ordered list. iOrderedViews is the result of a permutation applied to the list
of all the views of this sheet with the following constraint: the two first
elements of the list must be respectively the sheet’s mainview and background
view.

Example:
This example modifies the views order of a sheet made of a mainview, a
backgroundview and two user-created views. (user-created views are
inverted).

Set drwviewsorder = CATIA.ActiveDocument.Sheets.ActiveSheet
Set drwviews = drwviewsorder.Views
Set mainview = drwviews.item(1)
Set backview = drwviews.item(2)
Set view1 = drwviews.item(3)
Set view2 = drwviews.item(4)
newvieworder = Array(mainview, backview, view2, view1)
drwviewsorder.reorder_Views(newvieworder)
Parameters

i_ordered_views (tuple) –

Returns

None

property scale

Note

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

Returns or sets the scale of the drawing sheet.

Example:
This example sets the scale of the MySheet drawing sheet to
0.5.

MySheet.Scale = 0.5
Returns

float

property scale2

Note

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

Returns or sets the scale of the drawing sheet (Workaround for VBA
keyword).

Example:
This example sets the scale of the MySheet drawing sheet to
0.5.

MySheet.Scale2 = 0.5
Returns

float

set_as_detail()

Note

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

Sets the sheet as a detail sheet. You can now create views into this sheet
that will be taken as details. A detail is made to be reuse as dittos in
views.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example changes the MySheet into a detail sheet.

MySheet.SetAsDetail
Returns

None

set_paper_height(o_paper_height)

Note

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

Sets the paper width of the drawing sheet, available on user
format.

Parameters:

iPaperHeight

Example:
This example set the height of the
DrawingSheet1.

DrawingSheet1.PaperSize = catPaperUser
DrawingSheet1.SetPaperHeight iPaperHeight
Parameters

o_paper_height (float) –

Returns

None

set_paper_width(o_paper_width)

Note

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

Sets the paper width of the drawing sheet, available on user
format.

Parameters:

iPaperWidth

Example:
This example set the width of the
DrawingSheet1.

DrawingSheet1.PaperSize = catPaperUser
DrawingSheet1.SetPaperWidth iPaperWidth
Parameters

o_paper_width (float) –

Returns

None

update()

Note

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

Updates the drawing views of the drawing sheet. This update redraws all the
views whose pointed objects have been modified since the drawing sheet creation
or last update, but do not redraw the views whose pointed have not been
modifed. These pointed objects can be CATIA Version 4 models, or CATIA Version
5 parts or assemblies.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example updates the drawing views in the MySheet drawing
sheet.

MySheet.Update
Returns

None

property views

Note

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

Returns the drawing view collection of the drawing sheet.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in ViewCollection the collection of views of the
MySheet drawing sheet.

Dim ViewCollection As DrawingViews
Set ViewCollection = MySheet.Views
Returns

DrawingViews

drawing_sheets

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_sheets.DrawingSheets(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingSheets

A collection of all the drawing sheets currently managed by the drawing
document.

Warning: This interface is not available with 2D Layout for 3D
Design.
property active_sheet

Note

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

Returns the active drawing sheet of the drawing document.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
The following example retrieves in SheetToWorkIn the active drawing
sheet of the drawing document named CATDrawing1.

Dim MyDrawingDoc As Document
Set MyDrawingDoc = CATIA.Documents.Item(“CATDrawing1”)
Dim SheetToWorkIn As DrawingSheet
Set SheetToWorkIn = MyDrawingDoc.Sheets.ActiveSheet
Returns

DrawingSheet

add(i_drawing_sheet_name)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(CATBSTR iDrawingSheetName) As DrawingSheet

Creates a drawing sheet and adds it to the DrawingSheets collection. This
drawing sheet becomes the active one.
Warning: This method is not available with 2D Layout for 3D
Design.

Parameters:

iDrawingSheetName
The name to assign to the created DrawingSheet object


Returns:
The created drawing sheet
Example:
The following example creates a drawing sheet named FirstSheet and
retrieved in MySheet in the drawing sheet collection of the document named
CATDrawing1.

Dim MyDrawingDoc As Document
Set MyDrawingDoc = CATIA.Documents.Item(“CATDrawing1”)
Dim MySheet As DrawingSheet
Set MySheet = MyDrawingDoc.Sheets.Add(“FirstSheet”)
Parameters

i_drawing_sheet_name (str) –

Returns

DrawingSheet

add_detail(i_drawing_sheet_name)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func AddDetail(CATBSTR iDrawingSheetName) As DrawingSheet

Creates a detail drawing sheet and adds it to the DrawingSheets collection.
This detail drawing sheet becomes the active one.
Warning: This method is not available with 2D Layout for 3D
Design.

Parameters:

iDrawingSheetName
The name to assign to the created detail DrawingSheet object


Returns:
The created drawing sheet
Example:
The following example creates a detail drawing sheet named FirstSheet
and retrieved in MySheet in the drawing sheet collection of the document named
CATDrawing1.

Dim MyDrawingDoc As Document
Set MyDrawingDoc = CATIA.Documents.Item(“CATDrawing1”)
Dim MySheet As DrawingSheet
Set MySheet = MyDrawingDoc.Sheets.Add(“FirstSheet”)
Parameters

i_drawing_sheet_name (str) –

Returns

DrawingSheet

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(CATVariant iIndex) As DrawingSheet

Returns a drawing sheet using its index or its name from the DrawingSheets
collection.
Warning: This method is not available with 2D Layout for 3D
Design.

Parameters:

iIndex
The index or the name of the drawing sheet to retrieve from the
collection of drawing sheets. As a numerics, this index is the rank of the
drawing sheet in the collection. The index of the first drawing sheet in the
collection is 1, and the index of the last drawing sheet is Count. As a string,
it is the name you assigned to the drawing sheet using the


AnyObject.Name property or when creating it using the Add method.

Returns:
The retrieved drawing sheet
Example:
This example retrieves in ThisDrawingSheet the third drawing sheet, and
in ThatDrawingSheet the drawing sheet named MySheet in the drawing sheet
collection of the active document, supposed to be a drawing
document.

Dim ThisDrawingSheet As DrawingSheet
Set ThisDrawingSheet = CATIA.ActiveDocument.Sheets.Item(3)
Dim ThatDrawingSheet As DrawingSheet
Set ThatDrawingSheet = CATIA.ActiveDocument.Sheets.Item(“MySheet”)
Parameters

i_index (CATVariant) –

Returns

DrawingSheet

remove(i_index)

Note

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

Removes a drawing sheet from the DrawingSheets collection.
Warning: This method is not available with 2D Layout for 3D
Design.

Parameters:

iIndex
The index or the name of the drawing sheet to remove from the
collection of drawing sheets. As a numerics, this index is the rank of the
drawing sheet in the collection. The index of the first drawing sheet in the
collection is 1, and the index of the last drawing sheet is Count. As a string,
it is the name you assigned to the drawing sheet using the


AnyObject.Name property or when creating it using the Add method.

Example:
The following example removes the second drawing sheet and the drawing
sheet named SheetToBeRemoved in the drawing sheet collection of the active
document, supposed to be a drawing document.

CATIA.ActiveDocument.DrawingSheets.Remove(2)
CATIA.ActiveDocument.DrawingSheets.Remove(“SheetToBeRemoved”)
Parameters

i_index (CATVariant) –

Returns

None

drawing_table

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_table.DrawingTable(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
DrawingTable

Represents a drawing table in a drawing view.
add_column(i_col)

Note

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

Adds a column before the indicated column.

Parameters:

iCol
The column before which the new column will be
inserted

Example:
This example adds a column after the last one of the drawing
table MyTable.

iCol = 0
MyTable.AddColumn iCol
Parameters

i_col (int) –

Returns

None

add_row(i_row)

Note

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

Adds a row before the indicated row.

Parameters:

iRow
The row before which the new row will be inserted

Example:
This example adds a row beetween the first row and the second
row of the drawing table MyTable.

iRow = 2
MyTable.AddRow iRow
Parameters

i_row (int) –

Returns

None

property anchor_point

Note

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

Returns or sets the anchor point of a drawing table.

Parameters:

iMode
The invert mode to apply

Example:
This example sets the anchor point of the drawing table MyTable
to bottom left.

MyTable.AnchorPoint = CatTableBottomLeft
Returns

enum cat_table_position

property angle

Note

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

Returns or sets the angle orientation of a drawing table.

Example:
This example sets the orientation of the table MyTable to
vertical.

PI = 3.1415926535
X = MyTable.Angle = PI/2
Returns

float

property compute_mode

Note

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

Returns or sets the compute mode of a drawing table. If the compute mode is
set to OFF, no display of the modifications applied to a table will be
computed. This allows to save much time when executing a macro. To displayed
the table, set the compute mode back to ON.

Example:
This example sets the compute mode of the drawing table MyTable to
OFF.

MyTable.ComputeMode = CatTableOFF
Returns

enum cat_table_compute_mode

get_cell_alignment(i_row, i_col)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetCellAlignment(long iRow,
long iCol) As CatTablePosition

Retrieves the alignment of the pointed cell of a drawing
table.

Parameters:

iRow
The cell row
iCol
The cell column
oAlign
The alignment type of the cell

Example:
This example retrieves the alignment of the cell (1,3) of the
table MyTable.

iRow = 1
iCol = 3
oAlign = MyTable.GetCellAlignment(iRow, iCol)
Parameters
  • i_row (int) –

  • i_col (int) –

Returns

enum cat_table_position

get_cell_border_type(i_row, i_col)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetCellBorderType(long iRow,
long iCol) As CatTableBorderType

Retrieves the drawing text contained in the cell of a drawing
table.

Parameters:

iRow
The cell row
iCol
The cell column
oType
The type of the cell border

Example:
This example retrieves the border type of the cell (1, 3) of
the drawing table MyTable.

iRow = 1
iCol = 3
oType = MyTable.GetCellBorderType(iRow, iCol)
!!!! WARNING oType is not defined as the enum does but as it
is documented in the SetCellBorderType method
if oType == 15 it means border is set to left, top, right and
bottom.
if oType == 8 it means border is set to bottom.
Parameters
  • i_row (int) –

  • i_col (int) –

Returns

enum cat_table_border_type

get_cell_name(i_row, i_col)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetCellName(long iRow,
long iCol) As CATBSTR

Returns the name of a table cell.

Parameters:

iRow
The cell row
iCol
The cell column
oName
The cell name

Example:
This example returns the name of the cell (1,2) of the table
MyTable.

iRow = 1
iCol = 2
oName = MyTable.GetCellName(iRow, iCol)
Parameters
  • i_row (int) –

  • i_col (int) –

Returns

str

get_cell_object(i_row, i_col)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetCellObject(long iRow,
long iCol) As DrawingText

Retrieves the object contained in the cell of a drawing
table.

Parameters:

iRow
The cell row
iCol
The cell column
oText
The object contained in the cell : this object only supports font properties, color, line
spacing, Super/Sub script. Do not use position and/or orientation properties on this
object, it is useless.

Example:
This example retrieves the drawing text MyText of the cell
(1,3) of the table MyTable.

iRow = 1
iCol = 3
Set MyText = MyTable.GetCellObject(iRow, iCol)
Parameters
  • i_row (int) –

  • i_col (int) –

Returns

DrawingText

get_cell_string(i_row, i_col)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetCellString(long iRow,
long iCol) As CATBSTR

Returns the string contained in the cell of a drawing
table.

Parameters:

iRow
The cell row
iCol
The cell column
oString
The string contained in the cell

Example:
This example returns the string contained in the cell (1,4) of
the table MyTable.

iRow = 1
iCol = 4
oString = MyTable.GetCellString(iRow, iCol)
Parameters
  • i_row (int) –

  • i_col (int) –

Returns

str

get_cells_merge(o_list_of_merge_cells)

Note

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

Returns the merge cells.

Parameters:

oListOfMergeCells
@param oListOfMergeCells List of merge cells.

Example:
This example returns the merge cells of the drawing table
MyTable.

nbrow = MyTable.NumberOfRows
nbcol = MyTable.NumberOfColumns
sizetab = nbrow*nbcol
ReDim infoMerge (sizetab-1)
MyTable.GetCellsMerge(oListOfmergeCells)
Parameters

o_list_of_merge_cells (tuple) –

Returns

None

get_column_size(i_col)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetColumnSize(long iCol) As double

Returns the width of a column of a drawing table.

Parameters:

iCol
The cell column
oColSize
The cell width in mm. It corresponds to the size of the widest cell
of the column or at least the size set with
CATIADrawingTable::SetColumnSize.

Example:
This example returns the width of the column (1) of the drawing
table MyTable.

iCol = 1
oColSize = MyTable.GetColumnSize(iCol)
Parameters

i_col (int) –

Returns

float

get_merge_infos(i_row, i_col, o_first_row, o_first_col, o_nb_row, o_nb_col)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetMergeInfos(long iRow,
long iCol,
long oFirstRow,
long oFirstCol,
long oNbRow,
long oNbCol)

Returns informations about a group of merge cells from a
cell.

Parameters:

iRow
@param iCol cell of merge
iFirstRow
Row of the first cell of the group Column of the first cell of the
group
iNbRowMerge
Number of rows of the group
iNbColMerge
Number of columns of the group

Example:
This example returns informations of a group of merge cells
from cell (2, 3) of the drawing table MyTable.

MyTable.GetMergeInfos 2, 3, oFirstRow, oFirstCol, oNbRow,
oNbCol
Parameters
  • i_row (int) –

  • i_col (int) –

  • o_first_row (int) –

  • o_first_col (int) –

  • o_nb_row (int) –

  • o_nb_col (int) –

Returns

None

get_row_size(i_row)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetRowSize(long iRow) As double

Returns the height of a row of a drawing table.

Parameters:

iRow
The cell row
oRowSize
The cell height in mm. It corresponds to the size of the highest
cell of the row or at least the size set with
CATIADrawingTable::SetRowsize.

Example:
This example returns the height of the row (1) of the drawing
table MyTable.

iRow = 1
oRowSize = MyTable.GetRowSize(iRow)
Parameters

i_row (int) –

Returns

float

invert_mode(i_mode)

Note

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

Sets a mode of table inversion.

Example:
This example swaps the columns of the drawing table
MyTable.

MyTable.InvertMode CatInvertColumn
Parameters

i_mode (CatTableInvertMode) –

Returns

None

property leaders

Note

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

Returns the drawing leader collection of the drawing
table.

Example:
This example retrieves in LeaderCollection the collection of leaders of
the MyTable drawing table.

Dim LeaderCollection As DrawingLeaders
Set LeaderCollection = MyTable.Leaders
Returns

DrawingLeaders

merge_cells(i_first_row, i_first_col, i_nb_row_merge, i_nb_col_merge)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub MergeCells(long iFirstRow,
long iFirstCol,
long iNbRowMerge,
long iNbColMerge)

Merges a group of cells.

Parameters:

iFirstRow
@param iFirstCol First cell of merge
iNbRowMerge
Number of rows to merge
iNbColMerge
Number of columns to merge

Example:
This example merges cells from cell (2, 3) to cell (4, 5) of
the drawing table MyTable.

MyTable.MergeCells 2, 3, 3, 3
Parameters
  • i_first_row (int) –

  • i_first_col (int) –

  • i_nb_row_merge (int) –

  • i_nb_col_merge (int) –

Returns

None

move(i_delta_x, i_delta_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub Move(double iDeltaX,
double iDeltaY)

Moves the table relatively to its original position.

Parameters:

iDeltaX
The X deviation
ideltaY
The Y deviation

Example:
This example moves the table MyTable to 20mm in
X.

DeltaX = 20.0
DeltaY = 0.0
MyTable.Move DeltaX, DeltaY
Parameters
  • i_delta_x (float) –

  • i_delta_y (float) –

Returns

None

property number_of_columns

Note

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

Returns the number of columns of a drawing table.

Example:
This example returns the number of columns of the drawing table
MyTable.

oNbCol = MyTable.NumberOfColumns
Returns

int

property number_of_rows

Note

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

Returns the number of rows of a drawing table.

Example:
This example returns the number of rows of the drawing table
MyTable.

oNbRow = MyTable.NumberOfRows
Returns

int

remove_column(i_col)

Note

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

Removes the indicated column.

Parameters:

iCol
The column to remove

Example:
This example removes the first column of the drawing table
MyTable.

iCol = 1
MyTable.RemoveColumn iCol
Parameters

i_col (int) –

Returns

None

remove_row(i_row)

Note

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

Removes the indicated row.

Parameters:

iRow
The row to remove

Example:
This example removes the third row of the drawing table
MyTable.

iRow = 3
MyTable.RemoveRow iRow
Parameters

i_row (int) –

Returns

None

rotate(i_delta_angle)

Note

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

Rotates the table relatively to its original position.

Parameters:

iDeltaAngle
The angle of rotation from the current position

Example:
This example rotates the table MyTable to 45
degrees.

PI = 3.1415926535
MyTable.Rotate PI/4
Parameters

i_delta_angle (float) –

Returns

None

set_cell_alignment(i_row, i_col, i_align)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetCellAlignment(long iRow,
long iCol,
CatTablePosition iAlign)

Sets the pointed cell alignment of a drawing table.

Parameters:

iRow
The cell row
iCol
The cell column
iAlign
The type of alignment to be applied

Example:
This example sets the cell (3,2) alignment of the table MyTable
to bottom left.

iRow = 3
iCol = 2
MyTable.SetCellAlignment iRow, iCol,
CatTableBottomLeft
Parameters
  • i_row (int) –

  • i_col (int) –

  • i_align (CatTablePosition) –

Returns

None

set_cell_border_type(i_row, i_col, i_type)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetCellBorderType(long iRow,
long iCol,
long iType)

Sets the pointed cell border type of a drawing table.

Parameters:

iRow
The cell row
iCol
The cell column
iType
The type of border to be applied

Example:
This example sets the cell (3,2) border type of the table
MyTable to right and left. (1+4)

iRow = 3
iCol = 2
MyTable.SetCellBorderType iRow, iCol, 5


Example:
This example sets the cell (1,1) border type of the table MyTable to all border out
line (left, top, right and bottom). (1+2+4+8 = 15)

iRow = 3
iCol = 2
MyTable.SetCellBorderType iRow, iCol, 15
Parameters
  • i_row (int) –

  • i_col (int) –

  • i_type (int) –

Returns

None

set_cell_name(i_row, i_col, i_name)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetCellName(long iRow,
long iCol,
CATBSTR iName)

Sets the name of a table cell.

Parameters:

iRow
The cell row
iCol
The cell column
iName
The cell name

Example:
This example sets the name of the cell (1,2) of the table
MyTable to “Cell 2”.

iRow = 1
iCol = 2
iName = “Cell 2”
MyTable.SetCellName iRow, iCol, iName
Parameters
  • i_row (int) –

  • i_col (int) –

  • i_name (str) –

Returns

None

set_cell_object(i_row, i_col, i_text)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetCellObject(long iRow,
long iCol,
DrawingText iText)

Sets an object in a cell of a drawing table.

Parameters:

iRow
The cell row
iCol
The cell column
iText
The Drawing Text to set in the cell

Example:
This example puts the drawing text iText in the cell (1,3) of
the table MyTable.

iRow = 1
iCol = 3
MyTable.SetCellObject iRow, iCol, iText
Parameters
  • i_row (int) –

  • i_col (int) –

  • i_text (DrawingText) –

Returns

None

set_cell_string(i_row, i_col, i_string)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetCellString(long iRow,
long iCol,
CATBSTR iString)

Fills in a table cell with a string.

Parameters:

iRow
The cell row
iCol
The cell column
iString
The Text to be set

Example:
This example fills in the cell (3,2) of the table MyTable with
“Title”.

iRow = 3
iCol = 2
iString = “Title”
MyTable.SetCellString iRow, iCol, iString
Parameters
  • i_row (int) –

  • i_col (int) –

  • i_string (str) –

Returns

None

set_column_size(i_col, i_col_size)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetColumnSize(long iCol,
double iColSize)

Sets the width of a column of a drawing table.

Parameters:

iCol
The cell column
iColSize
The cell width in mm. If 0, the width is automatic (corresponds to
the size of the widest cell of the column).

Example:
This example sets the width of the column (1) of the drawing
table MyTable to 20.

iCol = 1
iColSize = 20
MyTable.SetColumnSize iCol, iColSize
Parameters
  • i_col (int) –

  • i_col_size (float) –

Returns

None

set_row_size(i_row, i_row_size)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetRowSize(long iRow,
double iRowSize)

Sets the height of a row of a drawing table.

Parameters:

iRow
The cell row
iRowSize
The cell height in mm. If 0, the height is automatic (corresponds
to the size of the highest cell of the row).

Example:
This example sets the height of the row (1) of the drawing
table MyTable to 20.

iRow = 1
iRowSize = 20
MyTable.SetRowSize iRow, iRowSize
Parameters
  • i_row (int) –

  • i_row_size (float) –

Returns

None

un_merge_cells(i_row, i_col)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub UnMergeCells(long iRow,
long iCol)

Unmerges a group of cells.

Parameters:

iRow
@param iCol A cell of a merge

Example:
This example unmerges a group of cells of the drawing table
MyTable from the cell (3, 5).

MyTable.UnMergeCells 3, 5
Parameters
  • i_row (int) –

  • i_col (int) –

Returns

None

property x

Note

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

Returns or sets the x coordinate of the table. It is expressed with respect
to the current view coordinate system. This coordinate, like any length, is
measured in mm.

Example:
This example retrieves the x coordinate of the table MyTable drawing
table.

X = MyTable.x
Returns

float

property y

Note

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

Returns or sets the y coordinate of the table. It is expressed with respect
to the view coordinate system. This coordinate, like any length, is measured in
mm.

Example:
This example sets the y coordinate of the table MyTable drawing table
to 5 inches. You need first to convert the 5 inches into
mm.

NewYCoordinate = 100
MyTable.y = NewYCoordinate
Returns

float

drawing_tables

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_tables.DrawingTables(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingTables

A collection of all the drawing tables currently managed by a drawing view of
drawing sheet in a drawing document.
add(i_position_x, i_position_y, i_number_of_row, i_number_of_column, i_row_height, i_column_width)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(double iPositionX,
double iPositionY,
long iNumberOfRow,
long iNumberOfColumn,
double iRowHeight,
double iColumnWidth) As DrawingTable

Creates a drawing table and adds it to the DrawingTables
collection.

Parameters:

iPositionX,iPositionY
The drawing table x and y coordinates, expressed in millimeters,
with respect to the drawing view coordinate system

iNumberOfRow,iNumberOfColumn
The drawing table number of rows and columns
iRowHeight,iColumnWidth
The row height and the column width

Returns:
The created drawing table

Example:
The following example creates an empty drawing table and retrieves it in
MyTable in the drawing table collection of the active view MyView of the
drawing sheet MySheet.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim MyTable As DrawingTable
Set MyTable = MyView.Tables.Add(100., 100., 2, 2, 20., 50.)
Parameters
  • i_position_x (float) –

  • i_position_y (float) –

  • i_number_of_row (int) –

  • i_number_of_column (int) –

  • i_row_height (float) –

  • i_column_width (float) –

Returns

DrawingTable

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(long iIndex) As DrawingTable

Returns a drawing table using its index from the DrawingTables
collection.

Parameters:

iIndex
The index of the drawing table to retrieve from the collection of
drawing tables. As a numerics, this index is the rank of the drawing table in
the collection. The index of the first drawing table in the collection is 1,
and the index of the last drawing table is Count.

Returns:
The retrieved drawing table
Example:
This example retrieves in ThisDrawingTable the second drawing table, in
the drawing view collection of the active view in the active sheet, in the
active document supposed to be a drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingTable As DrawingTable
Set ThisDrawingTable = MyView.Tables.Item(2)
Parameters

i_index (int) –

Returns

DrawingTable

remove(i_index)

Note

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

Removes a drawing table from the DrawingTables collection.

Parameters:

iIndex
The index of the drawing table to remove from the collection of
drawing tables. As a numerics, this index is the rank of the drawing table in
the collection. The index of the first drawing table in the collection is 1,
and the index of the last drawing table is Count.

Example:
The following example removes the third drawing table in the drawing
table collection of the active view of the active document, supposed to be a
drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.DrawingTables.Remove(3)
Parameters

i_index (int) –

Returns

None

drawing_text

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_text.DrawingText(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
DrawingText

Represents a drawing text in a drawing view.
activate_frame(itype)

Note

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

Activates the text frame of the drawing text.

Example:
This example adds a rectangle frame to MyText drawing
text.

CatTextFrameType ityp = catRectangle
MyText.ActivateFrame(itype)


This example removes the frame to MyText drawing text.

CatTextFrameType ityp = catNone
MyText.ActivateFrame(itype)
Parameters

itype (CatTextFrameType) –

Returns

None

property anchor_position

Note

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

Returns or sets the anchor position of the drawing text.

Example:
This example sets the anchor position of the MyText drawing text to top
left position.

MyText.AnchorPosition = TopLeft
Returns

enum cat_text_anchor_position

property angle

Note

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

Returns or sets the angle of the drawing text. The angle is measured
between the axis system of the drawing view and the local axis system of the
drawing text. The angle is measured in radians and is counted
counterclockwise.

Example:
This example sets the angle of the MyText drawing Text to 90 degrees
clockwise. You first need to compute the angle in degrees and set the minus
sign to indicate the rotation is clockwise.

Angle90Clockwise = -90
MyText.Angle = Angle90Clockwise
Returns

float

property associative_element

Note

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

Returns or sets the associative object of the drawing
text.

Example:
This example sets an associative line of the MyText drawing text to top
left position.

MyText.AssociativeElement = line
Returns

AnyObject

property frame_type

Note

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

Returns or sets the frame type of the drawing text.

Example:
This example sets the frame type of the MyText drawing text to an
ellipse.

MyText.FrameType = catEllipse
Returns

enum cat_text_frame_type

get_font_name(i_first, inb_character)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetFontName(long iFirst,
long inbCharacter) As CATBSTR

Returns the font name on a substring of the drawing text.

Parameters:

iFirst
The first character to which the property should apply

inbCharacter
The number of characters to which the property should apply


Returns:
oFontName The name of the font
Example:
This example gets the MyText drawing text font.

oFontName = MyText.GetFontName(0, 0)
Parameters
  • i_first (int) –

  • inb_character (int) –

Returns

str

get_font_size(i_first, inb_character)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetFontSize(long iFirst,
long inbCharacter) As double

Returns the font size on a substring of the drawing text.

Parameters:

iFirst
The first character to which the property should apply

inbCharacter
The number of characters to which the property should apply


Returns:
oFontSize The size of the font
Example:
This example gets the MyText font size.

oFontSize = MyText.GetFontSize(0, 0)
Parameters
  • i_first (int) –

  • inb_character (int) –

Returns

float

get_modifiable_in2_d_component_instances()

Note

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

Returns if the text is modifiable or not in 2D component instances. The
text must own to a 2D component (NOT to a view)

Example:
This example retrieves if MyText drawing text is modifiable or
not

IsModifiable = MyText.GetModifiableIn2DComponentInstances
Returns

bool

get_parameter_on_sub_string(i_param, i_first, inb_character)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetParameterOnSubString(CatTextProperty iParam,
long iFirst,
long inbCharacter) As long

Returns a property on a substring of the drawing text.

Parameters:

iParam
The drawing text property
iFirst
The first character to which the property should apply

inbCharacter
The number of characters to which the property should apply


Returns:
oval The value corresponding to the property
Example:
This example gets the parameter Italic on MyText drawing
text.

CatTextProperty iParam = catItalic
iFirst = 0
inbCharacter = 0
oval = MyText.GetParameterOnsubString(iParam, iFirst, inbCharacter)
Parameters
  • i_param (CatTextProperty) –

  • i_first (int) –

  • inb_character (int) –

Returns

int

insert_variable(i_first, inb_character, ibase)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub InsertVariable(long iFirst,
long inbCharacter,
CATBaseDispatch ibase)

Sets a Parameter in a string of the drawing text.

Parameters:

iFirst
The first character from which the parameter is inserted

inbCharacter
The number of characters the parameter will replace

iParameter
The parameter to be inserted
Example:
This example sets a parameter right at the end of MyText drawing
text.

Dim DrwDocument As DrawingDocument
Set DrwDocument = CATIA.ActiveDocument

Dim iParameter As Parameter
Set iParameter = DrwDocument.Parameters.Item(“Drawing/Sheet.1/ViewMakeUp.1/Scale”)

MyText.InsertVariable 0, 0, iParameter
Parameters
  • i_first (int) –

  • inb_character (int) –

  • ibase (AnyObject) –

Returns

None

property leaders

Note

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

Returns the drawing leader collection of the drawing text.

Example:
This example retrieves in LeaderCollection the collection of leaders of
the MyText drawing text.

Dim LeaderCollection As DrawingLeaders
Set LeaderCollection = MyText.Leaders
Returns

DrawingLeaders

set_font_name(i_first, inb_character, i_font_name)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFontName(long iFirst,
long inbCharacter,
CATBSTR iFontName)

Sets the font size on a substring of the drawing text.

Parameters:

iFirst
The first character to which the property should apply

inbCharacter
The number of characters to which the property should apply

iFontName
The name of the font

Example:
This example sets the MyText drawing text font as Courrier 10
BT.

MyText.SetFontName 0, 0, “Courrier 10 BT”
Parameters
  • i_first (int) –

  • inb_character (int) –

  • i_font_name (str) –

Returns

None

set_font_size(i_first, inb_character, i_font_size)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFontSize(long iFirst,
long inbCharacter,
double iFontSize)

Sets the font size on a substring of the drawing text.

Parameters:

iFirst
The first character to which the property should apply

inbCharacter
The number of characters to which the property should apply

iFontSize
The size of the font
Example:
This example sets the MyText font size to 3.5.

iFontSize = 3.5
MyText.SetFontSize 0, 0, iFontSize
Parameters
  • i_first (int) –

  • inb_character (int) –

  • i_font_size (float) –

Returns

None

set_modifiable_in2_d_component_instances()

Note

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

Sets the text as modifiable in 2D component instances.The text must own to
a 2D component (NOT to a view).then ,its content will be modifiable inside
instances of this 2D component.

Example:
This example sets the MyText drawing text as
modifiable.

MyText.SetModifiableIn2DComponentInstances
Returns

None

set_parameter_on_sub_string(i_param, i_first, inb_character, i_val)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetParameterOnSubString(CatTextProperty iParam,
long iFirst,
long inbCharacter,
long iVal)

Sets a property on a substring of the drawing text.

Parameters:

iParam
The drawing text property
iFirst
The first character to which the property should apply

inbCharacter
The number of characters to which the property should apply

iVal
The value to be applied according to the property
Example:
This example sets all MyText drawing text in bold
character.

CatTextProperty iParam = catBold
iFirst = 0
inbCharacter = 0
ival = 1
MyText.SetParameterOnsubString iParam, iFirst, inbCharacter,
ival
Parameters
  • i_param (CatTextProperty) –

  • i_first (int) –

  • inb_character (int) –

  • i_val (int) –

Returns

None

property text

Note

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

Returns or sets character string that makes up the text.

Example:
This example retrieves in CharString the character string of the MyText
drawing text.

CharString = MyText.Text
Returns

str

property text_properties

Note

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

Returns the text properties of the drawing text. Allows to modify the whole
text properties. To manage a sub part of the text use
GetParameterOnSubString

Example:
This example retrieves in TextProperties the text properties of the
MyText drawing text.

Dim TextProperties As DrawingTextProperties
Set TextProperties = MyText.TextProperties
Returns

DrawingTextProperties

property wrapping_width

Note

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

Returns or sets the wrapping width of the drawing text.

Example:
This example sets the wrapping width of the MyText drawing text to
50.

MyText.WrappingWidth = 50.
Returns

float

property x

Note

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

Returns or sets the x coordinate of the text. It is expressed with respect
to the current view coordinate system. This coordinate, like any length, is
measured in meters.

Example:
This example retrieves the x coordinate of the text MyText drawing
text.

X = MyText.x
Returns

float

property y

Note

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

Returns or sets the y coordinate of the text. It is expressed with respect
to the view coordinate system. This coordinate, like any length, is measured in
meters.

Example:
This example sets the y coordinate of the text MyText drawing text to 5
inches. You need first to convert the 5 inches into
meters.

NewYCoordinate = 5*25.4/1000
MyText.y = NewYCoordinate
Returns

float

drawing_text_properties

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_text_properties.DrawingTextProperties(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
DrawingTextProperties

Represents the properties of a drawing text in a drawing view.

This interface is obtained from CATIADrawingText or CATIADrawingWelding
interface. Update method must be called after text properties modification to
refresh the visualization.
activate_frame(i_type)

Note

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

Activates the text frame of the drawing text.

Parameters:

iType
The text frame type

Example:
This example add a rectangle frame to MyText drawing
text.

CatTextFrameType itype = catRectangle
MyText.ActivateFrame itype


Example:

This example remove the frame to MyText drawing text.


CatTextFrameType itype = catNone
MyText.ActivateFrame itype
Parameters

i_type (CatTextFrameType) –

Returns

None

property anchor_point

Note

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

Returns or sets the anchor point of the drawing text.

Example:
This example sets the AnchorPoint of the MyText drawing text to the
right

MyText.AnchorPoint = catRight
Returns

enum cat_text_anchor_position

property blanking

Note

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

Returns or sets the blanking mode of the drawing text.

Example:
This example sets the blanking mode type of MyText drawing text to
active on geom

MyText.Blanking = catBlankingOnGeom
Returns

enum cat_blanking_mode

property bold

Note

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

Returns or sets the drawing text font bold property.
True if the drawing text is bold formatted.

Example:
This example get the parameter bold on MyText drawing
text.

oVal = MyText.Bold
Returns

int

property color

Note

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

Returns or sets the color of the drawing text.

Example:
This example sets the Color type of the MyText drawing text to
red

redCol =-16776961 ‘Encoded RGBA color within long integer (R=255 G=0
B=0 A=255)
MyText.Color = redCol
Returns

int

property font_name

Note

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

Returns or sets the font name of the drawing text.

Example:
This example sets the MyText drawing text font as Courrier 10
BT.

MyText.SetFontName(“Courrier 10 BT”)
Returns

str

property font_size

Note

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

Returns or sets the font size of the drawing text.

Example:
This example sets the MyText drawing text font size to
3.5.

iFontSize = 3.5
MyText.SetFontSize 0, 0, iFontSize
Returns

float

property frame_type

Note

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

Returns or sets the frame type of the drawing text.

Example:
This example sets the frame type of the MyText drawing text to an
ellipse

MyText.FrameType = catEllipse
Returns

enum cat_text_frame_type

property italic

Note

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

Returns or sets the drawing text font italic property.
True if the drawing text is formatted as italic.

Example:
This example set the parameter Italic on MyText drawing
text.

MyText.Italic = 1
Returns

int

property justification

Note

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

Returns or sets the drawing text font justification
property.
True if the drawing text font is justified.

Example:
This example sets the Justification type of the MyText drawing text to
the right

MyText.Justification = catRight
Returns

enum cat_justification

property kerning

Note

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

Font kerning property.
True if the drawing text font is formatted as kerning

Example:
This example set the parameter kerning on MyText drawing
text.

MyText.Kerning = 1
Returns

int

property mirror

Note

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

Returns or sets the mirroring of the drawing text.

Example:
This example sets the Mirror type of the MyText drawing text to no
flip

MyText.Mirror = catTextNoFlip
Returns

enum cat_text_flip_mode

property overline

Note

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

Returns or sets the drawing text font overline property.
True if the drawing text is overlined.

Example:
This example get the parameter Overline on MyText drawing
text.

oval = MyText.Overline()
Returns

int

property strike_thru

Note

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

Returns or sets the drawing text font strikethrough
property.
True if the drawing text font is striked through.

Example:
This example set the parameter StrikeThru on MyText drawing
text.

MyText.StrikeThru = 1
Returns

int

property subscript

Note

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

Returns or sets the drawing text font subscript property.
True if the drawing text font is formatted as subscript.

Example:
This example set the parameter Subscript on MyText drawing
text.

MyText.Subscript = 1
Returns

int

property superscript

Note

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

Returns or sets the drawing text font superscript
property.
True if the drawing text font is formatted as superscript.

Example:
This example set the parameter Superscript on MyText drawing
text.

MyText.Superscript = 1
Returns

int

property underline

Note

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

Returns or sets the drawing text font underline property.
True if the drawing text is underlined.

Example:
This example get the parameter bold on MyText drawing
text.

oval = MyText.Underline
Returns

int

update()

Note

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

Update the properties of the drawing text.

Example:
This example update the properties to MyText drawing text.

MyText.Update


Copyright © 1999-2011, Dassault Systèmes. All rights
reserved.
Returns

None

drawing_text_range

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_text_range.DrawingTextRange(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
DrawingTextRange

Represents a drawing text range, or contiguous area, in a drawing
text.

A range is a contiguous area in a drawing text defined by the position of a
starting and ending character, or by the position of a starting character and a
length expressed in number of characters.
get_text_range(i_start, i_end)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetTextRange(long iStart,
long iEnd) As DrawingTextRange

Returns a drawing text range within another drawing text range. The text
range is retrieved using its starting and ending character
positions.

Parameters:

iStart
The position of the drawing text range starting character

iEnd
The position of the drawing text range ending character


Example:
This example retrieves in extractedTextRange the drawing text range
that begins at the eighth character and end at the fifteenth character of the
MyTextRange drawing text range.

Dim extractedTextRange As DrawingTextRange
start = 8
end = 15
extractedTextRange = MyTextRange.GetTextRange(start, end)
Parameters
  • i_start (int) –

  • i_end (int) –

Returns

DrawingTextRange

insert_after(i_string)

Note

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

Inserts a character string at the end of the drawing text
range.

Parameters:

iString
The character string to be added

Example:
This example inserts the String character string at the end of the
MyTextRange drawing text range.

String = “String to insert after”
MyTextRange.InsertAfter(String)
Set MyTextProperties = MyTextRange.TextProperties
MyTextProperties.Update


See also:
DrawingTextProperties.Update
Parameters

i_string (str) –

Returns

None

insert_before(i_string)

Note

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

Inserts a character string at the beginning of the drawing text
range.

Parameters:

iString
The character string to be added

Example:
This example inserts the String character string at the beginning of
the MyTextRange drawing text range.

String = “String to insert before”
MyTextRange.InsertBefore(String)
Set MyTextProperties = MyTextRange.TextProperties
MyTextProperties.Update


See also:
DrawingTextProperties.Update

Copyright © 1999-2011, Dassault Systèmes. All rights
reserved.
Parameters

i_string (str) –

Returns

None

property length

Note

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

Returns the number of characters of the drawing text
range.

Example:
This example retrieves in NbChar the number of characters of the
MyTextRange drawing text range.

NbChar = MyTextRange.Length
Returns

int

property start

Note

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

Returns the starting character position of the drawing text
range.

Example:
This example retrieves in StartCharPosthe starting character position
of the MyTextRange drawing text range.

StartCharPos = MyTextRange.Start
Returns

int

property text

Note

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

Returns or sets the character string making up the drawing text
range.

Example:
This example sets in text the character string that makes up the
MyTextRange drawing text range.

MyTextRange.Text = text
Set MyTextProperties = MyTextRange.TextProperties
MyTextProperties.Update


See also:
DrawingTextProperties.Update
Returns

str

property text_properties

Note

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

Deprecated:
V5R18 use DrawingWelding.TextProperties This method has not to be used
to manage the text range properties. Text properties is only applied on the
whole text, not on a sub text identified by a text range. Returns the drawing
text range properties.

Example:
This example returns in Prop the text properties of the MyTextRange
drawing text range.

Dim Prop As CATIADrawingTextProperties
Set Prop = MyTextRange.TextProperties(String)
Returns

DrawingTextProperties

drawing_texts

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_texts.DrawingTexts(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingTexts

A collection of all the drawing texts currently managed by a drawing view of
drawing sheet in a drawing document.
add(i_drawing_text, i_position_x, i_position_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(CATBSTR iDrawingText,
double iPositionX,
double iPositionY) As DrawingText

Creates a drawing text and adds it to the DrawingTexts
collection.

Parameters:

iDrawingText
The character string that makes up the drawing text to create

iPositionX,iPositionY
The drawing text x and y coordinates, expressed in millimeters,
with respect to the drawing view coordinate system


Returns:
The created drawing text

Example:
The following example creates a drawing text with the string ComplexText
and retrieved in MyText in the drawing view collection of the MyView drawing
view. This view belongs to the drawing view collection of the drawing
sheet

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim MyText As DrawingText
Set MyText = MyView.Texts.Add(“ComplexText”, 0., 0.)
Parameters
  • i_drawing_text (str) –

  • i_position_x (float) –

  • i_position_y (float) –

Returns

DrawingText

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(long iIndex) As DrawingText

Returns a drawing text using its index from the DrawingTexts
collection.

Parameters:

iIndex
The index of the drawing text to retrieve from the collection of
drawing texts. As a numerics, this index is the rank of the drawing text in the
collection. The index of the first drawing text in the collection is 1, and the
index of the last drawing text is Count.

Returns:
The retrieved drawing view
Example:
This example retrieves in ThisDrawingText the second drawing text, in
the drawing view collection of the active view in the active sheet, in the
active document supposed to be a drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingText As DrawingText
Set ThisDrawingText = MyView.Texts.Item(2)
Parameters

i_index (int) –

Returns

DrawingText

remove(i_index)

Note

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

Removes a drawing text from the DrawingTexts collection.

Parameters:

iIndex
The index of the drawing text to remove from the collection of
drawing texts. As a numerics, this index is the rank of the drawing text in the
collection. The index of the first drawing text in the collection is 1, and the
index of the last drawing text is Count.

Example:
The following example removes the third drawing text in the drawing
text collection of the active view of the active document, supposed to be a
drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.DrawingTexts.Remove(3)
Parameters

i_index (int) –

Returns

None

drawing_thread

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_thread.DrawingThread(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
DrawingThread

Represents a drawing thread in a drawing view.
property type

Note

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

Returns or sets a CatThreadType (threaded or taped) on a thread. Be
careful, this method is only available on threads which are linked to 2D circle
geometry

Example:
The following example sets the type Taped in MyThread

If MyThread.IsLinkedTo()=cat2DCircle Then
MyThread.Type = catTaped
End If


Methods

o Func IsLinkedTo() As CatThreadLinkedTo

Specifies which kind of objects the thread is linked to.

Returns:
oLinkedType The type of thread link

Example:
The following example retrieves the CatThreadLinkedTo in MyThread This view
belongs to the drawing view collection of the drawing
sheet

ThreadLinkType = MyThread.IsLinkedTo
Returns

enum cat_thread_type

drawing_threads

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_threads.DrawingThreads(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingThreads

A collection of all the drawing threads currently managed by a drawing view of
drawing sheet in a drawing document.
add(i_geom_elem)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(CATBaseDispatch iGeomElem) As DrawingThread

Creates a drawing thread and adds it to the DrawingThreads
collection.

Parameters:

iGeomElem
Geometry to create the thread on. Be careful, this geometry must be
a 2D geometry

Returns:
The created drawing thread

Example:
The following example creates a drawing thread and retrieved in MyThread in
the drawing view collection of the MyView drawing view. This view belongs to
the drawing view collection of the drawing sheet

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim MyThread As DrawingThread
Set MyThread = MyView.Threads.Add(iGeomElem)
Parameters

i_geom_elem (AnyObject) –

Returns

DrawingThread

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(long iIndex) As DrawingThread

Returns a drawing thread using its index from the DrawingThreads
collection.

Parameters:

iIndex
The index of the drawing thread to retrieve from the collection of
drawing threads. As a numerics, this index is the rank of the drawing thread in
the collection. The index of the first drawing thread in the collection is 1,
and the index of the last drawing thread is Count.


Returns:
The retrieved drawing thread
Example:
This example retrieves in ThisDrawingThread the second drawing thread,
in the drawing view collection of the active view in the active sheet, in the
active document supposed to be a drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingThread As DrawingThread
Set ThisDrawingThread = MyView.Threads.Item(2)
Parameters

i_index (int) –

Returns

DrawingThread

remove(i_index)

Note

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

Removes a drawing thread from the DrawingThreads
collection.

Parameters:

iIndex
The index of the drawing thread to remove from the collection of
drawing threads. As a numerics, this index is the rank of the drawing thread in
the collection. The index of the first drawing thread in the collection is 1,
and the index of the last drawing thread is Count.


Example:
The following example removes the third drawing thread in the drawing
thread collection of the active view of the active document, supposed to be a
drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.DrawingThreads.Remove(3)
Parameters

i_index (int) –

Returns

None

drawing_view

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_view.DrawingView(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
DrawingView

Represents a drawing view in a drawing sheet.

The drawing view is included in a drawing sheet and contains texts,leaders,
dimensions, arrows, pictures, tables, 2D Geometry and 2D
component.
Warning: This interface is not available with 2D Layout for 3D
Design.
activate()

Note

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

Activates the drawing view. Activating a drawing view means that this
drawing view is the one on which the end-user is now
working.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example activates the ViewToWorkOn drawing view.

ViewToWorkOn.Activate()
Returns

None

aligned_with_reference_view()

Note

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

Activates the alignment with the reference view. Activating the alignment
with the reference view restores the constraints that the reference view
imposes to the current drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example activates the alignment from the MyView drawing view to
its reference view.

MyView.AlignedWithReferenceView()
Returns

None

property angle

Note

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

Returns or sets the angle of the drawing view. The angle is measured
between the axis system of the drawing view and the axis system of the drawing
sheet where the drawing view lies. The angle is measured in radians and is
counted counterclockwise.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example sets the angle of the MyView drawing view to 90 degrees
clockwise. You first need to compute the angle in radians and set the minus
sign to indicate the rotation is clockwise.

PI = 3.1415926535
Angle90Clockwise = -PI/2
MyView.Angle = Angle90Clockwise
Returns

float

property arrows

Note

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

Returns the drawing arrow collection of the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in ArrowCollection the collection of arrows of
the MyView drawing view.

Dim ArrowCollection As DrawingArrows
Set ArrowCollection = MyView.Arrows
Returns

DrawingArrows

property components

Note

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

Returns the drawing component instances collection (i.e. ditto collection)
of the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in ComponentCollection the collection of
component instances of the MyView drawing view.

Dim ComponentCollection As DrawingComponents
Set ComponentCollection = MyView.Components
Returns

DrawingComponents

property dimensions

Note

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

Returns the drawing dimension collection of the drawing
view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in DimensionCollection the collection of
dimensions of the MyView drawing view.

Dim DimensionCollection As DrawingDimensions
Set DimensionCollection = MyView.Dimensions
Returns

DrawingDimensions

property factory_2d

Note

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

Returns the 2D factory of the drawing view. Take care that you must open
edition on a sketch before adding or modifying elements in it. Take care that
you must close edition on a sketch to keep all modifications before saving
document.
Warning: This method is not available with 2D Layout for 3D Design. To get
Sketch from factory2D:

Set mySketch = my2DFactory.GetParent


Example:
The following example returns in my2DFactory the 2D
factory
of the view myView:

Set my2DFactory = myView.Factory2D
Returns

Factory2D

property frame_visualization

Note

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

Returns or sets the drawing view frame visualization
state.
True if the drawing view frame is visible.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example shows the frame of the MyView drawing
view.

MyView.FrameVisualization = True
Returns

bool

property generative_behavior

Note

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

Returns the generative behavior of the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in MyViewGenBehavior the generative behavior of
the MyView drawing view.

Dim MyViewGenBehavior As
DrawingViewGenerativeBehavior
Set MyViewGenBehavior = MyView.GenerativeBehavior
Returns

DrawingViewGenerativeBehavior

Note

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

Returns the generative links of the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in MyViewGenLinks the generative links of the
MyView drawing view.

Dim MyViewGenLinks As DrawingViewGenerativeLinks
Set MyViewGenLinks = MyView.GenerativeLinks
Returns

DrawingViewGenerativeLinks

property geometric_elements

Note

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

Returns the collection of geometric elements included in the drawing view
sketch.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
The following example returns in colGeometry the list of geometric
elements in the view myView:

Dim colGeometry As GeometricElements
Set colGeometry = myView.GeometricElements
Returns

GeometricElements

get_view_name(i_view_name_prefix, i_view_name_ident, i_view_name_suffix)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetViewName(CATBSTR iViewNamePrefix,
CATBSTR iViewNameIdent,
CATBSTR iViewNameSuffix)

Returns the prefix, the ident and the suffix of the name of the drawing
view. The method returns an error in case of 2D component
reference.
Note: Prefix of drawing view can be also retrieved across name property
defined in CATIABase
Warning: This method is not available with 2D Layout for 3D
Design.

Example:

This example gets the prefix, the ident, and the suffix of the name

of the MyView drawing view


Dim MyPrefix, MyIdent, MySuffix As CATBSTR
MyView.GetViewName (MyPrefix, MyIdent, MySuffix)
Parameters
  • i_view_name_prefix (str) –

  • i_view_name_ident (str) –

  • i_view_name_suffix (str) –

Returns

None

insert_view_angle(i_first, io_text)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub InsertViewAngle(long iFirst,
DrawingText ioText)

Insert the Angle parameter in the text of the drawing
text.
Warning: This method is not available with 2D Layout for 3D
Design.

Parameters:

iFirst
The first character from which the parameter is inserted

ioText
The text on wich the scale parameter will be inserted

Example:
This example insert the Angle parameter of MyView drawing view at
the end of MyText drawing text.


index = Len(MyText.Text)+1
MyView.InsertViewScale index, MyText
Parameters
Returns

None

insert_view_scale(i_first, io_text)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub InsertViewScale(long iFirst,
DrawingText ioText)

Insert the scale parameter in the text of the drawing
text.
Warning: This method is not available with 2D Layout for 3D
Design.

Parameters:

iFirst
The first character from which the parameter is inserted

ioText
The text on wich the scale parameter will be inserted

Example:
This example insert the Scale parameter of MyView drawing view at
the first character of MyText drawing text.


MyView.InsertViewScale 1, MyText
Parameters
Returns

None

is_generative()

Note

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

Returns whether the drawing view has a generative
behavior.
Warning: This method is not available with 2D Layout for 3D
Design.
True if the drawing view has a generative behavior.

Example:
This example retrieves in GenView if the MyView drawing view has a
generative behavior property set.

GenView = MyView.IsGenerative()
Returns

bool

isolate()

Note

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

Isolates the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example isolates the MyView drawing view.

MyView.Isolate
Returns

None

property lock_status

Note

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

Returns or sets the lock status of a drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.
precondition: This property does not exist for the detail view. In this
case, the method returns failed.

Example:
This example locks the ViewToWorkOn drawing view.

ViewToWorkOn.LockStatus = True
Returns

bool

property pictures

Note

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

Returns the drawing picture collection of the drawing
view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in PictureCollection the collection of pictures
of the MyView drawing view.

Dim PictureCollection As DrawingPictures
Set PictureCollection = MyView.Pictures
Returns

DrawingPictures

property reference_view

Note

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

Returns or sets the reference view. The reference view is also the parent
view to which the current drawing view is linked and which is used as reference
for alignment. Generally, the reference view is the front view, and the other
views, such as the top, bottom, left, and right views, are linked to it. This
reference drawing view is used:

When moving the current drawing view. Its location remains constrained
to the reference view, depending on its type. For example, a left view can move
horizontally and a top view can move vertically.
To update the scale of the current drawing view according to the
modification performed to the one of the reference drawing
view.


Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in ReferenceView the view used as reference by
the MyView drawing view.

Dim ReferenceView As DrawingView
Set ReferenceView = MyView.RefView
Returns

DrawingView

save_edition()

Note

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

Saves the Sketch Edition. Once you have finished working with the drawing
view, you must save its edition in order to register modification for
UNDO/REDO. Indeed when activating a view, this view is open in edition while
the previous active view is closed in edition. So calling SaveEdition() before
exiting a macro without changing active view will allow a correct UNDO/REDO
behavior.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
The following example saves the edition of the drawing view
MyView:

MyView.SaveEdition
Returns

None

property scale

Note

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

Returns or sets the scale of the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example sets the scale of the MyView drawing view to
0.5.

MyView.Scale = 0.5
Returns

float

property scale2

Note

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

Returns or sets the scale of the drawing view (Workaround for VBA
keyword).
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example sets the scale of the MyView drawing view to
0.5.

MyView.Scale2 = 0.5
Returns

float

set_view_name(i_view_name_prefix, i_view_name_ident, i_view_name_suffix)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetViewName(CATBSTR iViewNamePrefix,
CATBSTR iViewNameIdent,
CATBSTR iViewNameSuffix)

Sets the prefix, the ident and the suffix of the name of the drawing view.
The method returns an error in case of 2D component
reference.
Note: Prefix of drawing view can be also modified across name property
defined in CATIABase
Warning: This method is not available with 2D Layout for 3D
Design.

Example:

This example sets the prefix, the ident, and the suffix of the name

of the MyView drawing view respectively to “MyPrefix”,
“MyIdent”,
and “MySuffix”.


MyView.SetViewName (“MyPrefix”, “MyIdent”,
“MySuffix”)
Parameters
  • i_view_name_prefix (str) –

  • i_view_name_ident (str) –

  • i_view_name_suffix (str) –

Returns

None

size(o_values)

Note

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

Returns the bounding box of the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Parameters:

oValues
The values of the view bounding box: Xmin, Xmax, Ymin, Ymax


Example:



This example gets the bounding box of the ViewToWorkOn drawing
view.


Dim oXY(4) As Double
ViewToWorkOn.Size oXY
Xmin = oXY(0)
Xmax = oXY(1)
Ymin = oXY(2)
Ymax = oXY(3)
Parameters

o_values (tuple) –

Returns

double

property tables

Note

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

Returns the drawing table collection of the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in TextCollection the collection of texts of the
MyView drawing view.

Dim TableCollection As DrawingTables
Set TableCollection = MyView.Tables
Returns

DrawingTables

property texts

Note

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

Returns the drawing text collection of the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in TextCollection the collection of texts of the
MyView drawing view.

Dim TextCollection As DrawingTexts
Set TextCollection = MyView.Texts
Returns

DrawingTexts

property threads

Note

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

Returns the drawing thread collection of the drawing view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in ThreadCollection the collection of threads of
the MyView drawing view.

Dim ThreadCollection As DrawingThreads
Set ThreadCollection = MyView.Threads
Returns

DrawingThreads

un_aligned_with_reference_view()

Note

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

Deactivates the alignment with the reference view. Deactivating the
alignment to the reference view removes the constraints that the reference view
imposes to the current drawing view. You can then, for example, move and
position it freely.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example deactivates the alignment from the MyView drawing view to
its reference view.

MyView.UnAlignedWithReferenceView()
Returns

None

property view_type

Note

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

Returns the drawing view type.
Warning: This method is not available with 2D Layout for 3D Design.
Returns

enum cat_drawing_view_type

property weldings

Note

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

Returns the drawing welding collection of the drawing
view.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves in weldingCollection the collection of weldings
of the MyView drawing view.

Dim weldingCollection As DrawingWeldings
Set weldingCollection = MyView.Weldings
Returns

DrawingWeldings

property x

Note

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

For an interactive view, get_x and put_x methods are equivalents to
get_xAxisData, put_xAxisData In a generative case, get_x. put_x returns or sets
the x coordinate of the projection of the 3D centre of gravity. It is expressed
with respect to the sheet coordinate system. This coordinate, like any length,
is measured in millimeters.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves the x coordinate of the view relative position
MyView.

X = MyView.x
Returns

float

property x_axis_data

Note

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

Returns or sets the x coordinate of the drawing view coordinate system
origin. It is expressed with respect to the sheet coordinate system. This
coordinate, like any length, is measured in millimeters.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example retrieves the x coordinate of the coordinate system origin
of the MyView drawing view.

X = MyView.xAxisData
Returns

float

property y

Note

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

For an interactive view, get_y and put_y methods are equivalents to
get_yAxisData, put_yAxisData In a generative case, get_y. put_y returns or sets
the y coordinate of the projection of the 3D centre of gravity. It is expressed
with respect to the sheet coordinate system. This coordinate, like any length,
is measured in millimeters.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example sets the y coordinate of the view relative position MyView
to 5 inches. You need first to convert the 5 inches into
millimeters.

NewYCoordinate = 5*25.4
MyView.y = NewYCoordinate
Returns

float

property y_axis_data

Note

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

Returns or sets the y coordinate of the drawing view coordinate system
origin. It is expressed with respect to the sheet coordinate system. This
coordinate, like any length, is measured in millimeters.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
This example sets the y coordinate of the coordinate system origin of
the MyView drawing view to 5 inches. You need first to convert the 5 inches
into millimeters.

NewYCoordinate = 5*25.4
MyView.yAxisData = NewYCoordinate
Returns

float

drawing_view_generative_behavior

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_view_generative_behavior.DrawingViewGenerativeBehavior(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
DrawingViewGenerativeBehavior

Represents the generative behavior of a drawing view.

The generative behavior of a drawing view is an object that defines the
parameters used to generate the drawing view from the document it represents.
Main parameters include the type of the view, the plane on which the view is
projected, the document to represent, and additional parameters depending on
the view type.
apply_breakout_to(i_parent_view)

Note

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

If a view have gone through a breakout view operation, this method realize
a breakout view on the view given as parameter, and the other types of the view
remain.

Example:

This example apply the last breakout view done on MyView, if
so,
on the view MyDestinationView.


MyView.GenerativeBehavior.ApplyBreakoutTo(MyDestinationView)
Parameters

i_parent_view (DrawingViewGenerativeBehavior) –

Returns

None

property color_inheritance_mode

Note

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

Returns or sets the view color inheritance mode.

Example:

This example sets the view color inheritance mode of the
MyView
drawing view to cat3DColorInheritanceModeOn to indicate
that
generated items inherit the color of the 3D elements they come
from.


MyView.GenerativeBehavior.ColorInheritanceMode(cat3DColorInheritanceModeOn)
Returns

enum cat3_d_color_inheritance_mode

define_auxiliary_view(i_x_start_point, i_y_start_point, i_x_end_point, y_end_point, i_side_to_draw, i_parent_view_generative_behavior)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineAuxiliaryView(double iXStartPoint,
double iYStartPoint,
double iXEndPoint,
double YEndPoint,
short iSideToDraw,
DrawingViewGenerativeBehavior iParentViewGenerativeBehavior)

Defines an auxiliary drawing view. The projection plane of this auxiliary
drawing view is defined in its parent view using a line segment which
represents the trace of the projection plane, considered as being normal to
this parent view projection plane.

Parameters:

iXStartPoint,iYStartPoint
The coordinates of the trace line segment start point, expressed
with respect of the parent view axis system
iXEndPoint,iYEndPoint
The coordinates of the trace line segment end point, expressed with
respect of the parent view axis system
iSideToDraw
This side is defined according to the trace line segment. This
segment is oriented from its start point to its end point. When looking along
this segment, from its start point towards its end point, setting iSideToDraw
to 0 (clockwise) draws the auxiliary view as if it were seen from the left of
the segment in the parent view. Setting iSideToDraw to 1 (counterclockwise)
draws the auxiliary view as if it were seen from the right of the
segment.
0 Clockwise
1 Counterclockwise
iParentViewGenerativeBehavior
The generative behavior of the parent view in which the line
segment representing the projection plane trace is defined


Example:

This example defines MyView as an auxiliary view of
its parent view whose generative behavior is
MyParentViewGB.
The trace of the auxiliary view projection plane passes by the
points
of coordinates (100., 50.) and (500., 250.)
respectively.
The section is seen from the right of the trace line segment
defining
the auxiliary view projection plane.


MyView.GenerativeBehavior.DefineAuxiliaryView 100., 50., 500., 250.,
1, MyParentViewGB
Parameters
  • i_x_start_point (float) –

  • i_y_start_point (float) –

  • i_x_end_point (float) –

  • y_end_point (float) –

  • i_side_to_draw (enum) –

  • i_parent_view_generative_behavior (DrawingViewGenerativeBehavior) –

Returns

None

define_box3_d_view(i_boxable_object)

Note

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

Defines a drawing view intersected with a 3D box. The 3D box is defined by
the interface CATIASection

Parameters:

iBoxableObject
The 3D box object which must implement the CATIASection
interface
Parameters

i_boxable_object (AnyObject) –

Returns

None

define_breakout(i_profil, i_plane1, i_plane2)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineBreakout(CATSafeArrayVariant iProfil,
CATSafeArrayVariant iPlane1,
CATSafeArrayVariant iPlane2)

Defines a breakout on the current view.

Parameters:

Profil
the profile used, stored as a CATSafeArrayVariant of 2D
coordinates, of dimension 2*n, n the number of control points on profile.

Plane1
the first reference plane, stored as a CATSafeArrayVariant [9] : Plane1 [0…2] : Plane
origine coordinates Plane1 [3…5] : First direction vector coordinates Plane1 [6…8] :
Second direction vector coordinates. This plane must intersect the 3D Volume.
Plane2
the second reference plane, stored as a CATSafeArrayVariant [9] : This plane2 is not used.
Returns
Legal values : S_OK if breakout definition succeeded or E_FAIL if the breakout definition
failed
Parameters
  • i_profil (tuple) –

  • i_plane1 (tuple) –

  • i_plane2 (tuple) –

Returns

None

define_broken_view(i_broken_lines_extremities, i_x_direction, i_y_direction)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineBrokenView(CATSafeArrayVariant
iBrokenLinesExtremities,
double iXDirection,
double iYDirection)

Defines a broken drawing view. The broken area is represented by two lines
and a direction in the source view.

Parameters:

iBrokenLinesExtremities
The lines defining the broken profile. This lines is passed as its
point coordinate table. Only two lines have to be defined. It has the following
contents:

iBrokenLinesExtremities[0] = X1
x coordinate of the first point for the first line

iBrokenLinesExtremities[1] = Y1
y coordinate of the first point for the first line

iBrokenLinesExtremities[2] = X2
x coordinate of the second point for the first line

iBrokenLinesExtremities[3] = Y2
y coordinate of the second point for the first line

iBrokenLinesExtremities[4] = X3
x coordinate of the first point for the second line

iBrokenLinesExtremities[5] = Y3
y coordinate of the first point for the second line

iBrokenLinesExtremities[6] = X4
x coordinate of the second point for the second line

iBrokenLinesExtremities[7] = Y4
y coordinate of the second point for the second line


iXDirection,iYDirection
The direction stands for the translation. The direction must be
horizontal or vertical.

Example:

This example defines MyView as a broken view.
The direction for the translation is horizontal.
The broken area is defined by to vertical lines.


MyView.GenerativeBehavior.DefineBrokenView X1, Y1, X2, Y2, X3, Y3, X4,
Y4, XDirection, YDirection
Parameters
  • i_broken_lines_extremities (tuple) –

  • i_x_direction (float) –

  • i_y_direction (float) –

Returns

None

define_circular_clipping_view(x_center, y_center, radius)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineCircularClippingView(double XCenter,
double YCenter,
double Radius)

Defines a Circular clipping on the current view.

Parameters:

XCenter,
YCenter clipping circle center position.
Radius
clipping circle radius. Returns
Legal values : S_OK if clipping definition succeeded or E_FAIL if the clipping definition
failed
Parameters
  • x_center (float) –

  • y_center (float) –

  • radius (float) –

Returns

None

define_circular_detail_view(i_x_center, i_y_center, i_radius, i_pv_generative_behavior)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineCircularDetailView(double iXCenter,
double iYCenter,
double iRadius,
DrawingViewGenerativeBehavior iParentViewGenerativeBehavior)

Defines a detail or a clipped drawing view. The clipped area is represented
by a circle in the parent view.

Parameters:

iXCenter,iYCenter
The circle center coordinates, expressed in the parent view axis
system
iRadius
The circle radius
iParentViewGenerativeBehavior
The generative behavior of the parent view in which the circular
clipping is defined. For a clipped view, iParentViewGenerativeBehavior must be
set to the current drawing view.

Example:

This example defines MyView as a detail view of the
view
considered as its parent view whose generative behavior
is
MyParentViewGB.
The clipped area is a circle defined using its center coordinates
(100.,
150.), and its radius (75.) with respect to the parent view axis
system.


MyView.GenerativeBehavior.DefineCircularDetailView 100., 150., 75.,
MyParentViewGB
Parameters
Returns

None

define_circular_exact_clipping_view(x_center, y_center, radius)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineCircularExactClippingView(double XCenter,
double YCenter,
double Radius)

Defines a Circular exact clipping on the current view.

Parameters:

XCenter,
YCenter clipping circle center position.
Radius
clipping circle radius. Returns
Legal values : S_OK if clipping definition succeeded or E_FAIL if the clipping definition
failed
Parameters
  • x_center (float) –

  • y_center (float) –

  • radius (float) –

Returns

None

define_front_view(i_x1, i_y1, i_z1, i_x2, i_y2, i_z2)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineFrontView(double iX1,
double iY1,
double iZ1,
double iX2,
double iY2,
double iZ2)

Defines a front drawing view. The front view is defined using its
projection plane, passed as the components of two vectors V1 and V2. The cross
product of vector V1(X1, Y1, Z1) by vector V2(X2, Y2, Z2) defines the
projection direction.

Parameters:

iX1,iY1,iZ1
The components of the first vector with respect to the document 3D
axis system
iX2,iY2,iZ2
The components of the second vector with respect to the document 3D
axis system

Example:

This example defines MyView as a front view by projecting
the
represented document in the YZ 3D plane.


MyView.GenerativeBehavior.DefineFrontView 0., 1., 0., 0., 0.,
1.
Parameters
  • i_x1 (float) –

  • i_y1 (float) –

  • i_z1 (float) –

  • i_x2 (float) –

  • i_y2 (float) –

  • i_z2 (float) –

Returns

None

define_isometric_view(i_x1, i_y1, i_z1, i_x2, i_y2, i_z2)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineIsometricView(double iX1,
double iY1,
double iZ1,
double iX2,
double iY2,
double iZ2)

Defines an isometric drawing view. The isometric view is defined using its
projection plane, passed as the components of two vectors V1 and V2. The cross
product of vector V1(X1, Y1, Z1) by vector V2(X2, Y2, Z2) defines the
projection direction.

Parameters:

iX1,iY1,iZ1
The components of the first vector with respect to the document 3D
axis system
iX2,iY2,iZ2
The components of the second vector with respect to the document 3D
axis system

Example:

This example defines MyView as an isometric view by projecting
the
represented document in the vertical plane making an angle of -45
degrees
with respect to the X axis.


MyView.GenerativeBehavior.DefineIsometricView -0.707, 0.707, 0., 0.,
0., 1.
Parameters
  • i_x1 (float) –

  • i_y1 (float) –

  • i_z1 (float) –

  • i_x2 (float) –

  • i_y2 (float) –

  • i_z2 (float) –

Returns

None

define_polygonal_clipping_view(profil)

Note

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

Defines a polygonal clipping on the current view.

Parameters:

profil
the profile used, stored as a CATSafeArrayVariant of 2D
coordinates, of dimension 2*n, n the number of control points on profile.
Returns
Legal values : S_OK if clipping definition succeeded or E_FAIL if the clipping definition
failed
Parameters

profil (tuple) –

Returns

None

define_polygonal_detail_view(i_profile, i_pv_generative_behavior)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefinePolygonalDetailView(CATSafeArrayVariant
iProfile,
DrawingViewGenerativeBehavior iParentViewGenerativeBehavior)

Defines a detail or a clipped drawing view. The clipped area is represented
by a circle in the parent view.

Parameters:

iProfile
The polyline defining the detail profile. This polyline is passed
as its point coordinate table. The polyline is automatically closed. It has the
following contents:

iProfile[0] = X1
x coordinate of the first point
iProfile[1] = Y1
y coordinate of the first point
iProfile[2] = X2
x coordinate of the second point
iProfile[3] = Y2
y coordinate of the second point
iProfile[2n-2] = Xn
x coordinate of the nth and last point
iProfile[2n-1] = Yn
y coordinate of the nth and last point

iParentViewGenerativeBehavior
The generative behavior of the parent view in which the poligonal
clipping is defined. For a clipped view, iParentViewGenerativeBehavior must be
set to the current drawing view.

Example:

This example defines MyView as a detail view of the
view
considered as its parent view whose generative behavior
is
MyParentViewGB.
The clipped area is a square defined using its four corners with
respsect to the parent view axis system.


MyView.GenerativeBehavior.DefinePolygonalDetailView 0., 0., 100., 0.,
100., 100., 0., 100., MyParentViewGB
Parameters
Returns

None

Args:

i_pv_generative_behavior:

define_polygonal_exact_clipping_view(profil)

Note

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

Defines a polygonal exact clipping on the current view.

Parameters:

profil
the profile used, stored as a CATSafeArrayVariant of 2D
coordinates, of dimension 2*n, n the number of control points on profile.
Returns
Legal values : S_OK if clipping definition succeeded or E_FAIL if the clipping definition | failed
Parameters

profil (tuple) –

Returns

None

define_projection_view(i_parent_view_generative_behavior, i_type)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineProjectionView(DrawingViewGenerativeBehavior
iParentViewGenerativeBehavior,
CatProjViewType iType)

Defines a projection drawing view.

Parameters:

iParentViewGenerativeBehavior
The generative behavior of the parent view.
iType
The type of the drawing view with respect to its parent view


Example:

This example defines MyView as a right view of the front
view
considered as its parent view whose generative behavior
is
MyParentViewGB.


MyView.GenerativeBehavior.DefineProjectionView MyParentViewGB,
catRightView
Parameters
Returns

None

define_section_view(i_profile, i_section_type, i_profile_type, i_side_to_draw, i_parent_view_generative_behavior)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineSectionView(CATSafeArrayVariant iProfile,
CATBSTR iSectionType,
CATBSTR iProfileType,
short iSideToDraw,
DrawingViewGenerativeBehavior iParentViewGenerativeBehavior)

Defines a section drawing view. A section drawing view is defined using a
section profile defined itself as a polyline, a section type to indicate
whether to draw the section or only the section cut, a section profile type
that can be offset or aligned, the side of the section to draw, and the
generative behavior of the parent view.

Parameters:

iProfile
The polyline defining the section profile. This polyline is passed
as its point coordinate table. It has the following
contents:

iProfile[0] = X1
x coordinate of the first point
iProfile[1] = Y1
y coordinate of the first point
iProfile[2] = X2
x coordinate of the second point
iProfile[3] = Y2
y coordinate of the second point
iProfile[2n-2] = Xn
x coordinate of the nth and last point
iProfile[2n-1] = Yn
y coordinate of the nth and last point

iSectionType
The section type: SectionCut or SectionView
iProfileType
The cutting profile type: Offset or Aligned
iSideToDraw
The side of the section to draw. This side is defined according to
the first segment of the section profile. This segment is oriented from its
start point to its end point. When looking along this segment, from its start
point towards its end point, setting iSideToDraw to 0 (clockwise) draws the
section seen from the left of the segment. Setting iSideToDraw to 1
(counterclockwise)draws the section seen from the right of the
segment.
0 Clockwise
1 Counterclockwise
iParentViewGenerativeBehavior
The generative behavior of the parent view. The section profile is
defined with respect to this parent view axis system


Example:

This example defines MyView as an offset section view of the
view
considered as its parent view whose generative behavior
is
MyParentViewGB.
The section is seen from the left of the first section profile
segment.
The section profile is defined in the SectionProfile
array.


Dim SectionProfile
ReDim SectionProfile(7)
SectionProfile(0) = 10.
SectionProfile(1) = 200.
SectionProfile(2) = 100.
SectionProfile(3) = 200.
SectionProfile(4) = 100.
SectionProfile(5) = 50.
SectionProfile(6) = 300.
SectionProfile(7) = 50.
MyView.GenerativeBehavior.DefineSectionView SectionProfile,
SectionView, Offset, 0, MyParentViewGB
Parameters
  • i_profile (tuple) –

  • i_section_type (str) –

  • i_profile_type (str) –

  • i_side_to_draw (enum) –

  • i_parent_view_generative_behavior (DrawingViewGenerativeBehavior) –

Returns

None

define_stand_alone_section(profil, type_of_section, type_of_profile, i_plane, i_side)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineStandAloneSection(CATSafeArrayVariant profil,
CATBSTR type_of_section,
CATBSTR type_of_profile,
CATSafeArrayVariant iPlane,
short iSide)

Defines a section view without a reference view.

Parameters:

profil
the profile used, stored as a CATSafeArrayVariant of 2D
coordinates, of dimension 2*n, n the number of control points on profile.

type_of_section

Legal values : SectionCut SectionView
type_of_profile

Legal values : Aligned Offset
iPlane
the reference plane, on which the profile lies Plane1 [0…2] : Plane origine coordinates
Plane1 [3…5] : First direction vector coordinates Plane1 [6…8] : Second direction
vector coordinates.
iSide

Legal values : 1 -1

Returns:
S_OK
if the section was correctly defined
E_FAIL
if the operation failed.

Example:

// 3 points profile
Dim arrayOfVariantOfDouble1(5)
arrayOfVariantOfDouble1(0) = -30.000000
arrayOfVariantOfDouble1(1) = -150.000000
arrayOfVariantOfDouble1(2) = -30.000000
arrayOfVariantOfDouble1(3) = -50.000000
arrayOfVariantOfDouble1(4) = 21.997045
arrayOfVariantOfDouble1(5) = -50.000000
// XY plane
Dim arrayOfVariantOfDouble2(8)
arrayOfVariantOfDouble2(0) = 0.000000
arrayOfVariantOfDouble2(1) = 0.000000
arrayOfVariantOfDouble2(2) = 0.000000
arrayOfVariantOfDouble2(3) = 1.000000
arrayOfVariantOfDouble2(4) = 0.000000
arrayOfVariantOfDouble2(5) = 0.000000
arrayOfVariantOfDouble2(6) = 0.000000
arrayOfVariantOfDouble2(7) = 1.000000
arrayOfVariantOfDouble2(8) = 0.000000
// defines offset sectionview
drawingViewGenerativeBehavior1.DefineStandAloneSection
arrayOfVariantOfDouble1, “SectionView”, “Offset”, arrayOfVariantOfDouble2,
1
Parameters
  • profil (tuple) –

  • type_of_section (str) –

  • type_of_profile (str) –

  • i_plane (tuple) –

  • i_side (enum) –

Returns

None

define_tps_section_view(i_profile, i_section_type, i_profile_type, i_side_to_draw, i_parent_view_generative_behavior)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineTPSSectionView(CATSafeArrayVariant iProfile,
CATBSTR iSectionType,
CATBSTR iProfileType,
short iSideToDraw,
DrawingViewGenerativeBehavior iParentViewGenerativeBehavior)

Defines a TPS section drawing view. A section TPS drawing view is defined
using a section profile defined itself as a polyline, a section type to
indicate whether to draw the section or only the section cut, a section profile
type that can be offset or aligned, the side of the section to draw, and the
generative behavior of the parent view.

Parameters:

iProfile
The polyline defining the section profile. This polyline is passed
as its point coordinate table. It has the following
contents:

iProfile[0] = X1
x coordinate of the first point
iProfile[1] = Y1
y coordinate of the first point
iProfile[2] = X2
x coordinate of the second point
iProfile[3] = Y2
y coordinate of the second point
iProfile[2n-2] = Xn
x coordinate of the nth and last point
iProfile[2n-1] = Yn
y coordinate of the nth and last point

iSectionType
The section type: SectionCut or SectionView
iProfileType
The cutting profile type: Offset or Aligned
iSideToDraw
The side of the section to draw. This side is defined according to
the first segment of the section profile. This segment is oriented from its
start point to its end point. When looking along this segment, from its start
point towards its end point, setting iSideToDraw to 0 (clockwise) draws the
section seen from the left of the segment. Setting iSideToDraw to 1
(counterclockwise)draws the section seen from the right of the
segment.
0 Clockwise
1 Counterclockwise
iParentViewGenerativeBehavior
The generative behavior of the parent view. The section profile is
defined with respect to this parent view axis system


Example:

This example defines MyView as an offset section view of the
view
considered as its parent view whose generative behavior
is
MyParentViewGB.
The section is seen from the left of the first section profile
segment.
The section profile is defined in the SectionProfile
array.


Dim SectionProfile
ReDim SectionProfile(7)
SectionProfile(0) = 10.
SectionProfile(1) = 200.
SectionProfile(2) = 100.
SectionProfile(3) = 200.
SectionProfile(4) = 100.
SectionProfile(5) = 50.
SectionProfile(6) = 300.
SectionProfile(7) = 50.
MyView.GenerativeBehavior.DefineSectionView SectionProfile,
SectionView, Offset, 0, MyParentViewGB
Parameters
  • i_profile (tuple) –

  • i_section_type (str) –

  • i_profile_type (str) –

  • i_side_to_draw (enum) –

  • i_parent_view_generative_behavior (DrawingViewGenerativeBehavior) –

Returns

None

define_unfolded_view(i_x1, i_y1, i_z1, i_x2, i_y2, i_z2)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub DefineUnfoldedView(double iX1,
double iY1,
double iZ1,
double iX2,
double iY2,
double iZ2)

Defines a unfolded drawing view. The unfolded view is defined using its
projection plane, passed as the components of two vectors V1 and V2. The cross
product of vector V1(X1, Y1, Z1) by vector V2(X2, Y2, Z2) defines the
projection direction.

Parameters:

iX1,iY1,iZ1
The components of the first vector with respect to the document 3D
axis system
iX2,iY2,iZ2
The components of the second vector with respect to the document 3D
axis system

Example:

This example defines MyView as a unfolded view by projecting
the
represented document in the YZ 3D plane.


MyView.GenerativeBehavior.DefineUnfoldedView 0., 1., 0., 0., 0.,
1.
Parameters
  • i_x1 (float) –

  • i_y1 (float) –

  • i_z1 (float) –

  • i_x2 (float) –

  • i_y2 (float) –

  • i_z2 (float) –

Returns

None

property document

Note

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

Returns or sets the document used to generate the drawing view. This
document can be a CATIA Version 4 model, a CATIA Version 5 part or assembly.
But it can be also just a body(partbody), according to the view links (then the
document is the parent object). The document must be already loaded, that is it
can be retrieved from the document collection managed by the CATIA
application.

Example:

This example sets the document that the MyView drawing view
should
represent to the CATPart1 CATIA Version 5 part.


Dim PartToDraw As Document
Set PartToDraw = CATIA.Documents.Item(“CATPart1”)
MyView.GenerativeBehavior.Document = PartToDraw
Returns

AnyObject

property fillet_representation

Note

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

Returns or sets the view Fillet representation mode. The Fillet
representation indicates how to draw lines coming from
fillets.

Example:

This example sets the view Fillet representation of the
MyView
drawing view to catFilletRepBoundary


MyView.GenerativeBehavior.FilletRepresentation = catFilletRepBoundary
Returns

enum cat_fillet_representation

force_update()

Note

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

Forces the Update the drawing view even if not necessary.

Example:

This example updates the MyView drawing view.


MyView.GenerativeBehavior.ForceUpdate()
Returns

None

get_axis_systeme(o_product, o_axis_systeme)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetAxisSysteme(AnyObject oProduct,
AnyObject oAxisSysteme)

Retrieves the axis systeme associated with the view.

Parameters:

oProduct
The reference product stored as a CATIABase.
oAxisSysteme
The axis system stored as a CATIABase.
Parameters
Returns

None

get_gps_name()

Note

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

Retrieves the set of generative parameters currently applied to the view.
Parameters will be taken into account at view update time.

Parameters:

ioGPSName
The XML file where generative parameters are retrieved from


Returns:
S_OK
if the operation succeeded.
E_FAIL

Example:

This example retrieves the generative parameters file applied to the
MyView drawing view as GPSFile.


MyView.GenerativeBehavior.GetGPSName GPSFile
Returns

str

get_projection_plane(o_x1, o_y1, o_z1, o_x2, o_y2, o_z2)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetProjectionPlane(double oX1,
double oY1,
double oZ1,
double oX2,
double oY2,
double oZ2)

Returns the drawing view projection plane.

Parameters:

oX1,oY1,oZ1
The components of the first vector with respect to the document 3D
axis system
oX2,oY2,oZ2
The components of the second vector with respect to the document 3D
axis system

Example:

This example retrieves the projection plane of the MyView
drawing
view as two sets of components, X1, Y1, and Z1 for the first
vector,
X2, Y2, and Z2 for the second vector.


MyView.GenerativeBehavior.GetProjectionPlane X1, Y1, Z1, X2, Y2, Z2
Parameters
  • o_x1 (float) –

  • o_y1 (float) –

  • o_z1 (float) –

  • o_x2 (float) –

  • o_y2 (float) –

  • o_z2 (float) –

Returns

None

get_projection_plane_normal(o_x_normal, o_y_normal, o_z_normal)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetProjectionPlaneNormal(double oXNormal,
double oYNormal,
double oZNormal)

Returns the normal vector of the drawing view projection plane. This
represents the direction of projection.

Parameters:

oXNormal,oYNormal,oZNormal
The components of the projection plane normal vector with respect
to the document 3D axis system

Example:

This example retrieves the projection plane normal vector of
the
MyView drawing view as three components Xn, Yn, and
Zn.


MyView.GenerativeBehavior.GetProjectionPlaneNormal Xn, Yn, Zn
Parameters
  • o_x_normal (float) –

  • o_y_normal (float) –

  • o_z_normal (float) –

Returns

None

property hidden_line_mode

Note

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

Returns or sets the view hidden line drawing mode. The hidden line drawing
mode indicates whether to draw the hidden lines.

Example:

This example sets the view hidden line drawing mode of the
MyView
drawing view to catHLRModeOn to indicate that hidden lines must
not
be drawn.


MyView.GenerativeBehavior.HiddenLineMode = catHLRModeOn
Returns

enum cat_hidden_line_mode

property image_view_mode

Note

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

Returns or sets the view generation mode as pixel image.

Returns:
S_OK
if the operation succeeded.
E_FAIL
For both methods, if an unspecified failure has occurred


Example:

This example sets the view image generation mode of the
MyView
drawing view to catImageModeHRD to indicate that view is generated as
an
HRD image.


MyView.GenerativeBehavior.CatImageViewMode(catImageModeHRD)
Returns

enum cat_image_view_mode

property limit_bounding_box

Note

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

Returns or sets the bounding box limits under which a part. will not be
taken into account during view generation. The value 0. means that no part will
be filtered.

Returns:
S_OK
if the operation succeeded.
E_FAIL
For both methods, if an unspecified failure has occurred
Returns

float

property parent_view

Note

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

Returns the parent view.

Example:

This example returns in MyParentView the parent view of
the
MyView drawing view.


Dim MyParentView As DrawingView
Set MyParentView = MyView.GenerativeBehavior.ParentView
Returns

DrawingView

property points_projection_mode

Note

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

Returns or sets projection mode for 3D points. This mode indicates whether
to project 3D points.

Example:

This example sets the points projection mode of the
MyView
drawing view to catPointsProjectionModeOn to indicate that

3D points must be projected.


MyView.GenerativeBehavior.PointsProjectionMode = catPointsProjectionModeOn
Returns

enum cat_points_projection_mode

property points_symbol

Note

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

Returns or sets symbol for projected points. The 0 value means that
projected points inherit the symbol of 3D points they come from.
Returns

enum

property representation_mode

Note

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

Returns or sets generated geometry representation mode.

Returns:
S_OK
if the operation succeeded.
E_FAIL
For both methods, if an unspecified failure has occurred and for the
put_RepresentationMode method if the drawing view owns a detail, section or
breakout specification.

Example:

This example sets the representation mode of the MyView
drawing view to catPolyhedricMode to indicate that
it is generated from CGR data.


MyView.GenerativeBehavior.RepresentationMode = catPolyhedricMode
Returns

enum cat_representation_mode

set_axis_systeme(i_product, i_axis_systeme)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetAxisSysteme(AnyObject iProduct,
AnyObject iAxisSysteme)

Defines an axis systeme in the view.

Parameters:

iProduct
The reference product stored as a CATIABase.
iAxisSysteme
The axis system stored as a CATIABase.
Parameters
Returns

None

set_gps_name(i_gps_name)

Note

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

Applies a set of generative parameters to the current view. Parameters will
be taken into account at view update time.

Parameters:

iGPSName
The XML file where generative parameters are retrieved from


Returns:
S_OK
if the operation succeeded.
E_FAIL

Example:

This example applied the GPSFile1 to the MyView drawing
view.


MyView.GenerativeBehavior.SetGPSName “GPSFile1.xml”
Parameters

i_gps_name (str) –

Returns

None

set_projection_plane(i_x1, i_y1, i_z1, i_x2, i_y2, i_z2)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetProjectionPlane(double iX1,
double iY1,
double iZ1,
double iX2,
double iY2,
double iZ2)

Sets the drawing view projection plane. The projection plane is the plane
to which the document’s geometrical objects are projected and is used as the
drawing view plane. This plane is defined in the document 3D space using the
components of two of its vectors. The cross product of vector V1(X1, Y1, Z1) by
vector V2(X2, Y2, Z2) defines the projection direction. This method can be used
with front views and isometric views to change the projection plane defined
when such views were created. It should not be used with the other types of
views, since their projection planes are defined with respect to their parent
view projection plane.

Parameters:

iX1,iY1,iZ1
The components of the first vector with respect to the document 3D
axis system
iX2,iY2,iZ2
The components of the second vector with respect to the document 3D
axis system

Example:

This example sets the projection plane of the MyView drawing
view
to the XY plane, that is the plane defined with the vectors (1., 0.,
0.) and
(0., 1., 0.).


MyView.GenerativeBehavior.SetProjectionPlane 1., 0., 0., 0., 1., 0.
Parameters
  • i_x1 (float) –

  • i_y1 (float) –

  • i_z1 (float) –

  • i_x2 (float) –

  • i_y2 (float) –

  • i_z2 (float) –

Returns

None

un_break()

Note

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

If a view have been broken with lines in order to hide an area of this
view, this method undoes this modification of the view, and the other types of
view remain.

Example:

This example removes the BrokenView type from MyView if
so.


MyView.GenerativeBehavior.UnBreak()
Returns

None

un_breakout()

Note

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

If a view have gone through a breakout view operation, this method removes
all the breakout view done on this view, and the other types of view
remain.

Example:

This example removes all the breakouts view done on MyView if
so.


MyView.GenerativeBehavior.UnBreakout()
Returns

None

un_breakout_num(i_breakout_number)

Note

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

If a view have gone through a breakout view operation, this method removes
the specified breakout view done on this view, and the other types of view
remain.

Parameters:

iBreakoutNumber
The reference number of the breakout view to be removed (1 to n)


Example:

This example removes the first breakout view done on MyView if
so.


MyView.GenerativeBehavior.UnBreakout(1)
Parameters

i_breakout_number (enum) –

Returns

None

un_clip()

Note

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

If a view have been clipped, this method removes the last clipping view
done on this view, and the other types of view remain.

Example:

This example removes the last clipping view done on MyView if
so.


MyView.GenerativeBehavior.UnClip()
Returns

None

update()

Note

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

Updates the drawing view. This update is performed with respect to any
modification of its DrawingView.GenerativeBehavior
property.

Example:

This example updates the MyView drawing view.


MyView.GenerativeBehavior.Update()
Returns

None

drawing_views

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_views.DrawingViews(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingViews

A collection of all the drawing views currently managed by a drawing sheet in a
drawing document.

Warning: This interface is not available with 2D Layout for 3D
Design.
property active_view

Note

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

Returns the active drawing view of the active drawing
sheet.
Warning: This method is not available with 2D Layout for 3D
Design.

Example:
The following example retrieves in ViewToWorkIn the active drawing view
in the DrawingSheets collection of the document named
CATDrawing1

Dim MyDrawingDoc As Document
Set MyDrawingDoc = CATIA.Documents.Item(“CATDrawing1”)
Dim ViewToWorkIn As DrawingView
Set ViewToWorkIn = MyDrawingDoc.Sheets.ActiveSheet.DrawingViews.ActiveView
Returns

DrawingView

add(i_drawing_view_name)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(CATBSTR iDrawingViewName) As DrawingView

Creates a drawing view and adds it to the drawing view collection. This
drawing view becomes the active one.
Warning: This method is not available with 2D Layout for 3D
Design.

Parameters:

iDrawingViewName
The name to assign to the created drawing view

Returns:
The created drawing view

Example:
The following example creates a drawing view named LeftView and retrieved
in MyView in the drawing view collection of the MySheet drawing sheet. This
sheet belongs to the drawing sheet collection of the drawing document named
CATDrawing1.

Dim MyDrawingDoc As Document
Set MyDrawingDoc = CATIA.Documents.Item(“CATDrawing1”)
Dim MySheet As DrawingSheet
Set MySheet = MyDrawingDoc.Sheets.Item(“FirstSheet”)
Dim MyView As DrawingView
Set MyView = MySheet.Views.Add(“LeftView”)
Parameters

i_drawing_view_name (str) –

Returns

DrawingView

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(CATVariant iIndex) As DrawingView

Returns a drawing view using its index or its name from the DrawingViews
collection.
Warning: This method is not available with 2D Layout for 3D
Design.

Parameters:

iIndex
The index or the name of the drawing view to retrieve from the
collection of drawing views. As a numerics, this index is the rank of the
drawing view in the collection. The index of the first drawing view in the
collection is 1, and the index of the last drawing view is Count. As a string,
it is the name you assigned to the drawing view using the


AnyObject.Name property or when creating it using the Add method.

Returns:
The retrieved drawing view
Example:

This example retrieves in ThisDrawingView the second drawing
view,
and in ThatDrawingView the drawing view named
MyView in the drawing view collection of the active
sheet
in the active document, supposed to be a drawing
document.


Dim MySheet As DrawingSheet
Set MySheet = CATIA.ActiveDocument.Sheets.ActiveSheet
Dim ThisDrawingView As DrawingView
Set ThisDrawingView = MySheet.Views.ActiveView.Item(2)
Dim ThatDrawingView As DrawingView
Set ThatDrawingView = MySheet.Views.ActiveView.Item(“MyView”)
Parameters

i_index (CATVariant) –

Returns

DrawingView

remove(i_index)

Note

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

Removes a drawing view from the DrawingViews collection.
Warning: This method is not available with 2D Layout for 3D Design and it’s
forbidden and not possible to delete main view and background view contained in
this collection.

Parameters:

iIndex
The index or the name of the drawing view to remove from the
collection of drawing views. As a numerics, this index is the rank of the
drawing view in the collection. The index of the first drawing view in the
collection is 1, and the index of the last drawing view is Count. As a string,
it is the name you assigned to the drawing view using the


AnyObject.Name property or when creating it using the Add method.


Example:
The following example removes the third drawing view and the drawing view
named TopView in the drawing view collection of the active sheet of the active
document, supposed to be a drawing document.

Dim MySheet As DrawingSheet
Set MySheet = CATIA.ActiveDocument.Sheets.ActiveSheet
MySheet.ActiveViews.Remove(3)
MySheet.ActiveViews.Remove(“TopView”)
Parameters

i_index (CATVariant) –

Returns

None

drawing_welding

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_welding.DrawingWelding(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
DrawingWelding

Represents a drawing welding in a drawing view.
property angle

Note

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

Returns or sets the angle of the drawing text. The angle is measured
between the axis system of the drawing view and the local axis system of the
drawing text. The angle is measured in radians and is counted
counterclockwise.

Example:
This example sets the angle of the MyText drawing Text to 90 degrees
clockwise. You first need to compute the angle in degrees and set the minus
sign to indicate the rotation is clockwise.

Angle90Clockwise = -90
MyText.Angle = Angle90Clockwise
Returns

float

get_additional_symbol(i_weld)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetAdditionalSymbol(CatWelding iWeld) As
CatWeldAdditionalSymbol

Returns the additional symbol of the drawing welding.

Parameters:

iWeld
The xxx

Example:
This example sets an concave additinal symbol on the MyWelding
drawing welding

MyWelding.Symbol = DftConcaveSymbol
Parameters

i_weld (CatWelding) –

Returns

enum cat_weld_additional_symbol

get_finish_symbol(i_weld)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetFinishSymbol(CatWelding iWeld) As
CatDftWeldFinishSymbol

Returns the finish symbol of the drawing welding.

Parameters:

iWeld
The field on which finish symbol is applied.

Example:
This example returns the finish symbol on the first symbol of
the MyWelding drawing welding

MyWelding.GetFinishSymbol(catWeldingFieldOne,oFinishSymbol)
Parameters

i_weld (CatWelding) –

Returns

enum cat_dft_weld_finish_symbol

get_symbol(i_weld)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetSymbol(CatWelding iWeld) As CatWeldingSymbol

Returns the symbol of the drawing welding.

Parameters:

iWeld
The field on which the symbol is applied
oSymbol
The welding symbol

Example:
This example gets the symbol on the first field of the
MyWelding drawing welding

MyWelding.GetSymbol(catWeldingFieldOne,oSymbol)
Parameters

i_weld (CatWelding) –

Returns

enum cat_welding_symbol

get_text_range(i_field)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetTextRange(CatWeldingField iField) As
DrawingTextRange

Returns the field of the drawing welding in a drawing text
range.

Parameters:

iField
The drawing welding field

Returns:
The drawing text range that corresponds to the drawing welding field


Example:
This example retrieves the xxx.

Dim textRange As DrawingTextRange
Set textRange = MyWelding.GetTextRange (catWeldingUp)
Parameters

i_field (CatWeldingField) –

Returns

DrawingTextRange

property identification_line_side

Note

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

Returns or sets the welding identification line Side of the drawing welding
symbol.
Precondition: This property is only available for ISO
standard.

Example:
This example sets welding identification line Side to Up
.

MyWeld.IdentificationLineSide = catWeldingUp
Returns

enum cat_welding_side

property leaders

Note

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

Returns the drawing leader collection of the drawing
welding.

Example:
This example retrieves in LeaderCollection the collection of leaders of
the MyWelding drawing welding.

Dim LeaderCollection As DrawingLeaders
Set LeaderCollection = MyWelding.Leaders
Returns

DrawingLeaders

set_additional_symbol(i_symbol, iweld)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetAdditionalSymbol(CatWeldAdditionalSymbol iSymbol,
CatWelding iweld)

Sets the additional symbol of the drawing welding.

Parameters:

iSymbol
The welding additional symbol
iWeld
The xxx

Example:
This example sets an concave additinal symbol on the MyWelding
drawing welding

MyWelding.Symbol = DftConcaveSymbol
Parameters
  • i_symbol (CatWeldAdditionalSymbol) –

  • iweld (CatWelding) –

Returns

None

set_finish_symbol(i_finish_symbol, i_weld)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetFinishSymbol(CatDftWeldFinishSymbol iFinishSymbol,
CatWelding iWeld)

Sets the finish symbol of the drawing welding.

Parameters:

iFinishSymbol
The finish welding symbol
iWeld
The field on which finish symbol will be applied.

Example:
This example sets the finish symbol on the first symbol of the
MyWelding drawing welding


MyWelding.GetFinishSymbol(catWeldingFieldOne,catDftLetterCWelding)
Parameters
  • i_finish_symbol (CatDftWeldFinishSymbol) –

  • i_weld (CatWelding) –

Returns

None

set_symbol(i_symbol, iweld)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetSymbol(CatWeldingSymbol iSymbol,
CatWelding iweld)

Sets the symbol of the drawing welding.

Parameters:

iSymbol
The welding symbol
iWeld
The field on which the symbol is applied

Example:
This example sets a symbol on the first field of the MyWelding
drawing welding

MyWelding.SetSymbol(catSquareWelding,catWeldingFieldOne)
Parameters
  • i_symbol (CatWeldingSymbol) –

  • iweld (CatWelding) –

Returns

None

property text_properties

Note

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

Returns the text properties of the drawing welding.

Example:
This example retrieves in TextProperties the text properties of the
MyWelding drawing welding..

Dim TextProperties As DrawingTextProperties
Set TextProperties = MyWelding.TextProperties
Returns

DrawingTextProperties

property welding_side

Note

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

Returns or sets the welding side of the drawing welding
symbol.

Example:
This example sets welding side to Up .

MyWeld.WeldingSide = catWeldingUp
Returns

enum cat_welding_side

property welding_tail

Note

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

Returns or sets the welding tail of the drawing welding
symbol.

Example:
This example displays the welding symbol tail.

MyWeld.WeldingTail = catDftWeldingTailYES
Returns

enum cat_dft_welding_tail

property x

Note

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

Returns or sets the x coordinate of the drawing welding. It is expressed
with respect to the current view coordinate system. This coordinate, like any
length, is measured in millimeters.

Example:
This example retrieves in X the x coordinate of the MyWelding drawing
welding.

X = MyWelding.x
Returns

float

property y

Note

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

Returns or sets the y coordinate of the drawing welding. It is expressed
with respect to the current view coordinate system. This coordinate, like any
length, is measured in millimeters.

Example:
This example sets the y coordinate of the MyWelding drawing welding to
5 inches. You need first to convert the 5 inches into
millmeters.

NewYCoordinate = 5*25.4/1000
MyWelding.y = NewYCoordinate
Returns

float

drawing_weldings

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_weldings.DrawingWeldings(com_object)

Note

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

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
DrawingWeldings

A collection of all the drawing weldings currently managed by a drawing view of
drawing sheet in a drawing document.
add(i_symbol, i_position_x, i_position_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Add(CatWeldingSymbol iSymbol,
double iPositionX,
double iPositionY) As DrawingWelding

Creates a drawing welding and adds it to the drawing weldings collection.
This drawing welding becomes the active one.

Parameters:

iSymbol
The drawing welding symbol to assign to the drawing welding

iPositionX,iPositionY
The drawing welding x and y coordinates, expressed in millimeters,
and expressed with respect to the view coordinate system


Returns:
The created drawing welding

Example:
The following example creates a drawing welding, retrieved in MyWelding, in
the MyView drawing view. This view belongs to the drawing view collection of
the drawing sheet.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim MyWelding As DrawingWelding
Set MyWelding =
MyView.Weldings.Add(catSquareWelding, 0., 0.)
Parameters
  • i_symbol (CatWeldingSymbol) –

  • i_position_x (float) –

  • i_position_y (float) –

Returns

DrawingWelding

item(i_index)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(long iIndex) As DrawingWelding

Returns a drawing welding using its index from the drawing weldings
collection.

Parameters:

iIndex
The index of the drawing welding to retrieve from the collection of
drawing weldings. As a numerics, this index is the rank of the drawing welding
in the collection. The index of the first drawing welding in the collection is
1, and the index of the last drawing welding is Count.


Returns:
The retrieved drawing welding

Example:
This example retrieves in ThisDrawingWelding the second drawing welding, in
the drawing welding collection of the active view in the active sheet, in the
active document supposed to be a drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
Dim ThisDrawingWelding As DrawingWelding
Set ThisDrawingWelding = MyView.Weldings.Item(2)
Parameters

i_index (int) –

Returns

DrawingWelding

remove(i_index)

Note

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

Removes a drawing welding from the drawing weldings
collection.

Parameters:

iIndex
The index of the drawing welding to remove from the collection of
drawing weldings. As a numerics, this index is the rank of the drawing text in
the collection. The index of the first drawing welding in the collection is 1,
and the index of the last drawing welding is Count.


Example:
The following example removes the third drawing welding from the
drawing welding collection of the active view of the active document, supposed
to be a drawing document.

Dim MyView As DrawingView
Set MyView = MySheet.Views.ActiveView
MyView.Drawing.Remove(3)
Parameters

i_index (int) –

Returns

None

print_area

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.print_area.PrintArea(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
PrintArea

Manages print area of drawing sheet.

This interface is obtained from DrawingSheet.PrintArea method.
property activation_state

Note

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

Activates or deactivates the print area.

Parameters:

in
boolean iActivated [in] The activation state of the print area
(TRUE means activated, FALSE means deactivated).

Returns:
Un HRESULT

S_OK
The activation state could be valuated.
E_FAIL
No activation or deactivation possible.
Returns

False

property area_height

Note

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

Valuates the height of the print area.

Parameters:

in
double iHeigth [in] The height of the print area. The value must be
strictly positive.

Returns:
Un HRESULT

S_OK
E_FAIL
Returns

False

property area_low_x

Note

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

Valuates the low x coordinate of the print area.

Parameters:

in
double iX [in] The low x coordinate.

Returns:
Un HRESULT

S_OK
E_FAIL
Returns

False

property area_low_y

Note

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

Valuates the low y coordinate of the print area.

Parameters:

in
double iY [in] The low y coordinate.

Returns:
Un HRESULT

S_OK
E_FAIL
Returns

False

property area_width

Note

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

Valuates the width of the print area.

Parameters:

in
double iWidth [in] The width of the print area. The value must be
strictly positive.

Returns:
Un HRESULT

S_OK
E_FAIL
Returns

False

get_area(o_x, o_y, o_width, o_height, o_activated)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetArea(double oX,
double oY,
double oWidth,
double oHeigth,
boolean oActivated)

Gets the printing area defined on an object. Also communicates the
activation state of the printing area.
All the values are given in mm.

Parameters:

out
double oX [out] The low x coordinate of the area.
out
double oY [out] The low y coordinate of the area.
out
double oWidth [out] The width of the area.
out
double oHeigth [out] The height of the area.
out
boolean oActivated [out] The activation state of the print area (TRUE
means activated, FALSE means deactivated).

Returns:
Un HRESULT

S_OK
The print area was succesfully retrieved.
E_FAIL
No print area could be retrived.
Parameters
  • o_x (float) –

  • o_y (float) –

  • o_width (float) –

  • o_height (float) –

  • o_activated (bool) –

Returns

None

set_area(i_x, i_y, i_width, i_height)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetArea(double iX,
double iY,
double iWidth,
double iHeigth)

Sets a set of coordinates to define a rectangle print area.

All the values are given in mm.

Parameters:

in
double iX [in] The low x coordinate of the area.
in
double iY [in] The low y coordinate of the area.
in
double iWidth [in] The width of the area. The value must be strictly
positive.
in
double iHeigth [in] The height of the area. The value must be strictly
positive.

Returns:
Un HRESULT

S_OK
The print area was successfully defined.
E_FAIL
No print area could be defined.
Parameters
  • i_x (float) –

  • i_y (float) –

  • i_width (float) –

  • i_height (float) –

Returns

None