Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 9
Anonymous
268 Views, 8 Replies

Dtext Help

The following lisp will prompt me for rotation but then just dies. Can
someone see what I'm missing?

Thanks

(DEFUN C:dt ()
(SETVAR "CMDECHO" 0)
(setq
ERR *ERROR*
*ERROR* LISP-ERR
CMDECHO 0
)
(SETQ CL (GETVAR "CLAYER"))
(setq ct (getvar "ctab"))
(setq tstyl (getvar "textstyle"))
(setvar "textstyle" "simplex")
(setq NewLayer (strcat "TEXT" (substr CT 1 3)))
(COMMAND "VPLAYER" "N" NEWLAYER "")
(COMMAND "VPLAYER" "T" NEWLAYER "C" "")
(COMMAND "-LAYER" "M" NewLayer "C" "130" "" "")
(SETQ VS (/ 1 (caddr (trans '(0 0 1) 2 3))))
(setq tsize (* VS 0.125))
(setq TJUST
(getSTRING
"\nEnter a justification option
[Align/Fit/Center/Middle/Left/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR] :"
)
)
(SETVAR "CMDECHO" 1)
(IF (= tjust "A")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "F")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "C")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "M")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "L")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "R")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TL")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "ML")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "MC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "MR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BL")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(SETVAR "CLAYER" CL)
(setvar "textstyle" tstyl)
(PRINC)
)
(defun
LISP-ERR
(MSG)
(if (/= MSG "Function cancelled")
(princ (strcat "\nError: " MSG))
) ;_ end of if
(setvar "CLAYER" CL)
(princ)
) ;_ end of defun

--
Erik D.
CAD Manager
Atkinson Industries, Inc.
620-231-6900
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

I think you may be mixing macro and lisp syntax. Apparently, you're trying
to use backslashes for user input, which is a macro format approach [and
doubled the way one would need to do in a filepath], inside a lisp (command)
function, which needs to have (pause) for user input instead. Try using
(pause) instead of "\\".
--
Kent Cooper


"Erik Deyo" wrote...
The following lisp will prompt me for rotation but then just dies. Can
someone see what I'm missing?

Thanks

(DEFUN C:dt ()
(SETVAR "CMDECHO" 0)
(setq
ERR *ERROR*
*ERROR* LISP-ERR
CMDECHO 0
)
(SETQ CL (GETVAR "CLAYER"))
(setq ct (getvar "ctab"))
(setq tstyl (getvar "textstyle"))
(setvar "textstyle" "simplex")
(setq NewLayer (strcat "TEXT" (substr CT 1 3)))
(COMMAND "VPLAYER" "N" NEWLAYER "")
(COMMAND "VPLAYER" "T" NEWLAYER "C" "")
(COMMAND "-LAYER" "M" NewLayer "C" "130" "" "")
(SETQ VS (/ 1 (caddr (trans '(0 0 1) 2 3))))
(setq tsize (* VS 0.125))
(setq TJUST
(getSTRING
"\nEnter a justification option
[Align/Fit/Center/Middle/Left/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR] :"
)
)
(SETVAR "CMDECHO" 1)
(IF (= tjust "A")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "F")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "C")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "M")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "L")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "R")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TL")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "ML")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "MC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "MR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BL")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(SETVAR "CLAYER" CL)
(setvar "textstyle" tstyl)
(PRINC)
)
(defun
LISP-ERR
(MSG)
(if (/= MSG "Function cancelled")
(princ (strcat "\nError: " MSG))
) ;_ end of if
(setvar "CLAYER" CL)
(princ)
) ;_ end of defun

--
Erik D.
CAD Manager
Atkinson Industries, Inc.
620-231-6900
Message 3 of 9
Anonymous
in reply to: Anonymous

Another problem, different from the one you describe, that you might run
into: Some of those text justifications won't prompt for the same things in
the same way, but you have the stuff in the (command) functions exactly the
same for all justifications. For example, if the justification is "A", then
the 'tsize' variable is irrelevant -- it's going to want two points, rather
than a point and a size. And if it's "F", it will use 'tsize', but later --
it won't want it until after it's been given two points for the baseline,
not just one.
--
Kent Cooper


"Erik Deyo" wrote...
.....
(getSTRING
"\nEnter a justification option
[Align/Fit/Center/Middle/Left/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR] :"
)
)
(SETVAR "CMDECHO" 1)
(IF (= tjust "A")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "F")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "C")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
....
Message 4 of 9
pnorman
in reply to: Anonymous

Hi Erik,

Here is a slightly differt approach using your code.
I ahve made a few changes/improvements.
I am not faliliar with the VPLAYEr command so I have made a guess at how that part should work...
I think this code achieves basically what you were trying to achieve but no gurantees its perfect. Best I could do in time available..

[code]
(DEFUN C:dt ( / *error* CL CT CMDECHO TEXTEVAL TSTYL NEWLAYER VS TSIZE TSTYL)
(setq CMDECHO (getvar "cmdecho"))
(SETVAR "CMDECHO" 0)
(defun *error* (MSG)
(if (/= MSG "Function cancelled")
(princ (strcat "\nError: " MSG))
) ;_ end of if
(if TEXTEVAL (setvar "TEXTEVAL" TEXTEVAL))
(if CL (setvar "CLAYER" CL))
(if TSTYL (setvar "textstyle" TSTYL))
(if TSIZE (setvar "textsize" TSIZE))
(if CMDECHO (setvar "cmdecho" CMDECHO))
)
(SETQ CL (GETVAR "CLAYER"))
(setq ct (getvar "ctab"))
(setq tstyl (getvar "textstyle"))
(setq TSIZE (getvar "textsize"))
(if (tblsearch "style" "simplex")
(setvar "textstyle" "simplex")
)
(setq TEXTEVAL (getvar "TEXTEVAL"))
(setvar "TEXTEVAL" 1)
(setq NewLayer (strcat "TEXT" (substr CT 1 3)))
(if (not (tblsearch "layer" NEWLAYER))
(progn
(COMMAND "-LAYER" "M" NewLayer "C" "130" "" "")
(COMMAND "VPLAYER" "N" NEWLAYER "")
)
(progn
(COMMAND "VPLAYER" "T" NEWLAYER "C" "")
(setvar "clayer" NewLayer)
)
)
(SETQ TSIZE (* (/ 1 (caddr (trans '(0 0 1) 2 3))) 0.125))
(setvar "textsize" TSIZE)
(SETVAR "CMDECHO" 1)
(command "_dtext" "j")
(while (= 1 (boole 1 (getvar "CMDACTIVE") 1))
(command pause)
)
(setvar "TEXTEVAL" TEXTEVAL)
(setvar "CLAYER" CL)
(setvar "textstyle" TSTYL)
(setvar "textsize" TSIZE)
(setvar "cmdecho" CMDECHO)
(PRINC)
)
[/code]

Regards
Phill
Message 5 of 9
Anonymous
in reply to: Anonymous

Ok, with a little tweaking it works almost the way I like, except the first
time you run it it doesn't create the layer or change the layer. the second
time it works.

--
Erik D.
CAD Manager
Atkinson Industries, Inc.
620-231-6900
wrote in message news:5374419@discussion.autodesk.com...
Hi Erik,

Here is a slightly differt approach using your code.
I ahve made a few changes/improvements.
I am not faliliar with the VPLAYEr command so I have made a guess at how
that part should work...
I think this code achieves basically what you were trying to achieve but no
gurantees its perfect. Best I could do in time available..

[code]
(DEFUN C:dt ( / *error* CL CT CMDECHO TEXTEVAL TSTYL NEWLAYER VS TSIZE
TSTYL)
(setq CMDECHO (getvar "cmdecho"))
(SETVAR "CMDECHO" 0)
(defun *error* (MSG)
(if (/= MSG "Function cancelled")
(princ (strcat "\nError: " MSG))
) ;_ end of if
(if TEXTEVAL (setvar "TEXTEVAL" TEXTEVAL))
(if CL (setvar "CLAYER" CL))
(if TSTYL (setvar "textstyle" TSTYL))
(if TSIZE (setvar "textsize" TSIZE))
(if CMDECHO (setvar "cmdecho" CMDECHO))
)
(SETQ CL (GETVAR "CLAYER"))
(setq ct (getvar "ctab"))
(setq tstyl (getvar "textstyle"))
(setq TSIZE (getvar "textsize"))
(if (tblsearch "style" "simplex")
(setvar "textstyle" "simplex")
)
(setq TEXTEVAL (getvar "TEXTEVAL"))
(setvar "TEXTEVAL" 1)
(setq NewLayer (strcat "TEXT" (substr CT 1 3)))
(if (not (tblsearch "layer" NEWLAYER))
(progn
(COMMAND "-LAYER" "M" NewLayer "C" "130" "" "")
(COMMAND "VPLAYER" "N" NEWLAYER "")
)
(progn
(COMMAND "VPLAYER" "T" NEWLAYER "C" "")
(setvar "clayer" NewLayer)
)
)
(SETQ TSIZE (* (/ 1 (caddr (trans '(0 0 1) 2 3))) 0.125))
(setvar "textsize" TSIZE)
(SETVAR "CMDECHO" 1)
(command "_dtext" "j")
(while (= 1 (boole 1 (getvar "CMDACTIVE") 1))
(command pause)
)
(setvar "TEXTEVAL" TEXTEVAL)
(setvar "CLAYER" CL)
(setvar "textstyle" TSTYL)
(setvar "textsize" TSIZE)
(setvar "cmdecho" CMDECHO)
(PRINC)
)
[/code]

Regards
Phill
Message 6 of 9
pnorman
in reply to: Anonymous

HI Erik,

Not sure why. It seems to be setting the layer ok here. Remember it will set the new layer and then when its finished it puts you back on the layer you were on before?!

Cheers
Phill
Message 7 of 9
Anonymous
in reply to: Anonymous

Thanks for taking a look at it.

--
Erik D.
CAD Manager
Atkinson Industries, Inc.
620-231-6900
wrote in message news:5374654@discussion.autodesk.com...
HI Erik,

Not sure why. It seems to be setting the layer ok here. Remember it will set
the new layer and then when its finished it puts you back on the layer you
were on before?!

Cheers
Phill
Message 8 of 9
Anonymous
in reply to: Anonymous

Hi Erik,
Your code I just revised,in order to more simple,look like this,and how
comment you.
[code]
(defun com_dtext ()
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)

(defun c:dt (/ *error* cl cmdecho ct err lisp-err newlayer tjust tm tsize
tstyl vs)
(setvar "cmdecho" 0)
(setq err *error*)
(setq *error* lisp-err)
(setq cmdecho 0)
(setq cl (getvar "clayer"))
(setq ct (getvar "ctab"))
(setq tstyl (getvar "textstyle"))
(setvar "textstyle" "simplex")
(setq newlayer (strcat "text" (substr ct 1 3)))
;---------------------------------------------
(setq tm (getvar "tilemode"))
(if
(= tm 1)
(setvar "tilemode" 0)
) ; if
;---------------------------------------------
(command "vplayer" "n" newlayer "")
(command "vplayer" "t" newlayer "c" "")
(command "-layer" "m" newlayer "c" "130" "" "")
(setq vs (/ 1 (caddr (trans '(0 0 1) 2 3))))
(setq tsize (* vs 0.125))
(setq tjust
(getstring
"\nenter a justification option
[align/fit/center/middle/left/right/tl/tc/tr/ml/mc/mr/bl/bc/br]
:"))
(setvar "cmdecho" 1)
(if (= tjust "a")(com_dtext))
(if (= tjust "f")(com_dtext))
(if (= tjust "c")(com_dtext))
(if (= tjust "m")(com_dtext))
(if (= tjust "l")(com_dtext))
(if (= tjust "r")(com_dtext))
(if (= tjust "tl")(com_dtext))
(if (= tjust "tc")(com_dtext))
(if (= tjust "tr")(com_dtext))
(if (= tjust "ml")(com_dtext))
(if (= tjust "mc")(com_dtext))
(if (= tjust "mr")(com_dtext))
(if (= tjust "bl")(com_dtext))
(if (= tjust "bc")(com_dtext))
(if (= tjust "br")(com_dtext))
(setvar "clayer" cl)
(setvar "textstyle" tstyl)
(princ)
)

(defun lisp-err (msg)
(if
(/= msg "function cancelled")
(princ (strcat "\nerror: " msg))
) ;_ end of if
(setvar "clayer" cl)
(princ)
) ;_ end of defun
[/code]

"Erik Deyo" wrote in message
news:5374312@discussion.autodesk.com...
The following lisp will prompt me for rotation but then just dies. Can
someone see what I'm missing?

Thanks

(DEFUN C:dt ()
(SETVAR "CMDECHO" 0)
(setq
ERR *ERROR*
*ERROR* LISP-ERR
CMDECHO 0
)
(SETQ CL (GETVAR "CLAYER"))
(setq ct (getvar "ctab"))
(setq tstyl (getvar "textstyle"))
(setvar "textstyle" "simplex")
(setq NewLayer (strcat "TEXT" (substr CT 1 3)))
(COMMAND "VPLAYER" "N" NEWLAYER "")
(COMMAND "VPLAYER" "T" NEWLAYER "C" "")
(COMMAND "-LAYER" "M" NewLayer "C" "130" "" "")
(SETQ VS (/ 1 (caddr (trans '(0 0 1) 2 3))))
(setq tsize (* VS 0.125))
(setq TJUST
(getSTRING
"\nEnter a justification option
[Align/Fit/Center/Middle/Left/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR] :"
)
)
(SETVAR "CMDECHO" 1)
(IF (= tjust "A")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "F")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "C")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "M")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "L")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "R")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TL")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "ML")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "MC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "MR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BL")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(SETVAR "CLAYER" CL)
(setvar "textstyle" tstyl)
(PRINC)
)
(defun
LISP-ERR
(MSG)
(if (/= MSG "Function cancelled")
(princ (strcat "\nError: " MSG))
) ;_ end of if
(setvar "CLAYER" CL)
(princ)
) ;_ end of defun

--
Erik D.
CAD Manager
Atkinson Industries, Inc.
620-231-6900
Message 9 of 9
Anonymous
in reply to: Anonymous

This is still going to have the problems described in my earlier replies:
1. Backslashes are for user input in macro format, but not inside a lisp
function. Use pause instead.
2. The com_dtext function is going to fail under some justifications
because the pauses won't be in the right places or the right quantity.
3. If all justifications call up the same function, there's little point in
checking which justification was entered, with all those (if) functions. If
you just want to know whether they entered a valid justification, try
(member) instead, with the justifications all in a single list.
--
Kent Cooper


"Adesu" wrote...
Hi Erik,
Your code I just revised,in order to more simple,look like this,and how
comment you.
[code]
(defun com_dtext ()
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)

(defun c:dt (/ *error* cl cmdecho ct err lisp-err newlayer tjust tm tsize
tstyl vs)
(setvar "cmdecho" 0)
(setq err *error*)
(setq *error* lisp-err)
(setq cmdecho 0)
(setq cl (getvar "clayer"))
(setq ct (getvar "ctab"))
(setq tstyl (getvar "textstyle"))
(setvar "textstyle" "simplex")
(setq newlayer (strcat "text" (substr ct 1 3)))
;---------------------------------------------
(setq tm (getvar "tilemode"))
(if
(= tm 1)
(setvar "tilemode" 0)
) ; if
;---------------------------------------------
(command "vplayer" "n" newlayer "")
(command "vplayer" "t" newlayer "c" "")
(command "-layer" "m" newlayer "c" "130" "" "")
(setq vs (/ 1 (caddr (trans '(0 0 1) 2 3))))
(setq tsize (* vs 0.125))
(setq tjust
(getstring
"\nenter a justification option
[align/fit/center/middle/left/right/tl/tc/tr/ml/mc/mr/bl/bc/br]
:"))
(setvar "cmdecho" 1)
(if (= tjust "a")(com_dtext))
(if (= tjust "f")(com_dtext))
(if (= tjust "c")(com_dtext))
(if (= tjust "m")(com_dtext))
(if (= tjust "l")(com_dtext))
(if (= tjust "r")(com_dtext))
(if (= tjust "tl")(com_dtext))
(if (= tjust "tc")(com_dtext))
(if (= tjust "tr")(com_dtext))
(if (= tjust "ml")(com_dtext))
(if (= tjust "mc")(com_dtext))
(if (= tjust "mr")(com_dtext))
(if (= tjust "bl")(com_dtext))
(if (= tjust "bc")(com_dtext))
(if (= tjust "br")(com_dtext))
(setvar "clayer" cl)
(setvar "textstyle" tstyl)
(princ)
)

(defun lisp-err (msg)
(if
(/= msg "function cancelled")
(princ (strcat "\nerror: " msg))
) ;_ end of if
(setvar "clayer" cl)
(princ)
) ;_ end of defun
[/code]

"Erik Deyo" wrote in message
news:5374312@discussion.autodesk.com...
The following lisp will prompt me for rotation but then just dies. Can
someone see what I'm missing?

Thanks

(DEFUN C:dt ()
(SETVAR "CMDECHO" 0)
(setq
ERR *ERROR*
*ERROR* LISP-ERR
CMDECHO 0
)
(SETQ CL (GETVAR "CLAYER"))
(setq ct (getvar "ctab"))
(setq tstyl (getvar "textstyle"))
(setvar "textstyle" "simplex")
(setq NewLayer (strcat "TEXT" (substr CT 1 3)))
(COMMAND "VPLAYER" "N" NEWLAYER "")
(COMMAND "VPLAYER" "T" NEWLAYER "C" "")
(COMMAND "-LAYER" "M" NewLayer "C" "130" "" "")
(SETQ VS (/ 1 (caddr (trans '(0 0 1) 2 3))))
(setq tsize (* VS 0.125))
(setq TJUST
(getSTRING
"\nEnter a justification option
[Align/Fit/Center/Middle/Left/Right/TL/TC/TR/ML/MC/MR/BL/BC/BR] :"
)
)
(SETVAR "CMDECHO" 1)
(IF (= tjust "A")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "F")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "C")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "M")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "L")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "R")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TL")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "TR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "ML")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "MC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "MR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BL")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BC")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(IF (= tjust "BR")
(command "_dtext" "j" tjust "\\" tsize "\\" "\\")
)
(SETVAR "CLAYER" CL)
(setvar "textstyle" tstyl)
(PRINC)
)
(defun
LISP-ERR
(MSG)
(if (/= MSG "Function cancelled")
(princ (strcat "\nError: " MSG))
) ;_ end of if
(setvar "CLAYER" CL)
(princ)
) ;_ end of defun

--
Erik D.
CAD Manager
Atkinson Industries, Inc.
620-231-6900

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost