Modèle GuiCommand

From FreeCAD Documentation
Revision as of 20:55, 23 June 2019 by Gnrc (talk | contribs)
Cette page montre un modèle de page Gui Command. Sous la section Bloc sélectionnable ci-dessous, vous trouverez le même contenu que vous pouvez facilement sélectionner pour le coller dans une nouvelle page.

Modèle_ExempleDeLaCommande

Emplacement du menu
Menu → Commande
Ateliers
Raccourci par défaut
Aucun
Introduit dans la version
-
Voir aussi
Aucun

Description

tant que la page est en construction, laissez le modèle {{UnfinishedDocu}} en haut de la page.

Insérez ici une brève description de ce que fait la commande.

Ajoutez une image si possible et suivez les instructions dans WikiPages#Graphics. Exemple tiré de Draft Line :

Facultatif : ajoutez une légende sous l'image pour expliquer le fonctionnement de l'outil.

Closing and opening translate tags should surround images, and other fixed elements, if they don't need to be translated. The caption should always be translated.

Comment faire

  1. Pressez sur le bouton File:Std Close.png Nom de la commande.
  2. Étapes détaillées au besoin.
  3. Définissez les options et appuyez sur le bouton OK.

Options

Template:TitleTasks/fr

{{TitleTasks/fr|[[Image:Icon.png|24px]] + Texte}} : (code du titre principal Tâches)
{{PropertyTasks/fr|Texte}} : code pour l'onglet Tâche
  • Options

Propriétés

Template:TitleProperty/fr

{{TitleProperty/fr|Base}} : code pour le titre principal Propriétés
  • DonnéesPropriétés: Propriétés Données
{{PropertyData/fr|Texte}} : code pour le titre Propriété Donnée
  • VuePropriétés: Propriétés Vue
{{PropertyView/fr|Texte}} : code pour le titre Propriété Vue

Data

  • DonnéesPropertyName1: Description of the property

View

  • VuePropertyName2: Description of the property

Exemple

Optionnel

Script

See also: Category:API and FreeCAD Scripting Basics.

L'outil ExampleCommandModel peut être utilisé dans une macro et depuis la console python en utilisant la fonction suivante:

Object = makeExampleCommandModel(Data1, Data2)
  • Crée une CommandModel.
  • Renvoie l'objet nouvellement créé.

Exemple:

import FreeCAD, Base

Model = Base.makeExampleCommandModel(FreeCAD.Data1, FreeCAD.Data2)

Limitations

  • Optional, use bullet list if multiple items

Autre

Optionnel

Selectable block

{{UnfinishedDocu}}
<translate>

{{GuiCommand
|Name=Base ExampleCommandModel
|Icon=<!--filename of icon with extension (e.g. svg, png) if not the same name as command; delete this row if not used-->
|MenuLocation=Menu → Submenu → Command
|Workbenches=[[Workbench Name|Workbench]]
|Shortcut=<!--delete this row if not used-->
|SeeAlso=<!--add links to similar commands; delete this row if not used-->
|Version=0.17
}}

==Description==

While the page is under construction, add the {{UnfinishedDocu}} template at the top of the page.

Insert here a short description of what the command does.

</translate>
[[File:Draft_Line_example.jpg|none|400px]]
<translate>

{{Caption|Optional: add a caption below the image to explain what the tool is doing.}}

Closing and opening translate tags should surround images, and other fixed elements, if they don't need to be translated. The caption should always be translated.

==How to use==

# Press the {{Button|[[File:Std Close.png|16px]] [[GuiCommand model|Command name]]}} button. The button must be a link to this command.
# Detailed steps as needed.
# Set options and press {{Button|OK}}.

==Options==

* List the command options here.

==Properties==

===Data===

* {{PropertyData|PropertyName1}}: Description of the property

===View===

* {{PropertyView|PropertyName2}}: Description of the property

==Example==

Optional

==Scripting==
{{Emphasis|See also:}} [[:Category:API]] and [[FreeCAD Scripting Basics]].

The ExampleCommandModel tool can be used in [[macros]] and from the [[Python]] console by using the following function:
</translate>
{{Code|code=
Object = makeExampleCommandModel(Data1, Data2)
}}
<translate>
* Creates an {{incode|Object}} using {{incode|Data1}} and {{incode|Data2}}.

Example:
</translate>
{{Code|code=
import FreeCAD, Base

Model = Base.makeExampleCommandModel(FreeCAD.Data1, FreeCAD.Data2)
}}
<translate>

==Limitations==

* Optional, use bullet list if multiple items

==Other==

Optional

</translate>