Adams Command Language
Adams View 인터페이스의 기반이 되는 텍스트 기반 명령 언어(command language)로, 모델 객체의 생성·수정·조작을 명령어로 수행한다 [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.5].
정의·용도
Adams Command Language(흔히 cmd language로 지칭)는 Adams View 인터페이스의 바탕에 깔린 명령 언어다. command window는 이 명령을 입력하는 텍스트 기반 수단을 제공하며, 사용자가 인터페이스 이면의 Adams View command language를 이해하고 있다고 가정한다 [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.5]. command window는 단일 또는 다중 명령을 받아들여 Adams View 환경과 효율적으로 상호작용할 수 있게 한다 [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.5].
현재 Adams의 command window는 cmd language와 Python을 모두 지원한다 [Adams_2023.1_Python_Interface_User_Guide.pdf p.10]. Python interface는 Adams View command language를 대신하는 대안으로 Python 언어를 통해 Adams와 상호작용하게 해준다 [Adams_2023.1_Python_Interface_User_Guide.pdf p.5].
형식 / 필드 / 구문
명령은 일반적으로 “object verb” 형태로 객체와 동작을 조합해 표현된다. 예를 들어 variable create, move object, group objects add, defaults hardcopy 등이 있다 [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.2082][Adams_2024.1_Adams_View_Command_User_Guide.pdf p.1388][Adams_2024.1_Adams_View_Command_User_Guide.pdf p.926][Adams_2024.1_Adams_View_Command_User_Guide.pdf p.382].
각 명령은 이름이 붙은 파라미터를 인수로 받는다. 예를 들어 move object 명령은 csentity_name(기존 entity)과 incrementally(boolean) 같은 파라미터를 사용한다 [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.1388]. defaults hardcopy 명령은 black_and_white_plot, language, image_height, image_width, include_toolbars 등의 파라미터를 가진다 [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.382].
cmd 스크립트 안에서 cmd 명령과 adamspy(Adams Python Interface) 명령을 혼용할 수 있다 [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.1195]. language switch_to python 명령은 cmd 스크립트의 이후 명령이 adamspy 명령임을 표시하며, adamspy에서 다시 cmd로 전환하려면 adamspy의 Adams.switchToCmd() 메서드를 사용한다 [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.1195].
사용 예
language switch_to python
language switch_to python 명령으로 cmd 스크립트 중간에서 Python(adamspy)으로 전환할 수 있다 [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.1196].
관련 항목
- View — command language가 기반이 되는 인터페이스
- Adams Python Interface — cmd language의 대안인 Python API(adamspy)
- Adams View Function Builder — 모델 값 계산·파라미터화를 위한 Expression Language Reference [Adams_2024.1_Adams_View_Function_Builder_User_Guide.pdf p.26]
- Solver
출처
- [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.5] — command window와 command language 개요
- [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.1195] — cmd/adamspy 혼용,
language switch_to python - [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.1196] —
language switch_to python예 - [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.382] —
defaults hardcopy파라미터 - [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.1388] —
move object형식 - [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.2082] —
variable create - [Adams_2024.1_Adams_View_Command_User_Guide.pdf p.926] —
group objects add - [Adams_2023.1_Python_Interface_User_Guide.pdf p.10] — command window의 cmd/Python 지원
- [Adams_2023.1_Python_Interface_User_Guide.pdf p.5] — Python interface 소개
- [Adams_2024.1_Adams_View_Function_Builder_User_Guide.pdf p.26] — Expression Language Reference