Allplan VisulScript/Python

P.P강좌

Allplan Python API 설정 (2020-0, 2019-10-08버전)

홍사훈     0건     399회

본문

>> Allplan 2020-0 (2019-10-08, v.1) 기준으로 작성되었습니다.

 

설정 

 Allplan PythonPart 스크립트를 시작하는데 필요한 설치방법을 설명합니다.

Allplan

 Allplan version >= 2020-0

Python (optional)

 Allplan 설치시 Python과 함께 설치 되며, Allplan 프로그램이 실치된 폴더Prg\Python 폴더에 설치된됩니다. 별도로 설치하려면, 지원되는 버전을 설치해야 합니다.

Python 3.7.4 64bit
  • 버전 체크 방법
    >>> import sys
    >>> sys.version
    '3.7.4 (tags/v3.7.4:e09359112e, Jun 8 2019, 20:34:20) [MSC v.1916 64bit (AMD64)]

IDE

 권장 : Visual Studio 2017 Community Edition

   :

   :

   :

예제

 Allplan 설치시 Allplan PythonAPI, 사용법을 보여주는 다양한 예제가 제공됩니다. 이 예제는 API에 익숙해 지는데 도움이됩니다.

Project Template

 Python 프로젝트를 불러옵니다.(ETC\PythonPartsScripts\PythonParts.pyproj)

 제공되는 모든 Python 스크립트는 이 프로젝트에 저장되어 있습니다. 해당 PythonPart라이브러리파일(*.pyp)파일은 etc\Examples\PythonParts\에 저장되며 이 경로를 Allplan 라이브러리에 추가할 수 있습니다.

다음 예제사용 할 수 있습니다.

 

  • BasisExamples – Allplan BasisElements library 예제
  • ContentExamples – 복잡한 PythonPart 예제
  • GeometryExamples – Allplan Geometry library 예제
  • InteractorExamples – Allplan IFW_Input library 예제
  • PaletteExamples – Palette 예제
  • ReinforcementExamples – special reinforcement 함수 예제
  • ToolsAndStartExamples – 기타 유용한 예제

 

PythonParts.pyproj 에는 
  • GeneralScripts – Allplan에서 PythonPart를 실행하기 위한 기본 모듈 스크립트
  • StdReinfShapeBuilder – 철근을 생성하는데 도움이 되는 모듈

등록된 댓글이 없습니다.



Copyrightⓡ1996~2025, sahoon.com All Rights Reserved.