pycatia.in_interfaces.vis_property_set¶
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.in_interfaces.vis_property_set.VisPropertySet(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectVisPropertySetRepresents the graphic properties for the current selection.Role: We retrieve the graphic properties of the current selection thanks toSelection.VisPropertiesThe graphic properties are:The ColorThe Color is defined by 3 components (red,green,blue). Each componentranges from 0 to 255The OpacityThe opacity is defined from 255 (total opacity) to 0 (total transparency).In Material visualization mode the transparency is real, so the element istruly more or less opaque. But in another visualization mode, the transparencyis a simulation, so if the opacity is between 0 and 254 the element istransparent but with the same visual effect and if the opacity is 255 theelement is opaque.The width of a lineEach index defines a width customizable in Tools/Options.The type of a lineSolid, Dashed, …The symbol of a pointStar, Dot, …A partial modification of an objectA part (for example) contains faces, edges, lines, points. Interactively withthe Edit Properties command the end user can change their color, their linetype and so one. To go faster there is the Graphic Toolbar which contains asub-set of properties. So this interface follows the behavior of the graphictoolbar. The color, the line type … is applicated to the sub-element of theobject defined by the application, and that you can retrieve in the graphictoolbar.A multiple selectionWhen we modify a graphic property using the Setxxx methods, we modify one byone each element of the current selection.When we read a graphic property using the Getxxx methods, we retrieve aninformation which is valid for all elements of the currentselection.Real versus Visible graphic propertiesElements of the current selection are inside a specificationtree:Example :Product0Part1Part3Part2In this sample, product0 and Part1 are nodes and Part3 and Part2 areleaves.Each element (node and leaf) of this tree has its own graphic properties: thatis the “Real” graphic properties.But there is an inheritance mecanism, so each element has also “Visible”graphic properties. An element can be displayed with an another graphicproperties that its real graphic properties.The inheritance is the following:From the root of the tree, the first node with an inheritance flag to 1, givesits property to each element below it. For each graphic property there is anindependantly inheritance.Example with the color property: ( color inheritance flag,color)Product0 (1,red)Part1 (0,blue)Part3 (1,green)Part2 (0,Yellow)In this sample the real colord of the product0 is red, blue for the part1,green for the part3 and yellow for the part2. But the visible color of eachelement is red, because the product0 gives the red color at all thetree.See also:Selection- get_layer() tuple ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetLayer(CatVisLayerType oLayerType,long oLayerValue) As CatVisPropertyStatusReturns the layer for the current selection.Note: This property is global for the object.Parameters:oLayerTypethe type of the layerWhen the type is equal to catVisLayerNone, the layer of the currentselection is “none”.When the type is equal to catVisLayerBasic, the layer of thecurrection selection is indicated by the followingparameter.oLayerValueA value between 0 to 1000This parameter is usefull only when the type of the layer iscatVisLayerBasic.Example:The following sample shows how to retrieve layer of currentselection.Dim layerlayer = CLng(0)Dim layertype As CatVisLayerTypeSet visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetLayer layertype, layerIf (layertype = catVisLayerNone) ThenMsgBox “Layer None”End IfIf (layertype = catVisLayerBasic) ThenMsgBox “layer =” & layerEnd If
- Returns:
- Return type:
tuple
- get_pick() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetPick(CatVisPropertyPick oPick) AsCatVisPropertyStatusReturns the state pick mode for the current selection.Note: This property is global for the object.Example:The following sample shows how to retrieve pick mode of currentselection.Dim pickstate As CatVisPropertyPickSet visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetPick pickstateMsgBox “pick = “ & pickstate
- Returns:
enum cat_vis_property_status
- Return type:
int
- get_real_color() tuple ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetRealColor(long oRed,long oGreen,long oBlue) As CatVisPropertyStatusRetrieves the real color for the current selection.Parameters:oRedA value between 0 and 255oGreenA value between 0 and 255oBlueA value between 0 and 255oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same real color,so oRed, oGreen and oBlue are validcatVisPropertyUnDefinedThe real color is not the same for all elements of the currentselection, so oRed, oGreen and oBlue are not validExample:The following sample shows how to retrieve real colors of currentselection.Dim r, g, br = CLng(0)g = CLng(0)b = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetRealColor r, g, bMsgBox “r = “ & r & “ g = “ & g & “ b = “ & b
- Return type:
tuple
- get_real_inheritance() tuple ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetRealInheritance(CatVisPropertyType iPropertyType,long oInheritance) As CatVisPropertyStatusRetrieves the real inheritance flag for the currentselection.Parameters:iPropertyTypeThe type of property: Color, Opacity, Line Width, Line TypeoInheritance0No heritance1HeritanceoStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same realinheritance flag for the iPropertyType , so oInheritance is validcatVisPropertyUnDefinedThe real inheritance flag for iPropertyType is not the same forall elements of the current selection, so oInheritance is not validExample:The following sample shows how to retrieve inheritance of currentselection.Dim inhLineType, inhWidth, inhColor, inhOpacityinhLineType = CLng(0)inhWidth = CLng(0)inhColor = CLng(0)inhOpacity = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetRealInheritance catVisPropertyLineType,inhLineTypevisProperties1.GetRealInheritance catVisPropertyWidth,inhWidthvisProperties1.GetRealInheritance catVisPropertyColor,inhColorvisProperties1.GetRealInheritance catVisPropertyOpacity,inhOpacityMsgBox “Inheritance : linetype = “ & inhLineType & “width =” & inhWidth & “Colour =”& inhColor & “Opacity =” & inhOpacity
- Return type:
tuple
- get_real_line_type() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetRealLineType(long oLineType) AsCatVisPropertyStatusRetrieves the real line type for the current selection.Parameters:oLineTypeThe value ranges from 1 to 63. Each indice is a line typecustomizable in the page Tools/Options/General/Display/Line Type.oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same real linetype , so oLineType is validcatVisPropertyUnDefinedThe real line type is not the same for all elements of thecurrent selection, so oLineType is not validcatVisProperty?At least one element of the current selection is not concernedby this property, so oLineType is not validExample:The following sample shows how to retrieve real line type of currentselection.Dim linetypelinetype = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetRealLineType linetypeMsgBox “linetype = “ & linetype
- Return type:
int
- get_real_opacity() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetRealOpacity(long oOpacity) As CatVisPropertyStatusRetrieves the real opacity for the current selection.Parameters:oOpacitya value between 0 (total transparency) and 255 (total opacity)oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same realopacity value, so oOpacity is validcatVisPropertyUnDefinedThe real opacity value is not the same for all elements of thecurrent selection, so oOpacity is not validcatVisProperty?At least one element of the current selection is not concernedby this property, so oOpacity is not validExample:The following sample shows how to retrieve real opacity of currentselection.Dim opop = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetRealOpacity opMsgBox “opacity = “ & op
- Return type:
int
- get_real_width() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetRealWidth(long oLineWidth) As CatVisPropertyStatusRetrieves the real line width for the current selection.Parameters:oLineWidthThe value ranges from 1 to 63. Each indice is a thicknesscustomizable in the page Tools/Options/General/Display/thickness.oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same real width, so oLineWidth is validcatVisPropertyUnDefinedThe real width is not the same for all elements of the currentselection, so oLineWidth is not validcatVisProperty?At least one element of the current selection is not concernedby this property, so oLineWidth is not validExample:The following sample shows how to retrieve real line width of currentselection.Dim widthwidth = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetRealWidth widthMsgBox “width = “ & width
- Return type:
int
- get_show() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetShow(CatVisPropertyShow oShow) AsCatVisPropertyStatusReturns the state show mode for the current selection.Note: This property is global for the object.Example:The following sample shows how to retrieve show mode of currentselection.Dim showstate As CatVisPropertyShowSet visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetShow showstateMsgBox “show = “ & showstate
- Return type:
int
- get_symbol_type() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetSymbolType(long oSymbolType) AsCatVisPropertyStatusRetrieves the symbol type for the current selection.Parameters:oSymbolTypeThe symbol type. See SetSymbolType to have values.oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same symbol type ,so oLineType is validcatVisPropertiesUnDefinedThe symbol type is not the same for all elements of the currentselection, so oLineType is not validcatVisProperty?At least one element of the current selection is not concerned bythis property, so oSymbolType is not validExample:The following sample shows how to retrieve symbol line type ofcurrent selection.Dim symbolsymbol = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetSymbolType symbolMsgBox “Symbol = “ & symbol
- Return type:
int
- get_visible_color() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetVisibleColor(long oRed,long oGreen,long oBlue) As CatVisPropertyStatusRetrieves the displayed (visible) color for the currentselection.Parameters:oReda value between 0 and 255oGreena value between 0 and 255oBluea value between 0 and 255oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same visiblecolor, so oRed, oGreen and oBlue are validcatVisPropertyUnDefinedThe visible color is not the same for all elements of thecurrent selection, so oRed, oGreen and oBlue are not validExample:The following sample shows how to retrieve displayed colors ofcurrent selection.Dim r, g, br = CLng(0)g = CLng(0)b = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetVisibleColor r, g, bMsgBox “r = “ & r & “ g = “ & g & “ b = “ & b
- Return type:
int
- get_visible_inheritance() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetVisibleInheritance(CatVisPropertyTypeiPropertyType,long oInheritance) As CatVisPropertyStatusChecks if the real property is hidden.Parameters:iPropertyTypeThe type of property : Color, Opacity, Line Width, Line TypeoInheritance0No heritance: All parents of each element of the currentselection have an inheritance flag to 0.1Heritance: one parent of each element, perhaps the elementitself, as a inheritance flag to 1.oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same inheritanceflag for the iPropertyType , so oInheritance is validcatVisPropertyUnDefinedThe inheritance flag for iPropertyType is not the same for allelements of the current selection, so oInheritance is not valid
- Return type:
int
- get_visible_line_type() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetVisibleLineType(long oLineType) AsCatVisPropertyStatusRetrieves the displayed (visible) line type for the currentselection.Parameters:oLineTypeA value ranges from 1 to 63.oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same visibleline type , so oLineType is validcatVisPropertyUnDefinedThe visible line type is not the same for all elements of thecurrent selection, so oLineType is not validcatVisProperty?At least one element of the current selection is not concernedby this property, so oLineType is not validExample:The following sample shows how to retrieve displayed line type ofcurrent selection.Dim linetypelinetype = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetVisibleLineType linetypeMsgBox “linetype = “ & linetype
- Return type:
int
- get_visible_opacity() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetVisibleOpacity(long oOpacity) AsCatVisPropertyStatusRetrieves the displayed (visible) opacity for the currentselection.Parameters:oOpacitya value between 0 (total transparency) and 255 (total opacity)oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same visibleopacity value, so oOpacity is validcatVisPropertyUnDefinedThe visible opacity value is not the same for all elements ofthe current selection, so oOpacity is not validcatVisProperty?At least one element of the current selection is not concernedby this property, so oOpacity is not validExample:The following sample shows how to retrieve displayed opacity ofcurrent selection.Dim opop = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetVisibleOpacity opMsgBox “opacity = “ & op
- Return type:
int
- get_visible_width() int ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func GetVisibleWidth(long oLineWidth) AsCatVisPropertyStatusRetrieves the displayed (visible) line width for the currentselection.Parameters:oLineWidthA value ranges from 1 to 63.oStatusLegal value:catVisPropertyDefinedAll elements in the current selection have the same visiblewidth , so oLineWidth is validcatVisPropertyUnDefinedThe visible width is not the same for all elements of thecurrent selection, so oLineWidth is not validcatVisProperty?At least one element of the current selection is not concernedby this property, so oLineWidth is not validExample:The following sample shows how to retrieve displayed line width ofcurrent selection.Dim widthwidth = CLng(0)Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.GetVisibleWidth widthMsgBox “width = “ & width
- Return type:
int
- set_layer(i_layer_type: int, i_layer_value: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub SetLayer(CatVisLayerType iLayerType,long iLayerValue)Sets the layer for the current selection.Note: This property is global for the object.Parameters:iLayerTypethe type of the layeriLayerValueA value between 0 to 1000This parameter is used only when the type of the layer iscatVisLayerBasic.Example:The following sample shows how to change layer of currentselection.Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.SetLayer catVisLayerBasic, 100
- Parameters:
i_layer_type (int) – enum cat_vis_layer_type
i_layer_value (int) –
- Return type:
None
- set_pick(i_pick: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub SetPick(CatVisPropertyPick iPick)Sets the state pick mode for the current selection.Note: This property is global for the object.Example:The following sample shows how to change pick mode of currentselection.Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.SetPick catVisPropertyNoPickAttr
- Parameters:
i_pick (int) – enum cat_vis_property_pick
- Return type:
None
- set_real_color(i_red: int, i_green: int, i_blue: int, i_inheritance: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub SetRealColor(long iRed,long iGreen,long iBlue,long iInheritance)Sets the real color and the color inheritance flag for the currentselection.Parameters:iRedA value between 0 and 255iGreenA value between 0 and 255iBlueA value between 0 and 255iInheritanceLegal value:0No heritance1HeritanceExample:The following sample shows how to change colour of currentselection.Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.SetRealColor 255,0,0,1
- Parameters:
i_red (int) –
i_green (int) –
i_blue (int) –
i_inheritance (int) –
- Return type:
None
- set_real_line_type(i_line_type: int, i_inheritance: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub SetRealLineType(long iLineType,long iInheritance)Sets the real line type and the line type inheritance flag for the currentselection.Parameters:iLineTypeThe value ranges from 1 to 63. Each indice is a line typecustomizable in the page Tools/Options/General/Display/Line Type.iInheritanceLegal value:0No heritance1HeritanceExample:The following sample shows how to change line type of currentselection.Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.SetRealLineType 4,1
- Parameters:
i_line_type (int) –
i_inheritance (int) –
- Return type:
None
- set_real_opacity(i_opacity: int, i_inheritance: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub SetRealOpacity(long iOpacity,long iInheritance)Sets the opacity and the opacity inheritance flag for the currentselection.Parameters:iOpacityA value between 0 (total transparency) and 255 (total opacity).iInheritanceLegal value:0No heritanceExample:The following sample shows how to change opacity of currentselection.Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.SetRealOpacity 128,1
- Parameters:
i_opacity (int) –
i_inheritance (int) –
- Return type:
None
- set_real_width(i_line_width: int, i_inheritance: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub SetRealWidth(long iLineWidth,long iInheritance)Sets the real line width and the line width inheritance flag for thecurrent selection.Parameters:iLineWidthThe value ranges from 1 to 63. Each indice is a thicknesscustomizable in the page Tools/Options/General/Display/thickness.iInheritanceLegal value:0No heritance1HeritanceExample:The following sample shows how to change line width of currentselection.Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.SetRealWidth 4,1
- Parameters:
i_line_width (int) –
i_inheritance (int) –
- Return type:
None
- set_show(i_show: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub SetShow(CatVisPropertyShow iShow)Sets the state show mode for the current selection.Note: This property is global for the object.Example:The following sample shows how to change show mode of currentselection.Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.SetShow catVisPropertyNoShowAttr
- Parameters:
i_show (int) – enum cat_vis_property_show
- Return type:
None
- set_symbol_type(i_symbol_type: int) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub SetSymbolType(long iSymbolType)Sets the symbol type.Note:There is no heritage for symbols. That is why there is only onefunction “SetSymbolType” and no function “SetRealSymbolType” or“SetVisibleSymbolType”Parameters:iSymbolTypeThe symbol typelegal values:1 : a cross which looks like a “X”.2 : a cross which looks like a “+”3 : an unfilled circle4 : two unfilled concentric circles5 : a filled circle6 : a filled square7 : a star which is the union of a 2D marker CROSS ,a 2D marker PLUS and a 2D markerDOT8 : a dot9 : a smalldot (one pixel)10 : a kind of arrow which points to the bottom-left11 : a kind of arrow which points to the top-rightFULLCIRCLE2 : a big 12FULLSQUARE2 : a big 13Example:The following sample shows how to change symbol type of currentselection.Set visProperties1 = CATIA.ActiveDocument.Selection.VisPropertiesvisProperties1.SetSymbolType 4
- Parameters:
i_symbol_type (int) –
- Return type:
None