ViewObject API

From FreeCAD Documentation
Revision as of 20:16, 21 April 2015 by Bzh56420 (talk | contribs) (Created page with "Lorsque l'interface graphique est en place, chaque objet dans le document FreeCAD a une ViewObject associé, qui réside dans le document homologue FreeCAD Gui. Un ViewObject...")
Jump to navigation Jump to search

Lorsque l'interface graphique est en place, chaque objet dans le document FreeCAD a une ViewObject associé, qui réside dans le document homologue FreeCAD Gui. Un ViewObject peut être récupéré par deux moyens. Exemple:

myViewObj = FreeCAD.ActiveDocument.myObjectName.ViewObject
myViewObj = FreeCADGui.ActiveDocument.myObjectName
print myViewObj.IV


Property.png Annotation

Returns: the annotation node of a ViewObject

Property.png BoundingBox

Returns: the bounding box

Property.png Content

Returns: an XML representation of a ViewObject's properties

Property.png DisplayMode

Returns: the current display mode

Property.png IV

Returns: an Inventor representation of the ViewObject

Property.png Object

Returns: the associated FreeCAD Document Object of this ViewObject

Property.png PropertiesList

Returns: a list of properties of this ViewObject

Property.png RootNode

Returns: the Inventor node of this ViewObject (pivy.coin object)

Property.png Selectable

Returns: True if the object is selectable

Property.png Type

Returns: the type of this ViewObject

Property.png Visibility

Returns: True if the viewObject is visible

Method.png getAllDerivedFrom( )

Description:

Returns: all descentences of this object

Method.png getDocumentationOfProperty( )

Description:

Returns: the documentation string of the property of this class.

Method.png getGroupOfProperty( )

Description:

Returns: the name of the group which the property belongs to in this class. The properties sorted in differnt named groups for convenience.

Method.png getPropertyByName( )

Description:

Returns: the value of a named property.

Method.png getTypeOfProperty( )

Description:

Returns: the type of a named property. This can be (Hidden,ReadOnly,Output) or any combination.

Method.png hide( )

Description: Hides the object.

Returns:

Method.png isDerivedFrom(string)

Description: Checks if this object is derived from the given object type

Returns: True if given type is a father

Method.png isVisible( )

Description: Checks if the object is visible

Returns: a boolean

Method.png listDisplayModes( )

Description: Shows a list of all display modes

Returns: a list

Method.png setTransformation(coin.SoTransform)

Description: Sets a transformation on the Inventor node

Returns: nothing

Method.png show( )

Description: Shows the object if hidden

Returns: nothing

Method.png toString( )

Description:

Returns: a string representation of the Inventor node

Method.png update( )

Description: Updates the view representation of the object

Returns:

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎română