본문 바로가기

Study(매일매일한걸음씩)35

for 문 사용하기 (foreach) - 반복 작업 한번에 여러줄을 한번에 그리기 list를 만들어서 지정된 list수량 만큼 선을 그린다. (defun c:test () (setq p1 (list 0 0)) (setq p2 (list 2000 2000)) (command "line" p1 p2 "") (setq slist (list 1000 2000 3000 4000 5000 6000 7000)) (foreach temp slist (setq p1 (list 1000 0)) (setq p2 (list 2000 temp)) (command "line" p1 p2 "") ) ) 2. 실행해보기(vsc에서 다시 시작 누르고 autocad 에서 "test" 입력) - 잘됨 3. commit하기(안해도됨) - 저의 기록을 위해 git add *.lsp git commi.. 2022. 12. 9.
Autocad lisp With github #1 git 시작하기 git 설치해야 한다. https://git-scm.com/ vsc에서 터미널 창을 열어서 git init 입력한다. Git git-scm.com git init git commit 하기(현재 위치 저장) add *.lsp 는 확장자 lsp 파일을 commit 준비한다.(staging이런말 있지만 그냥 편하게 말한것) commit은 현재 상태를 저장, -m은 메시지 있다. "first"는 메시지 임 git add *.lsp git commit -m "first" 프로그램 수정 0,0 -> 1000,2000 => 0,0->2000,2000으로 선 그리게 변경 (defun c:test () (setq p1 (list 0 0)) (setq p2 (list 2000 2000)) (command .. 2022. 12. 8.
Autocad lisp(리습) with VSC(visual code) VSC 설치 https://code.visualstudio.com/ Visual Studio Code - Code Editing. Redefined Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. code.visualstudio.com autocad 있는지 확인 autocad 2021 version 부터 지원을 한다. 2007 version으로 아무리 해도 안됨 확장 .. 2022. 12. 8.