GuiCommand model/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 36: Line 36:
Remember to use [[Template:Version]], [[Template:VersionMinus]], [[Template:VersionPlus]] and [[Template:Obsolete]] when applicable.
Remember to use [[Template:Version]], [[Template:VersionMinus]], [[Template:VersionPlus]] and [[Template:Obsolete]] when applicable.


For example: The feature to utilize {{incode|App::Link}} {{Version|0.19}} allows linking between sub-assemblies etc...
For example: The {{incode|App::Link}} feature ({{Version|0.19}}) allows linking between sub-assemblies etc...


Add an image if possible, and please follow the guidelines in [[WikiPages#Graphics]]. Example taken from [[Part_Sweep|Part Sweep]]:
Add an image if possible, and please follow the guidelines in [[WikiPages#Graphics|WikiPages]]. Example taken from [[Part_Sweep|Part Sweep]]:
[[Image:Part_Sweep_simple.png|none]]
[[Image:Part_Sweep_simple.png|none]]
{{Caption|Optional: add a caption below the image to explain what the tool does}}
{{Caption|Optional: add a caption below the image to explain what the tool does}}
Line 48: Line 48:
</div>
</div>


# There are several ways to invoke the command:
<div class="mw-translate-fuzzy">
#* Press the {{Button|[[Image:Std_Open.svg|16px]] [[GuiCommand_model|Base ExampleCommandModel]]}} button. (''Editor note:'' This uses the [[Template:Button]] template, it is necessary to link to the command as shown in this example)
# Apăsați butonul {{KEY|[[File:Std Close.png|24px]] '''Command name'''}}.
#* Select the {{MenuCommand|Menu → Submenu → [[Image:Std_Open.svg|16px]] Menu text for the command}} option from the menu. (''Editor note:'' This uses the [[Template:MenuCommand]] template)
# Detalierea pașilor este necesară.
#* Select the {{MenuCommand|Submenu → [[Image:Std_Open.svg|16px]] Menu text for the command}} option from the [[Tree_view|Tree view]] context menu or [[3D_view|3D view]] context menu. (''Editor note:'' This also uses the [[Template:MenuCommand]] template, not all commands can be accessed from a context menu)
# Definiți opțiunile și apăsați {{KEY|OK}}.
#* Use the keyboard shortcut {{KEY|F}} then {{KEY|C}} or {{KEY|Ctrl}}+{{KEY|Z}}. (''Editor note:'' This uses the [[Template:KEY]] template, not all commands have a keyboard shortcut)
</div>
# Detailed steps as needed. Some steps may need {{KEY|Keyboard}} presses while others may require using the mouse to click on a {{Button|Button}}.
# Set options and press {{Button|OK}}.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 63: Line 65:
</div>
</div>


* Optional. List the command options here. Check out two examples, {{Button|[[Image:Draft_Line.svg|16px]] [[Draft_Line|Draft Line]]}} and {{Button|[[Image:PartDesign_Pad.svg|16px]] [[PartDesign_Pad|PartDesign Pad]]}}.
* Optional. List the command options here. See for example [[Draft_Wire|Draft Wire]].


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 85: Line 87:
<nowiki>{{PropertyView|Properties}}</nowiki> (Code of title View)
<nowiki>{{PropertyView|Properties}}</nowiki> (Code of title View)
</div>
</div>

See also: [[Property_editor|Property editor]].

An object is usually derived from a base object. You should not list the properties that are inherited from that base object. See for example [[Draft_Wire#Properties|Draft Wire]].


=== Data ===
=== Data ===
Line 90: Line 96:
{{TitleProperty|Property Group}}
{{TitleProperty|Property Group}}


* {{PropertyData|Property Name 1|PropertyType}}: Description of the property. (''Editor note:'' to find the {{Value|PropertyType}} select {{MenuCommand|Show all}} in the context menu of the [[Property_editor|Property editor]]. The tooltip of each property will then include this information. But the {{Value|PropertyType}} can also be found in the source code.)
* {{PropertyData|Property Name 1}}: Description of the property


=== View ===
=== View ===
Line 96: Line 102:
{{TitleProperty|Property Group}}
{{TitleProperty|Property Group}}


* {{PropertyView|Property Name 2}}: Description of the property
* {{PropertyView|Property Name 2|PropertyType}}: Description of the property.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 102: Line 108:
</div>
</div>


See also: [[:Category:API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 166: Line 172:
Remember to use [[Template:Version]], [[Template:VersionMinus]], [[Template:VersionPlus]] and [[Template:Obsolete]] when applicable.
Remember to use [[Template:Version]], [[Template:VersionMinus]], [[Template:VersionPlus]] and [[Template:Obsolete]] when applicable.


For example: The feature to utilize {{incode|App::Link}} {{Version|0.19}} allows linking between sub-assemblies etc...
For example: The {{incode|App::Link}} feature ({{Version|0.19}}) allows linking between sub-assemblies etc...


Add an image if possible, and please follow the guidelines in [[WikiPages#Graphics]]. Example taken from [[Part_Sweep|Part Sweep]]:
Add an image if possible, and please follow the guidelines in [[WikiPages#Graphics|WikiPages]]. Example taken from [[Part_Sweep|Part Sweep]]:
&lt;/translate&gt;
&lt;/translate&gt;
[[Image:Part_Sweep_simple.png|none]]
[[Image:Part_Sweep_simple.png|none]]
Line 178: Line 184:
== Usage ==
== Usage ==


# There are several ways to invoke the command:
# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Std_Open.svg|16px]] [[GuiCommand_model|Base ExampleCommandModel]]}} button. (''Editor note:'' This uses the [[Template:Button]] template, it is necessary to link to the command as shown in this example)
#* Press the {{Button|[[Image:Std_Open.svg|16px]] [[GuiCommand_model|Base ExampleCommandModel]]}} button. (''Editor note:'' This uses the [[Template:Button]] template, it is necessary to link to the command as shown in this example)
#* Select the {{MenuCommand|Menu → Submenu → [[Image:Std_Open.svg|16px]] Menu text for the command}} option from the menu. (''Editor note:'' This uses the [[Template:MenuCommand]] template)
#* Select the {{MenuCommand|Menu → Submenu → [[Image:Std_Open.svg|16px]] Menu text for the command}} option from the menu. (''Editor note:'' This uses the [[Template:MenuCommand]] template)
Line 184: Line 190:
#* Use the keyboard shortcut {{KEY|F}} then {{KEY|C}} or {{KEY|Ctrl}}+{{KEY|Z}}. (''Editor note:'' This uses the [[Template:KEY]] template, not all commands have a keyboard shortcut)
#* Use the keyboard shortcut {{KEY|F}} then {{KEY|C}} or {{KEY|Ctrl}}+{{KEY|Z}}. (''Editor note:'' This uses the [[Template:KEY]] template, not all commands have a keyboard shortcut)
# Detailed steps as needed. Some steps may need {{KEY|Keyboard}} presses while others may require using the mouse to click on a {{Button|Button}}.
# Detailed steps as needed. Some steps may need {{KEY|Keyboard}} presses while others may require using the mouse to click on a {{Button|Button}}.
# Other commands may need to be referenced/used. Consider linking to their wiki pages along with their icons {{Button|[[Image:Draft_Line.svg|16px]] [[Draft_Line|Draft Line]]}} or {{Button|[[Image:PartDesign_Pad.svg|16px]] [[PartDesign_Pad|PartDesign Pad]]}}.
# Set options and press {{Button|OK}}.
# Set options and press {{Button|OK}}.


== Options ==
== Options ==


* Optional. List the command options here. Check out two examples, {{Button|[[Image:Draft_Line.svg|16px]] [[Draft_Line|Draft Line]]}} and {{Button|[[Image:PartDesign_Pad.svg|16px]] [[PartDesign_Pad|PartDesign Pad]]}}.
* Optional. List the command options here. See for example [[Draft_Wire|Draft Wire]].


== Example ==
== Example ==
Line 200: Line 205:


== Properties ==
== Properties ==

See also: [[Property_editor|Property editor]].

An object is usually derived from a base object. You should not list the properties that are inherited from that base object. See for example [[Draft_Wire#Properties|Draft Wire]].


=== Data ===
=== Data ===
Line 205: Line 214:
{{TitleProperty|Property Group}}
{{TitleProperty|Property Group}}


* {{PropertyData|Property Name 1|PropertyType}}: Description of the property. (''Editor note:'' to find the {{Value|PropertyType}} select {{MenuCommand|Show all}} in the context menu of the [[Property_editor|Property editor]]. The tooltip of each property will then include this information. But the {{Value|PropertyType}} can also be found in the source code.)
* {{PropertyData|Property Name 1}}: Description of the property


=== View ===
=== View ===
Line 211: Line 220:
{{TitleProperty|Property Group}}
{{TitleProperty|Property Group}}


* {{PropertyView|Property Name 2}}: Description of the property
* {{PropertyView|Property Name 2|PropertyType}}: Description of the property.


== Scripting ==
== Scripting ==


See also: [[:Category:API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


The ExampleCommandModel tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:
The ExampleCommandModel tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:
Line 252: Line 261:


&lt;/translate&gt;
&lt;/translate&gt;
{{Workbench Tools navi{{#translation:}}}} <!--use the Tools navi belonging to the workbench -->
{{Workbench_Tools_navi{{#translation:}}}} <!--use the Tools navi belonging to the workbench -->
{{Userdocnavi{{#translation:}}}}</nowiki>
{{Userdocnavi{{#translation:}}}}</nowiki>


Line 265: Line 274:
}}
}}


{{Workbench Tools navi{{#translation:}}}} <!--use the Tools navi belonging to the workbench -->
{{Workbench_Tools_navi{{#translation:}}}} <!--use the Tools navi belonging to the workbench -->
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
[[Category:Wiki:Example]]
[[Category:Wiki:Example]]

Latest revision as of 20:52, 6 March 2022

This page shows a model of a recommended GuiCommand page. Under the Selectable block section below you will find the same content easily selectable for pasting in a new page.

Base ExampleCommandModel

poziția meniului
Sample → Command
Ateliere
scurtătură
nici unul
Prezentat în versiune
-
A se vedea, de asemenea,
nici unul

Descriere

While the page is under construction, add the Template:UnfinishedDocu template at the top of the page by simply typing: {{UnfinishedDocu}}

Insert here a short description of what the command does.

Remember to use Template:Version, Template:VersionMinus, Template:VersionPlus and Template:Obsolete when applicable.

For example: The App::Link feature (introduced in version 0.19) allows linking between sub-assemblies etc...

Add an image if possible, and please follow the guidelines in WikiPages. Example taken from Part Sweep:

Optional: add a caption below the image to explain what the tool does

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.

Cum se folosește

  1. There are several ways to invoke the command:
    • Press the Base ExampleCommandModel button. (Editor note: This uses the Template:Button template, it is necessary to link to the command as shown in this example)
    • Select the Menu → Submenu → Menu text for the command option from the menu. (Editor note: This uses the Template:MenuCommand template)
    • Select the Submenu → Menu text for the command option from the Tree view context menu or 3D view context menu. (Editor note: This also uses the Template:MenuCommand template, not all commands can be accessed from a context menu)
    • Use the keyboard shortcut F then C or Ctrl+Z. (Editor note: This uses the Template:KEY template, not all commands have a keyboard shortcut)
  2. Detailed steps as needed. Some steps may need Keyboard presses while others may require using the mouse to click on a Button.
  3. Set options and press OK.

Opțiuni

Create Geometry

{{TitleTasks|[[Image:Icon.png|24]] + Text}} (Code for the main title Tasks)
  • TASK Tasks : Tasks
{{PropertyTasks|Tasks}} (Code of title Tasks)
  • Options
  • Optional. List the command options here. See for example Draft Wire.

Exemplu

Opțional

Optional.

Notes

  • Optional. Use a bullet list if there are multiple items. You can also mention limitations here.

Proprietăți

Base

{{TitleProperty|Base}}  (Code for the main title Properties)
  • DateProperties: Properties
{{PropertyData|Properties}} (Code of title Data)
  • VizualizareProperties: Properties
{{PropertyView|Properties}} (Code of title View)

See also: Property editor.

An object is usually derived from a base object. You should not list the properties that are inherited from that base object. See for example Draft Wire.

Data

Property Group

  • DateProperty Name 1 (PropertyType): Description of the property. (Editor note: to find the PropertyType select Show all in the context menu of the Property editor. The tooltip of each property will then include this information. But the PropertyType can also be found in the source code.)

View

Property Group

  • VizualizareProperty Name 2 (PropertyType): Description of the property.

Scrip-Programare

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

Instrumentul ExampleCommandModel poate fi utilizat în macros și din consola python utilizând următoarea funcție:

Object = makeExampleCommandModel(Data1, Data2)
  • Creează un CommandModel folosind Data.
  • Returnează obiectul nou creat.

Exempluː

import FreeCAD, Base

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

Other

Optional

Optional.

Selectable block

<languages/>
{{UnfinishedDocu}}
<translate>

{{Docnav
|[[Base_PreviousCommand|PreviousCommand]]
|[[Base_NextCommand|NextCommand]]
|[[Workbench_Name|Workbench]]
|IconL= <!--filename of icon with extension (e.g. svg, png)-->
|IconR= <!--filename of icon with extension (e.g. svg, png)-->
|IconC= <!--filename of icon with extension (e.g. svg, png)-->
}}

{{GuiCommand
|Name=Base ExampleCommandModel
|Icon= <!--filename of icon with extension (e.g. svg, png) if not the same name as command-->
|MenuLocation=Menu → Submenu → Menu text for the command
|Workbenches=[[Workbench_Name|Workbench]]
|Shortcut={{KEY|F}} {{KEY|C}}
|Version=0.19
|SeeAlso= <!--add links to similar commands and related pages-->
}}

== Description ==

While the page is under construction, add the [[Template:UnfinishedDocu]] template at the top of the page by simply typing: '''{{UnfinishedDocu}}'''

In this first paragraph give a short description of what the command does. The description can refer to other workbenches such as the [[Image:Workbench_Sketcher.svg|24px]] [[Sketcher_Workbench|Sketcher Workbench]]. (''Editor note:'' The image is 24px, not 16px)

Remember to use [[Template:Version]], [[Template:VersionMinus]], [[Template:VersionPlus]] and [[Template:Obsolete]] when applicable.

For example: The {{incode|App::Link}} feature ({{Version|0.19}}) allows linking between sub-assemblies etc...

Add an image if possible, and please follow the guidelines in [[WikiPages#Graphics|WikiPages]]. Example taken from [[Part_Sweep|Part Sweep]]:
</translate>
[[Image:Part_Sweep_simple.png|none]]
<translate>
{{Caption|Optional: add a caption below the image to explain what the tool does}}

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.

== Usage ==

# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Std_Open.svg|16px]] [[GuiCommand_model|Base ExampleCommandModel]]}} button. (''Editor note:'' This uses the [[Template:Button]] template, it is necessary to link to the command as shown in this example)
#* Select the {{MenuCommand|Menu → Submenu → [[Image:Std_Open.svg|16px]] Menu text for the command}} option from the menu. (''Editor note:'' This uses the [[Template:MenuCommand]] template)
#* Select the {{MenuCommand|Submenu → [[Image:Std_Open.svg|16px]] Menu text for the command}} option from the [[Tree_view|Tree view]] context menu or [[3D_view|3D view]] context menu. (''Editor note:'' This also uses the [[Template:MenuCommand]] template, not all commands can be accessed from a context menu)
#* Use the keyboard shortcut {{KEY|F}} then {{KEY|C}} or {{KEY|Ctrl}}+{{KEY|Z}}. (''Editor note:'' This uses the [[Template:KEY]] template, not all commands have a keyboard shortcut)
# Detailed steps as needed. Some steps may need {{KEY|Keyboard}} presses while others may require using the mouse to click on a {{Button|Button}}.
# Set options and press {{Button|OK}}.

== Options ==

* Optional. List the command options here. See for example [[Draft_Wire|Draft Wire]].

== Example ==

Optional.

== Notes ==

* Optional. Use a bullet list if there are multiple items. You can also mention limitations here.

== Properties ==

See also: [[Property_editor|Property editor]].

An object is usually derived from a base object. You should not list the properties that are inherited from that base object. See for example [[Draft_Wire#Properties|Draft Wire]].

=== Data ===

{{TitleProperty|Property Group}}

* {{PropertyData|Property Name 1|PropertyType}}: Description of the property. (''Editor note:'' to find the {{Value|PropertyType}} select {{MenuCommand|Show all}} in the context menu of the [[Property_editor|Property editor]]. The tooltip of each property will then include this information. But the {{Value|PropertyType}} can also be found in the source code.)

=== View ===

{{TitleProperty|Property Group}}

* {{PropertyView|Property Name 2|PropertyType}}: Description of the property.

== Scripting ==

See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

The ExampleCommandModel tool can be used in [[Macros|macros]] and from the [[Python|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>

== Other ==

Optional.


{{Docnav
|[[Base_PreviousCommand|PreviousCommand]]
|[[Base_NextCommand|NextCommand]]
|[[Workbench_Name|Workbench]]
|IconL= <!--filename of icon with extension (e.g. svg, png)-->
|IconR= <!--filename of icon with extension (e.g. svg, png)-->
|IconC= <!--filename of icon with extension (e.g. svg, png)-->
}}

</translate>
{{Workbench_Tools_navi{{#translation:}}}} <!--use the Tools navi belonging to the workbench -->
{{Userdocnavi{{#translation:}}}}


Template:Workbench Tools navi/ro