Cant get this to work in 2004

Brett Harbourne

Usenet Archive
Joined
Aug 10, 2003
Messages
3
Reaction score
0
I have this routine which sort of adds to the revcloud command by inserting a triangle with the current revision number. I cant get it to work in 2004 and was wondering if someone can please take a look at it. Here it is ---------->

(defun C:CD
(setq dims (getvar "dimscale"))
(setvar "dimscale" 15)
(c:revcloud)
(COMMAND "INSERT" "K:/TVS
Database/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "") (SETQ P1 (getvar "LASTPOINT")) (COMMAND "DTEXT" "S" "TVS" P1 "2.5" "" pause) (setvar "dimscale" dims) (princ)
)

Thanks
Brett
 
Brett said:
I have this routine which sort of adds to the revcloud command by inserting a triangle with the current revision number. I cant get it to work in 2004 and was wondering if someone can please take a look at it. Here it is ---------->

(defun C:CD
(setq dims (getvar "dimscale"))
(setvar "dimscale" 15)
(c:revcloud)
(COMMAND "INSERT" "K:/TVS
Database/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "") (SETQ P1 (getvar "LASTPOINT")) (COMMAND "DTEXT" "S" "TVS" P1 "2.5" "" pause) (setvar "dimscale" dims) (princ)
)

Thanks
Brett

I am not a lisp programmer, but take a look at your file and see if you don't have one too many quotes immediately in front of the K:/TVS (i.e., "K:/TVS should be K:/TVS?)
 
Walt,
I don't think it's one too many, looks like he left off the one at the end. (command "insert" "K:/TVS" ) Cut & paste in here may of caused that. BTW I don't have R2004 here(home) to test this on.

Murph

">
 
As I said, I am not a lisp programmer but I "fiddled" with it and it works - up to a point: I don't have revcloud (I use something else) and I don't have your triangle. See below for correction (I think):

(defun C:CD
(setq dims (getvar "dimscale"))
(setvar "dimscale" 15)
(c:revcloud)
(COMMAND "INSERT" "K:/TVS"
"Database/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "") (SETQ P1 (getvar "LASTPOINT")) (COMMAND "DTEXT" "S" "TVS" P1 "2.5" "" pause) (setvar "dimscale" dims) (princ)
)
 
I would assume that "K:/TVSDatabase/2-Drafting/F-Symbols/TRNGL.DWG" was his block name. I can't imagine how your line :

(COMMAND "INSERT" "K:/TVS"
"Database/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "")

doesnt' error with something like
Point or option keyword required.
Specify insertion point or [Scale/X/Y/Z/Rotate/PScale/PX/PY/PZ/PRotate]:
 
Mark said:
I would assume that "K:/TVSDatabase/2-Drafting/F-Symbols/TRNGL.DWG" was his block name. I can't imagine how your line :

(COMMAND "INSERT" "K:/TVS"
"Database/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "")

doesnt' error with something like
Point or option keyword required.
Specify insertion point or [Scale/X/Y/Z/Rotate/PScale/PX/PY/PZ/PRotate]:

Walt Engle said:
As I said, I am not a lisp programmer

I don't know. It worked up to the point where I didn't have the sub-directory and trngl.dwg
 
maybe try adding a hyphen in from of the insert command and dtext command

ie
(COMMAND "-INSERT" "K:/TVSDatabase/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "")

and try copy pasting this command line and see what the promots are. the prompt might have chanaged, so you have to adject there as well.
 
Thanks for your replies guys. Yes
"K:/TVSDatabase/2-Drafting/F-Symbols/TRNGL.DWG" is the full path.

Jamie, I'll give your suggestion a go and let you know.

Thanks
Brett
 
I think you are right,. I was thinking the database/2........... and such were variables for the insertion point scale and rotation.

Murph

Mark Propst said:
I would assume that "K:/TVSDatabase/2-Drafting/F-Symbols/TRNGL.DWG" was his block name. I can't imagine how your line :

(COMMAND "INSERT" "K:/TVS"
"Database/2-Drafting/F-Symbols/TRNGL.DWG" pause "" "" "")

doesnt' error with something like
Point or option keyword required.
Specify insertion point or [Scale/X/Y/Z/Rotate/PScale/PX/PY/PZ/PRotate]:

Walt Engle said:
As I said, I am not a lisp programmer
 

Latest threads

Back
Top