Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey folks, I am writing a LISP routine to allow me to create a revision cloud and insert a revision triangle into a drawing, along with the ability to change the arc length of the revision cloud prior to creation. I have managed to make the revision cloud part work correctly, but when it gets to the revision triangle, I keep getting an invalid block name error. I know the block name is correct, as is the path to that block, but I keep hitting that roadblock.
Can anyone assist and tell me what I am doing wrong here?
(defun C:create_layer ()
(command "._Layer" "_Make" "DAI-REVISION" "_Color" "4"
"DAI-REVISION" "LT" "Continuous" "DAI-REVISION" "")
)
(c:create_layer)
(defun C:RVCLD (/ inp )
(initget "Pline Rectangle") ; ask for input
(setq Inp (getkword "\nWhat type of cloud would you like to draw? [Pline/Rectangle] <Pline>: "))
(or Inp (setq Inp "Pline"))
(cond
((= inp "Pline")
(defun C:RVCP ()
(command "_.PLINE")
(while (= (getvar "CMDNAMES") "PLINE")
(command pause)
)
(command "pedit" "l" "c" "")
(command "revcloud" "a" pause "" "" "l" "no"))
(C:RVCP)
)
((= inp "Rectangle")
(Defun C:RVCR ( / opt p1 p2 iph )
(setq p1(getpoint "\nPick first corner of window: "))
(setq p2(getcorner p1 "\nOpposite corner: "))
(setvar "plinewid" 0)
(command "rectang" p1 p2)
(command "REVCLOUD" "a" pause "" "O" (entlast) "N"))
(C:RVCR)
))
(defun C:INSTRI ()
(command "-insert" "M:\19. ACADE\Support Files\Script Files and LISP Routines\RVCLD\01_RevTri.dwg" "s" pause pause "")
(command "attedit" (entlast)))
(c:INSTRI))
Solved! Go to Solution.