Object API/it: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
No edit summary
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
Being parametric, document objects in FreeCAD can have a lot of additional properties, but these are the basic ones, present in every FreeCAD Document Object. Objects can be retrieved simply by their name. Example:
{{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]].}}


Essendo parametrici, in FreeCAD gli oggetti del documento possono avere un sacco di altre proprietà. Queste sono quelle di base, presenti in ogni FreeCAD Document Object. Gli oggetti possono essere recuperati semplicemente con il loro nome. Esempio:
myObj = FreeCAD.ActiveDocument.myObjectName
{{Code|code=
print myObj.PropertiesList
myObj = FreeCAD.ActiveDocument.myObjectName
print myObj.PropertiesList
}}


{{APIProperty|Content|an XML representation of the properties of an object.}}
{{APIProperty|Content|Una rappresentazione XML delle proprietà di un oggetto.}}
{{APIProperty|Label|Gets/sets the objects label. The string can be unicode.}}
{{APIProperty|Label|Ottiene / imposta l'etichetta degli oggetti. La stringa può essere unicode.}}
{{APIProperty|Name|the unique name of an object.}}
{{APIProperty|Name|Il nome univoco di un oggetto.}}
{{APIProperty|Placement|Gets/sets the Placement of an object. A placement defines an orientation (rotation) and a position (base) in 3D space. It is used when no scaling or other distortion is needed.}}
{{APIProperty|Placement|Ottiene / imposta il posizionamento di un oggetto. Un posizionamento definisce un orientamento (rotazione) ed una posizione (base) nello spazio 3D. Viene utilizzato quando non è necessario alcun ridimensionamento o altro tipo di distorsione.}}
{{APIProperty|PropertiesList|a list of the properties of an object}}
{{APIProperty|PropertiesList|Un elenco delle proprietà di un oggetto}}
{{APIProperty|State|the FreeCAD state of an object (ie. if it needs to be recomputed)}}
{{APIProperty|State| Lo stato di FreeCAD di un oggetto (ad esempio se deve essere ricalcolato)}}
{{APIProperty|Type|a string describing the type of an object}}
{{APIProperty|Type|Una stringa che descrive il tipo di oggetto}}
{{APIProperty|ViewObject|the associated View Provider (FreeCADGUI object) of an object}}
{{APIProperty|ViewObject|Il View Provider associato (oggetto FreeCADGUI) a un oggetto}}
{{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 a cui appartiene la proprietà in questa categoria. Le proprietà sono ordinate in gruppi diversi denominati secondo convenienza.}}
{{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|isDerivedFrom| | |True if given type is a father}}
{{APIFunction|isDerivedFrom| | |True se il tipo dato è un padre}}
{{APIFunction|purgeTouched| |Marks the object as unchanged| }}
{{APIFunction|purgeTouched| |Contrassegna l'oggetto come unchanged (invariato)| }}
{{APIFunction|touch| |Marks the object as changed (touched)| }}
{{APIFunction|touch| |Contrassegna l'oggetto come changed (modificato, toccato)| }}


[[Category:API]]
[[Category:API/it]]
<languages/>

Revision as of 20:58, 8 October 2019

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.

Essendo parametrici, in FreeCAD gli oggetti del documento possono avere un sacco di altre proprietà. Queste sono quelle di base, presenti in ogni FreeCAD Document Object. Gli oggetti possono essere recuperati semplicemente con il loro nome. Esempio:

myObj = FreeCAD.ActiveDocument.myObjectName
print myObj.PropertiesList
Content

Returns: Una rappresentazione XML delle proprietà di un oggetto.

Label

Returns: Ottiene / imposta l'etichetta degli oggetti. La stringa può essere unicode.

Name

Returns: Il nome univoco di un oggetto.

Placement

Returns: Ottiene / imposta il posizionamento di un oggetto. Un posizionamento definisce un orientamento (rotazione) ed una posizione (base) nello spazio 3D. Viene utilizzato quando non è necessario alcun ridimensionamento o altro tipo di distorsione.

PropertiesList

Returns: Un elenco delle proprietà di un oggetto

State

Returns: Lo stato di FreeCAD di un oggetto (ad esempio se deve essere ricalcolato)

Type

Returns: Una stringa che descrive il tipo di oggetto

ViewObject

Returns: Il View Provider associato (oggetto FreeCADGUI) a un oggetto

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 a cui appartiene la proprietà in questa categoria. Le proprietà sono ordinate in gruppi diversi denominati secondo convenienza.

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.

isDerivedFrom( )

Description:

Returns: True se il tipo dato è un padre

purgeTouched( )

Description: Contrassegna l'oggetto come unchanged (invariato)

Returns:

touch( )

Description: Contrassegna l'oggetto come changed (modificato, toccato)

Returns: