ViewObject API/it: Difference between revisions

From FreeCAD Documentation
(Created page with "=API di ViewObject= Quando la GUI è attiva, a ogni oggetto del documento FreeCAD è associato un ViewObject, che risiede nella controparte FreeCADGui del documento. Un oggett...")
 
(Updating to match new version of source page)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
=API di ViewObject=
{{VeryImportantMessage|(Ottobre 2019) Non modificare queste pagine. Le informazioni sono incomplete e obsolete. Per l'API più recente, consultare la [https://www.freecadweb.org/api documentazione API autogenerata] o generare la documentazione autonomamente. Vedere [[Source documentation/it|Documentazione del codice sorgente]].}}
Quando la GUI è attiva, a ogni oggetto del documento FreeCAD è associato un ViewObject, che risiede nella controparte FreeCADGui del documento. Un oggetto della vista può essere recuperato in due modi. Esempio:


Quando la GUI è attiva, a ogni oggetto del documento FreeCAD è associato un ViewObject, che risiede nella controparte FreeCADGui del documento. Un oggetto della vista può essere recuperato in due modi. Esempio:
myViewObj = FreeCAD.ActiveDocument.myObjectName.ViewObject
{{Code|code=
myViewObj = FreeCADGui.ActiveDocument.myObjectName
myViewObj = FreeCAD.ActiveDocument.myObjectName.ViewObject
print myViewObj.IV
myViewObj = FreeCADGui.ActiveDocument.myObjectName
print myViewObj.IV
}}


{{APIProperty|Annotation|the annotation node of a ViewObject}}
{{APIProperty|Annotation|il nodo della annotazione di un oggetto della vista ViewObject}}
{{APIProperty|BoundingBox|the bounding box}}
{{APIProperty|BoundingBox|Il contenitore}}
{{APIProperty|Content|an XML representation of a ViewObject's properties}}
{{APIProperty|Content|una rappresentazione XML delle proprietà di un ViewObject}}
{{APIProperty|DisplayMode|the current display mode}}
{{APIProperty|DisplayMode|la modalità di visualizzazione corrente}}
{{APIProperty|IV|an Inventor representation of the ViewObject}}
{{APIProperty|IV|una rappresentazione Inventor del ViewObject}}
{{APIProperty|Object|the associated FreeCAD Document Object of this ViewObject}}
{{APIProperty|Object|il FreeCAD Document Object associato a questo ViewObject}}
{{APIProperty|PropertiesList|a list of properties of this ViewObject}}
{{APIProperty|PropertiesList|un elenco di proprietà di questo ViewObject}}
{{APIProperty|RootNode|the Inventor node of this ViewObject (pivy.coin object)}}
{{APIProperty|RootNode|il nodo di Inventor di questo ViewObject (pivy.coin object)}}
{{APIProperty|Selectable|True if the object is selectable}}
{{APIProperty|Selectable|True se l'oggetto è selezionabile}}
{{APIProperty|Type|the type of this ViewObject}}
{{APIProperty|Type|il tipo di questo ViewObject}}
{{APIProperty|Visibility|True if the viewObject is visible}}
{{APIProperty|Visibility|True se il viewObject è visibile}}
{{APIFunction|getAllDerivedFrom| | |all descentences of this object}}
{{APIFunction|getAllDerivedFrom| | |tutti i discendenti di questo oggetto}}
{{APIFunction|getDocumentationOfProperty| | |the documentation string of the property of this class.}}
{{APIFunction|getDocumentationOfProperty| | |la stringa di documentazione della proprietà di questa classe.}}
{{APIFunction|getGroupOfProperty| | |the name of the group which the property belongs to in this class. The properties sorted in differnt named groups for convenience.}}
{{APIFunction|getGroupOfProperty| | |il nome del gruppo al quale appartiene la proprietà in questa classe. Per comodità, le proprietà sono ordinate in gruppi con nomi diversi.}}
{{APIFunction|getPropertyByName| | |the value of a named property.}}
{{APIFunction|getPropertyByName| | |il valore di una proprietà denominata.}}
{{APIFunction|getTypeOfProperty| | |the type of a named property. This can be (Hidden,ReadOnly,Output) or any combination.}}
{{APIFunction|getTypeOfProperty| | |il tipo di una proprietà denominata. Questo può essere(Hidden,ReadOnly,Output) o qualsiasi combinazione.}}
{{APIFunction|hide| |Hides the object.| }}
{{APIFunction|hide| |Nasconde l'oggetto.| }}
{{APIFunction|isDerivedFrom|string|Checks if this object is derived from the given object type|True if given type is a father}}
{{APIFunction|isDerivedFrom|string|Controlla se questo oggetto è derivato dal dato tipo di oggetto | True se il tipo dato è suo genitore}}
{{APIFunction|isVisible| |Checks if the object is visible|a boolean}}
{{APIFunction|isVisible| |Controlla se l'oggetto è visibile | un valore booleano}}
{{APIFunction|listDisplayModes| |Shows a list of all display modes|a list}}
{{APIFunction|listDisplayModes| |Mostra un elenco di tutte le modalità di visualizzazione |una lista}}
{{APIFunction|setTransformation|coin.SoTransform|Sets a transformation on the Inventor node|nothing}}
{{APIFunction|setTransformation|coin.SoTransform|Imposta una trasformazione sul nodo Inventor |nulla}}
{{APIFunction|show| |Shows the object if hidden|nothing}}
{{APIFunction|show| |Mostra l'oggetto, se è nascosto |nulla}}
{{APIFunction|toString| | |a string representation of the Inventor node}}
{{APIFunction|toString| | |una rappresentazione in stringa del nodo Inventor}}
{{APIFunction|update| |Updates the view representation of the object| }}
{{APIFunction|update| |Aggiorna la rappresentazione della vista dell'oggetto| }}


{{Userdocnavi{{#translation:}}}}
{{languages/it | {{en|ViewObject_API}} {{es|ViewObject_API/es}} }}
[[Category:API{{#translation:}}]]
[[Category:API/it]]
[[Category:Poweruser Documentation{{#translation:}}]]
{{clear}}

Latest revision as of 21:08, 27 February 2020

Other languages:
(Ottobre 2019) Non modificare queste pagine. Le informazioni sono incomplete e obsolete. Per l'API più recente, consultare la documentazione API autogenerata o generare la documentazione autonomamente. Vedere Documentazione del codice sorgente.

Quando la GUI è attiva, a ogni oggetto del documento FreeCAD è associato un ViewObject, che risiede nella controparte FreeCADGui del documento. Un oggetto della vista può essere recuperato in due modi. Esempio:

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

Returns: il nodo della annotazione di un oggetto della vista ViewObject

BoundingBox

Returns: Il contenitore

Content

Returns: una rappresentazione XML delle proprietà di un ViewObject

DisplayMode

Returns: la modalità di visualizzazione corrente

IV

Returns: una rappresentazione Inventor del ViewObject

Object

Returns: il FreeCAD Document Object associato a questo ViewObject

PropertiesList

Returns: un elenco di proprietà di questo ViewObject

RootNode

Returns: il nodo di Inventor di questo ViewObject (pivy.coin object)

Selectable

Returns: True se l'oggetto è selezionabile

Type

Returns: il tipo di questo ViewObject

Visibility

Returns: True se il viewObject è visibile

getAllDerivedFrom( )

Description:

Returns: tutti i discendenti di questo oggetto

getDocumentationOfProperty( )

Description:

Returns: la stringa di documentazione della proprietà di questa classe.

getGroupOfProperty( )

Description:

Returns: il nome del gruppo al quale appartiene la proprietà in questa classe. Per comodità, le proprietà sono ordinate in gruppi con nomi diversi.

getPropertyByName( )

Description:

Returns: il valore di una proprietà denominata.

getTypeOfProperty( )

Description:

Returns: il tipo di una proprietà denominata. Questo può essere(Hidden,ReadOnly,Output) o qualsiasi combinazione.

hide( )

Description: Nasconde l'oggetto.

Returns:

isDerivedFrom(string)

Description: Controlla se questo oggetto è derivato dal dato tipo di oggetto

Returns: True se il tipo dato è suo genitore

isVisible( )

Description: Controlla se l'oggetto è visibile

Returns: un valore booleano

listDisplayModes( )

Description: Mostra un elenco di tutte le modalità di visualizzazione

Returns: una lista

setTransformation(coin.SoTransform)

Description: Imposta una trasformazione sul nodo Inventor

Returns: nulla

show( )

Description: Mostra l'oggetto, se è nascosto

Returns: nulla

toString( )

Description:

Returns: una rappresentazione in stringa del nodo Inventor

update( )

Description: Aggiorna la rappresentazione della vista dell'oggetto

Returns: