Std SendToPythonConsole/de: Difference between revisions

From FreeCAD Documentation
(Created page with "Der '''Std SendeAnPythonKonsole''' Befehl erstellt eine Variable in der Python Konsole, die auf ein ausgewähltes Objekt verweist. Wenn eine Unterform de...")
(Created page with "{{Caption|Beispielausgabe: eine Kante eines Part Quaders wurde ausgewählt}}")
Line 29: Line 29:
>>> ### End command Std_SendToPythonConsole
>>> ### End command Std_SendToPythonConsole
}}
}}
{{Caption|Example output: an edge of a [[Part_Box|Part Box]] was selected}}
{{Caption|Beispielausgabe: eine Kante eines [[Part_Box/de|Part Quaders]] wurde ausgewählt}}


==Usage==
==Usage==

Revision as of 11:34, 7 June 2020

Std SendeAnPythonKonsole

Menüeintrag
Bearbeiten → Sende an Python Konsole
Arbeitsbereich
Alle
Standardtastenkürzel
Ctrl+Shift+P
Eingeführt in Version
0.19
Siehe auch
Keiner

Beschreibung

Der Std SendeAnPythonKonsole Befehl erstellt eine Variable in der Python Konsole, die auf ein ausgewähltes Objekt verweist. Wenn eine Unterform des Objekts ausgewählt wird, werden zwei zusätzliche Variablen erstellt, von denen eine auf die Form des Objekts und die andere auf die Unterform selbst verweist. Die Variablen und der damit verbundene Code können zur Entwicklung von Python Code verwendet werden.

>>> ### Begin command Std_SendToPythonConsole
>>> obj = App.getDocument("Unnamed").getObject("Box")
>>> shp = App.getDocument("Unnamed").getObject("Box").Shape
>>> elt = App.getDocument("Unnamed").getObject("Box").Shape.Edge8
>>> ### End command Std_SendToPythonConsole

Beispielausgabe: eine Kante eines Part Quaders wurde ausgewählt

Usage

  1. Select a single object.
  2. There are several ways to invoke the command:
    • Select the Edit → Send to Python Console option from the menu.
    • Select the Send to Python Console option from the Tree view context menu or 3D view context menu.
    • Use the keyboard shortcut: Ctrl+Shift+P.