Adams 2023.1 Python Interface User’s Guide

Adams를 Adams View command language 대신 Python 언어로 제어할 수 있게 해 주는 Python API(Application Programming Interface)의 사용 안내서다 [Adams_2023.1_Python_Interface_User_Guide.pdf p.5].

개요

Adams Python Interface는 Python으로 Adams 모델링 객체를 생성·수정할 수 있도록 하는 Python API이다 [Adams_2023.1_Python_Interface_User_Guide.pdf p.5]. 이 인터페이스는 “object oriented” 방식으로 개발되어, Adams의 각 entity가 properties와 methods를 가진 Python class에 매핑된다 [Adams_2023.1_Python_Interface_User_Guide.pdf p.5]. Python은 범용 객체지향 인터프리터 스크립팅 언어이며, 이 매뉴얼은 Adams 자동화 스크립트를 작성하려는 사용자를 대상으로 한다 [Adams_2023.1_Python_Interface_User_Guide.pdf p.5].

다루는 범위

  • Python 언어 기초: 데이터 타입(Integer, Float), 시퀀스(List, Tuple, String), Dictionary [Adams_2023.1_Python_Interface_User_Guide.pdf p.5][Adams_2023.1_Python_Interface_User_Guide.pdf p.6][Adams_2023.1_Python_Interface_User_Guide.pdf p.8]
  • Sequence 공통 연산: Concatenation, Slicing [Adams_2023.1_Python_Interface_User_Guide.pdf p.7]
  • 제어 구조: Conditional Statements, Loops, Functions [Adams_2023.1_Python_Interface_User_Guide.pdf p.8][Adams_2023.1_Python_Interface_User_Guide.pdf p.9]
  • Adams에서 Python 스크립트를 실행하는 3가지 방법: File Import Dialog, Command Window, Command line [Adams_2023.1_Python_Interface_User_Guide.pdf p.10][Adams_2023.1_Python_Interface_User_Guide.pdf p.11]
  • 시작 시 Python 스크립트 실행(PYTHONSTARTUP 환경변수, aview.cmd) [Adams_2023.1_Python_Interface_User_Guide.pdf p.11]
  • Adams session 객체와 객체 생성·조회(Object creation/lookup) [Adams_2023.1_Python_Interface_User_Guide.pdf p.11][Adams_2023.1_Python_Interface_User_Guide.pdf p.12]
  • Object Properties 설정·조회 및 Array property 정의 [Adams_2023.1_Python_Interface_User_Guide.pdf p.13]
  • Expression을 통한 파라미터화(Adams.expression, Adams.eval) [Adams_2023.1_Python_Interface_User_Guide.pdf p.14]
  • Extended Names(특수문자·Unicode 이름) 사용 [Adams_2023.1_Python_Interface_User_Guide.pdf p.15]

문서 구성

  • Introduction / Overview of the interface (p.5)
  • Introduction to Python — Python data types, Sequences, Dictionary, Control structures, Functions (p.5–9)
  • Using Python scripts in Adams — File Import Dialog, Command Window, Command line, startup (p.10–11)
  • The Adams session object (p.11)
  • Creation and lookup of objects — Object creation, Object lookup (p.12)
  • Object Properties, Defining Array property (p.13)
  • Using expressions (p.14)
  • Using Extended Names, Examples, Adams python classes reference (p.15)

이 매뉴얼로 답할 수 있는 질문

  • Adams에서 Python 스크립트를 어떻게 실행하나? (Command Window/Command line/File Import) [Adams_2023.1_Python_Interface_User_Guide.pdf p.10][Adams_2023.1_Python_Interface_User_Guide.pdf p.11]
  • Python으로 model과 part, marker를 어떻게 생성하나? [Adams_2023.1_Python_Interface_User_Guide.pdf p.12]
  • 이름으로 객체를 어떻게 조회하나? (manager의 Dictionary 동작) [Adams_2023.1_Python_Interface_User_Guide.pdf p.12]
  • 객체 property를 어떻게 읽고 설정하나? [Adams_2023.1_Python_Interface_User_Guide.pdf p.13]
  • Design variable과 expression으로 어떻게 파라미터화하나? [Adams_2023.1_Python_Interface_User_Guide.pdf p.14]
  • 이름에 특수문자가 있을 때 어떻게 처리하나? [Adams_2023.1_Python_Interface_User_Guide.pdf p.15]
  • 예제 스크립트는 어디에 있나? (<topdir>\adamspy\examples\) [Adams_2023.1_Python_Interface_User_Guide.pdf p.15]

핵심 항목

관련 문서