ViewObject API/de: Difference between revisions

From FreeCAD Documentation
No edit summary
(Created page with "Wenn die GUI aktiv ist, hat jedes Objekt im FreeCAD-Dokument ein zugeordnetes ViewObject, das sich im FreeCADGui-Dokument-Gegenstück befindet. Ein Ansicht-Objekt kann auf zwe...")
 
Line 2: Line 2:
{{VeryImportantMessage|(Oktober 2019) Bearbeite diese Seiten nicht. Die Informationen sind unvollständig und veraltet. Die neueste API findest Du in der [https://www.freecadweb.org/api autogenerierten API-Dokumentation] oder generiere die Dokumentation selbst, siehe [[Source documentation/de|Quelldokumentation]].}}
{{VeryImportantMessage|(Oktober 2019) Bearbeite diese Seiten nicht. Die Informationen sind unvollständig und veraltet. Die neueste API findest Du in der [https://www.freecadweb.org/api autogenerierten API-Dokumentation] oder generiere die Dokumentation selbst, siehe [[Source documentation/de|Quelldokumentation]].}}


When the GUI is up, each object in the FreeCAD document has an associated ViewObject, that resides in the FreeCADGui document counterpart. A view object can be retrieved by two ways. Example:
Wenn die GUI aktiv ist, hat jedes Objekt im FreeCAD-Dokument ein zugeordnetes ViewObject, das sich im FreeCADGui-Dokument-Gegenstück befindet. Ein Ansicht-Objekt kann auf zwei Arten abgefragt werden. Beispiel:
{{Code|code=
{{Code|code=
myViewObj = FreeCAD.ActiveDocument.myObjectName.ViewObject
myViewObj = FreeCAD.ActiveDocument.myObjectName.ViewObject

Latest revision as of 20:09, 6 September 2021

(Oktober 2019) Bearbeite diese Seiten nicht. Die Informationen sind unvollständig und veraltet. Die neueste API findest Du in der autogenerierten API-Dokumentation oder generiere die Dokumentation selbst, siehe Quelldokumentation.

Wenn die GUI aktiv ist, hat jedes Objekt im FreeCAD-Dokument ein zugeordnetes ViewObject, das sich im FreeCADGui-Dokument-Gegenstück befindet. Ein Ansicht-Objekt kann auf zwei Arten abgefragt werden. Beispiel:

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

Returns: the annotation node of a ViewObject

BoundingBox

Returns: the bounding box

Content

Returns: an XML representation of a ViewObject's properties

DisplayMode

Returns: the current display mode

IV

Returns: an Inventor representation of the ViewObject

Object

Returns: the associated FreeCAD Document Object of this ViewObject

PropertiesList

Returns: a list of properties of this ViewObject

RootNode

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

Selectable

Returns: True if the object is selectable

Type

Returns: the type of this ViewObject

Visibility

Returns: True if the viewObject is visible

getAllDerivedFrom( )

Description:

Returns: all descentences of this object

getDocumentationOfProperty( )

Description:

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

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.

getPropertyByName( )

Description:

Returns: the value of a named property.

getTypeOfProperty( )

Description:

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

hide( )

Description: Hides the object.

Returns:

isDerivedFrom(string)

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

Returns: True if given type is a father

isVisible( )

Description: Checks if the object is visible

Returns: a boolean

listDisplayModes( )

Description: Shows a list of all display modes

Returns: a list

setTransformation(coin.SoTransform)

Description: Sets a transformation on the Inventor node

Returns: nothing

show( )

Description: Shows the object if hidden

Returns: nothing

toString( )

Description:

Returns: a string representation of the Inventor node

update( )

Description: Updates the view representation of the object

Returns: