Std SendToPythonConsole/ko: Difference between revisions

From FreeCAD Documentation
(Created page with "'''표준 파이썬 콘솔로 보내기(Std SendToPythonConsole)''' 명령은 파이썬 콘솔에 선택한 개체를 참조하는 변수를 생성합니...")
No edit summary
Line 21: Line 21:
==설명==
==설명==


'''표준 파이썬 콘솔로 보내기(Std SendToPythonConsole)''' 명령은 [[Python_console/ko|파이썬 콘솔]] 선택한 개체를 참조하는 변수를 생성합니다. 만약 개체의 하위 셰이프를 선택했다면 추가 변수 2개가 생성됩니다. 하나는 개체의 셰이프를 참조하고 다른 하나는 하위 셰이프 자체를 참조합니다. 관련 변수와 코드는 파이썬 코드를 작성하는데 사용할 수 있습니다.
'''표준 파이썬 콘솔로 보내기(Std SendToPythonConsole)''' 명령은 선택한 개체를 참조하는 변수를 [[Python_console/ko|파이썬 콘솔]] 안에 생성합니다. 만약 개체의 하위 셰이프를 선택했다면 변수 2개가 생성됩니다. 하나는 개체의 셰이프를 참조하고 다른 하나는 하위 셰이프 자체를 참조합니다. 관련 변수와 코드는 파이썬 코드를 작성하는데 사용할 수 있습니다.


>>> ### Begin command Std_SendToPythonConsole
>>> ### Begin command Std_SendToPythonConsole

Revision as of 01:11, 31 December 2020

표준 파이썬 콘솔로 보내기

메뉴 위치
편집 → 파이썬 콘솔로 보내기
작업대
모두
기본 단축키
Ctrl+Shift+P
도입 버전
0.19
참조
없음

설명

표준 파이썬 콘솔로 보내기(Std SendToPythonConsole) 명령은 선택한 개체를 참조하는 변수를 파이썬 콘솔 안에 생성합니다. 만약 개체의 하위 셰이프를 선택했다면 변수 2개가 더 생성됩니다. 하나는 개체의 셰이프를 참조하고 다른 하나는 하위 셰이프 자체를 참조합니다. 관련 변수와 코드는 파이썬 코드를 작성하는데 사용할 수 있습니다.

>>> ### 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

Example output: an edge of a Part Box was selected

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.