프로그램
캐드 분류

다중지시선 색상 변경 문의의건.

컨텐츠 정보

  • 107 조회
  • 2 댓글
  • 0 추천
  • 0 비추천
  • 목록

본문

해당 LISP을 사용하면 다중지시선 TEXT,화살표 색상이 빨간색으로 나오는데 혹시 파랑색으로 바꾸게 할 수 있을까요?

LSIP 고수님들 조언 부탁드립니다. 
어디 부분에서 바꿔야 할지 모르겠네요
(vl-load-com)
(defun makeLayer (newlayername newlayerColor)
(entmake
(list 
(cons 0 "LAYER")
(cons 100 "AcDbSymbolTableRecord")
                                    (cons 100 "AcDbLayerTableRecord")
                                    (cons 2  newlayername) ;layer name
                                    (cons 70 0)
(cons 62 newlayerColor) ;layer color
)
)
)
(defun maketextstyle (newstylename)
(entmake
(list
(cons 0 "style")
(cons 100 "AcDbSymbolTableRecord") 
(cons 100 "AcDbTextStyleTableRecord") 
(cons 2 newstylename) ;style name
(cons 3 "arial.ttf") ;font
;(cons 4 "whgtxt.shx") ;bigfont
(cons 70 0)
(cons 40 0) ;fixed height / 0=non
(cons 41 1) ;width factor
(cons 50 0) ;oblique angle
(cons 71 0) ;2=mirrored in X / 4=mirrored in Y
)
)
)
(defun searchmleaderstyle (mleaderstylename / mleaderstyledict searchresult)
(if
(setq mleaderstyledict (dictsearch (namedobjdict) "acad_mleaderstyle"))
(foreach x mleaderstyledict
(if 
(and
(= (car x) 3)
(eq (strcase (cdr x)) (strcase mleaderstylename))
)
(setq searchresult t)
)
)
)
searchresult
)
(defun makemleaderstyle (newmleadername newmleadertextstyle)
(setq mleaderstyles (vla-item (vla-get-Dictionaries (vla-get-ActiveDocument (vlax-get-acad-object))) "ACAD_MLEADERSTYLE"))
(setq newmleaderstyle (vla-AddObject mleaderstyles newmleadername "AcDbMLeaderStyle"))
(vla-put-TextStyle newmleaderstyle newmleadertextstyle)
(vla-put-TextAngleType newmleaderstyle "1″)
(vla-put-ArrowSize newmleaderstyle "6000″)
(vla-put-DoglegLength newmleaderstyle "6000″)
(vla-put-TextHeight newmleaderstyle "6000″)
(vla-put-TextLeftAttachmentType newmleaderstyle "3″)
(vla-put-TextRightAttachmentType newmleaderstyle "3″)
)
 (defun c:refcheck_knw_test()
(if
(= (tblsearch "style" "xycoordinates") nil)
(maketextstyle "xycoordinates")
(princ)
)
(setq oldlayer (getvar "clayer"))
(if
(= (tblsearch "layer" "xycoordinates") nil)
(progn
(makelayer "xycoordinates" 1)
(setvar "clayer" "xycoordinates")
)
(setvar "clayer" "xycoordinates")
)
(setq oldcmleaderstyle (getvar "cmleaderstyle"))
(if
(= (searchmleaderstyle "xycoordinates") nil)
(progn
(makemleaderstyle "xycoordinates" "xycoordinates")
(setvar "cmleaderstyle" "xycoordinates")
)
(setvar "cmleaderstyle" "xycoordinates")
)
   (command "undo" "begin")
   (setq lup(getvar "luprec"))
   (setvar "luprec" 4)
   (setq zin(getvar "dimzin"))
   (setvar "dimzin" 0)
   (setvar "cmdecho" 0)
   (setq chip (getpoint "Enter chip size W/ SL (um) n"))
   (setq pointx (getpoint "pick on good die x coordinaten"))
   (setq pointy (getpoint "pick on good die y coordinaten"))
   (setq num (getint "Enter the number of ref diesn"))
   (princ "[Coordinates will show up once at a time]n")
   
   (repeat num
   (setq ref1 (getpoint "Pick on the left corner of ref dien"))
   (setq ref1x (/ (- (car pointx) (car ref1)) (car chip)))
   (setq ref1y (/ (- (cadr pointy) (cadr ref1)) (cadr chip)))
   (princ "n–n")
   (princ (abs ref1x))
   (princ "n")
   (princ (abs ref1y))
   (princ "n–n")   
   (setq xp (strcat "X:" (rtos (abs ref1x) 2 0)))
   (setq yp (strcat "Y:" (rtos (abs ref1y) 2 0)))
   (setq allcoordinate (strcat xp " " yp))
   (command "mleader" ref1 pause allcoordinate )
   )
    (setvar "clayer" oldlayer)
    (setvar "cmleaderstyle" oldcmleaderstyle)
    (princ)
 )

관련자료

댓글 2 / 1 페이지

penpen07님의 댓글

이 리습은 xycoordinates라는 이름의 도면층을 만들고, 그 도면층으로 지시선을 작성하기 때문에
전체 6,633 / 1 페이지
번호
제목
이름

최근글


새댓글


알림 0