Std SendToPythonConsole/de: Difference between revisions

From FreeCAD Documentation
(Created page with "{{Caption|Beispielausgabe: eine Kante eines Part Quaders wurde ausgewählt}}")
(Created page with "==Verwendung==")
Line 31: Line 31:
{{Caption|Beispielausgabe: eine Kante eines [[Part_Box/de|Part Quaders]] wurde ausgewählt}}
{{Caption|Beispielausgabe: eine Kante eines [[Part_Box/de|Part Quaders]] wurde ausgewählt}}


==Usage==
==Verwendung==


# Select a single object.
# Select a single object.

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

Verwendung

  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.