Jump to content

What is meaning of: "bad argument type: lentityp"


rayg11757

Recommended Posts

What is the meaning of "bad argument type: lentityp?" And how can these errors be removed?

 

I am getting this error when changing the insertion point of a block and the insertion points of its attributes using with the CONS (or LIST) function and the SUBST function. The odd thing is that the code seems to work, but it appears to bomb at the last occurrence of the ENTMOD function. Using ENTUPD causes the error to show at the command prompt, and the program terminates immediately. When the ENTUPD function is not used, the ENTMOD functions are all completed through a WHILE statement, and the changes only after a REGEN.

 

I can't believe that I spent nearly the entire weekend trying to resolve figure this out. At this point it is becoming a mission, although I might be better off bangin my head against the wall.

 

Thank you for any help on solving this problem. Your help is greatly appreciated.

Ray

Link to comment
Share on other sites

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

  • drwhite

    10

  • The Buzzard

    5

  • rayg11757

    4

  • CHLUCFENG

    3

From Autodesk moderator..

 

 

LISP Entity Predicate. This message indicates that NIL was given when an

entity name was expected. You may be shooting off the end of a list, resulting

in an:

Link to comment
Share on other sites

> rayg11757

 

Yes it missed entity. Can you publish your code? I think it what be very simple mistake. This is that error examples:

 

Command: (entget Empty_Variable) ; variable Empty_Variable = nil
; error: bad argument type: lentityp nil

 

or type mismatch

 

Command: (entget 23) ; integer 23 instead ename
; error: bad argument type: lentityp 23

Link to comment
Share on other sites

Thank you for the response. I am sorry it took me so much time to upload the program, as I did a large amount of troubleshooting and clean up on the code before posting.

 

I think I understand what the error means now, but I don't know why it is happening here. The ENTUPD command is commented out, and the program works, but a REGEN is required. This ENTUPD function seems to bring out the "bad argument" problem. I cannot see why this is occurring.The ENTMOD function is close to the end just a few lines above "MAIN PROGRAM." (Sample dwg attached.) I appreciate your help with this problem.

 

There are two other problems that I still need to troubleshoot. One is the incrementing of the blocks and the other is the (vla-startundomark adoc) function. I think I can solve the incrementing problem with time.

 

Thanks for your help.

Ray

 

(defun C:FA ( / adoc)
;;;  (setq adoc  (vla-get-activedocument (vlax-get-acad-object)))
;;;  (vla-startundomark adoc)
 (defun get_acad_vars ()
 (setq osm-set (getvar "osmode"))
 (setq cmd-ech (getvar "cmdecho"))
 (setvar "cmdecho" 0)
 (setq lay-cur (getvar "clayer"))) ; END defun to get original settings to be restored
(defun res_acad_vars ()
 (setvar  "osmode"    osm-set)
 (setvar  "clayer"    lay-cur)
 (setvar  "pickstyle" 1      )
 (command "wipeout" "f" "off")
 (setvar  "cmdecho"   cmd-ech))    ; END defun to restore original acad settings
(defun init_vars ()
(setq pick_ok 0)
(if (= first_time nil)
   (progn (princ "SELECT reference point BEFORE Continuing: ")
          (setq ins_pnt (getpoint))
          (setq pick_start ins_pnt)
   (setq first_time 1))))   ; END progn & defun init_vars procedure
(defun *error* (msg)
(res_acad_vars)
(princ msg)
(princ))                            ; END defun *error*
(defun rel_dist ()
    (setq rel_x  72.0
          rel_y1 0.0
   rel_y2 16.0))            ;END defun relative_distances procedure
(defun get_obj ()                   ; find new insertion point or pick block/mtext to move
 (setvar "osmode" 520)
 (initget 128 "Select")
 (setq ins_pnt (getpoint "\nPICK Block or Mtext or <S>elect new reference point: "))
 (cond
    ((null ins_pnt)
         (progn
  (res_acad_vars)
         (exit)))                  ;cond 1 - picked enter
    ((listp ins_pnt)
         (progn
  (setq pick_object 1)
  ))                        ;cond 2 - picked object
    ((= ins_pnt "Select")
         (progn
  (setq pick_object 0)
  (setq ins_pnt (getpoint))
         (setq pick_start ins_pnt)
  (setq first_time 1)))     ;cond 3 - select new ref point
 ))                                ;END cond function & defun in_pts 
(defun start_pnt ()
  (setq new_x  (car  pick_start))
  (setq new_y1 (cadr pick_start));<===========Problem here?
  (setq new_y2 (- new_y1 rel_y2))) ;END defun start_pnt

(defun  increment ()
 (setq new_x (+ new_x rel_x))
 (setq new_y (+ new_y1 rel_y1))
 (setq y2_val_n (+ new_y rel_y2))
)

(defun pick_obj ()
 (setq ss_obj (ssget ins_pnt))
 (setq ent (entget (ssname ss_obj 0)))  ;get the entire entity list
   (cond ((= (cdr (cadr ent)) "INSERT")
       (progn
   (setq pick_ok 1)       ; found a BLock
                 (setq list_num 10)
   (increment)
   (mov_ins_pnt)
   (while(/= "SEQEND" (cdr (cadr ent)))
       (setq list_num 11)
                     (setq ent_nam (cdr (car ent)))
                     (setq ent     (entget (entnext ent_nam)))
              (mov_ins_pnt)
                  )                     ;END while
  )                       ;progn - found block
          )                             ;condition 1
   ((= (cdr (cadr ent)) "MTEXT")
       (progn
   (setq pick_ok 2)       ; found MText
                 (setq list_num 10)
   (increment)
   (mov_ins_pnt)
              ))                        ;END progn & condition 2
    )                                   ;END cond
);defun pick_obj

(defun mov_ins_pnt ()                 ;move the insertion point
 (setq blck_pnt (assoc list_num ent));get the list of the block insertion point
 (setq old_x    (cadr  blck_pnt))    ;insertion point x value at start)
 (setq old_y    (caddr blck_pnt))    ;insertion point y value at start)
 (setq delta_x  (- new_x old_x))
 (setq delta_y  (- new_y old_y))
 (setq x1_val  (+ old_x delta_x))    ; for block/attributes
 (setq x2_val  (+ old_x delta_x))    ; for mtext
 (setq y1_val  (+ old_y delta_y))
 (setq y2_val  (+ old_y delta_y))
 (cond ((= pick_ok 1)(progn          ; for block/attributes
                         (setq new_x x1_val)
    (setq new_y new_y1)
    (setq x1_val  (+ old_x delta_x))
  ))
((= pick_ok 2)(progn          ; for mtext
    (setq new_x x2_val)
                  (setq new_y new_y2)
                         (setq just1 (assoc 71 ent))
                  (setq just2 (cons  71 2))
                  (setq ent   (subst just2 just1  ent)));progn
);cond pick_ok 2
 )      ;cond
 (setq ins_pnt  (list new_x  new_y  0.0))         ; new insertion point
 (setq mov_pnt  (cons list_num  ins_pnt))         ; new insertion point LIST
 (setq ent      (subst mov_pnt  blck_pnt  ent))
 (entmod ent)
 ;(ENTUPD ENT)    ;;;;;   <<<=========  BAD ARGUMENT PROBLEM HERE *****
);defun move insertion point

;==============================
;        MAIN PROGRAM          
;==============================
(init_vars)
(get_acad_vars)
(rel_dist)
(get_obj)
(start_pnt)
(increment)
(pick_obj)
(res_acad_vars)
;;; (vla-endundomark adoc)
(princ)
;==============================
);END PROGRAM defun Command: FA

RAY Temp.dwg

Link to comment
Share on other sites

There is a "redraw" command in autolisp. Try that instead

of "regen". Use the redraw function to redraw each specific

entity once the entmod is UPDATED one at a time in the loop.

The redraw function is NOT well documented. If you want

specific details let me know.

Link to comment
Share on other sites

Thanks for the suggestion. For the code posted above, I have commented the ENTUPD function so that the program will work despite the error. REDRAW does not move the attributes, but a REGEN does.

 

When I remove the comment, the block moves, but the program stops before the attributes are moved. The "Bad Argument" error message occurs at that time.

 

;(ENTUPD ENT) ;;;;;

 

I think that borgunit and ASMI are right where there is an entity "shooting off the list," but I don't see it.

 

Thanks again.

Ray

Link to comment
Share on other sites

Thanks All, for your responses. They were definitely a big help.

 

I gave up in defeat on using the ENTMOD and ENTUPD, as I could not find why the "bad arguement lentitype" error occurred, although I think I now understand what caused it.

 

The good news is that I rewrote the program using (COMMAND "move"...), since it is time to move on, and the program is now working well. But I think I learned a lot about how to manipulate the AutoCAD database structure, and I appreciate your help in that matter.

 

Thank you.

Ray

Link to comment
Share on other sites

  • 1 year later...

I am getting the same error and I am doing the same function with the lisp I am running (replacing old blocks with new ones and copying attributes and placing them in the new blocks). I am getting the same error at the exact spot, the lisp is replacing the block but craps out when placing the new attributes. Regen is not working. I have posted my code below any help would greatly be appreicted.

 

FYI: Some varialbes are being loaded in another Lisp routine.If you need to see let me know.

 

(defun c:redef_instruments ()
(setvar "clayer" "sym")
(setq lst_blk (ai_table "BLOCK" 0))
(if lst_blk
(progn
(foreach str_blk lst_blk
(setq file_blk
(open (strcat (getvar "dwgprefix") "InstrumentMap.csv") "r")
)
(while (setq record (read-line file_blk))
(setq str_name (nth 0 (strparse record ",")))
(if
(and
(= (strcase str_name) (strcase str_blk))
(> (length (strparse record ",")) 1)
(/= (setq str_newname (nth 1 (strparse record ","))) "")
)
(progn
(redefineinstruments str_name str_newname)
)
)
)
(close file_blk)
)
)
)
)
(defun redefineinstruments (old new / blist
attlst_old attlst_new
val scx scy scz
)
(setq ss_old (ssget "x" (list '(0 . "INSERT") (cons 2 old))))
(if ss_old
(progn
(setq blist
(sel2lst ss_old)
)
(foreach nb blist
(command "insert"
(strcat new "=" (findfile (strcat new ".dwg")))
(getval 10 nb)
"XYZ"
1
1
1
(rtod (getval 50 nb))
)
(setq attlst_old (att2lst nb))
(setq attlst_new (att2lst (entlast)))
(setval 1 (getval 1 (nth 0 attlst_old)) (nth 0 attlst_new))
(setval 1 (getval 1 (nth 1 attlst_old)) (nth 1 attlst_new))
(setval 1 (getval 1 (nth 2 attlst_old)) (nth 2 attlst_new))
(setval 1 (getval 1 (nth 3 attlst_old)) (nth 3 attlst_new))
(setval 1 (getval 1 (nth 4 attlst_old)) (nth 4 attlst_new))
(setval 1 (getval 1 (nth 5 attlst_old)) (nth 5 attlst_new))
(setval 1 (getval 1 (nth 6 attlst_old)) (nth 6 attlst_new))
(setval 1 (getval 1 (nth 7 attlst_old)) (nth 7 attlst_new))
(setval 1 (getval 1 (nth 8 attlst_old)) (nth 8 attlst_new))
(setval 1 (getval 1 (nth 9 attlst_old)) (nth 9 attlst_new))
(setval 1 (getval 1 (nth 10 attlst_old)) (nth 10 attlst_new))
(setval 1 (getval 1 (nth 11 attlst_old)) (nth 11 attlst_new))
(setval 1 (getval 1 (nth 12 attlst_old)) (nth 12 attlst_new))
(entdel nb)
)
)
)
(entupd (entlast))
)

 

 

Thanks,

Eric

Link to comment
Share on other sites

  • 6 months later...

I have the same problem with my routine, it produces the same error message: ; error: bad argument type: lentityp nil. It skips the ENTSEL in each subroutine of the IF.

Help!!

 

(defun c:hln(/ LAS OS R1 R2 XNv XFv r2v Y1v X1v X2v P1v P2v xnh xfh r2h y1h x1h x2h p1h p2h)

(SETVAR "CMDECHO" 0)

(SETQ LAS(GETVAR "CLAYER"))

(SETQ OS (GETVAR "OSMODE"))

(initget "V H")

(setq direc(getkword "Type: Vert/Horiz"))

;need to change from horizontal to vertical

;swap involves components of chosen line

;if statement should control use of those components

;simple way, if V then change components to XNV versus XNH, etc.

(command "layer" "s" "hid" "")

(setvar "osmode" 512)

(if(= "V" direc)

(

(SETQ R1(ENTSEL "Pick line: "))

(SETQ XNv(GETPOINT "Pick BOTTOM side of plate: "))(terpri);point selected on top line

(SETQ XFv(GETPOINT "Pick TOP hside of plate: "))(terpri);point selected on bottom line

(setq R2v(entget(car R1)))

(setq Y1v(CADR(ASSOC 10 R2v))) ;X COORDINATE

(setq X1v(CADR XNv)) ;BOTTOM SIDE Y COORDINATE

(setq X2v(CADR XFv)) ;TOP SIDE Y COORDINATE

(SETQ P1v(LIST Y1v X1v))

(SETQ P2v(LIST Y1v X2v))

(command "line" p1v p2v /c/c)))

(if(= "H" direc)

(

(SETQ R2(ENTSEL "Pick line: "))

(SETQ XNh(GETPOINT "Pick RIGHT side of plate: "))(terpri)

(SETQ XFh(GETPOINT "Pick LEFT side of plate: "))(terpri)

(setq R2h(entget(car R2)))

(setq Y1h(CADDR(ASSOC 11 R2h))) ;Y COORDINATE

(setq X1h(CADR XNh)) ;NEAR SIDE X COORDINATE

(setq X2h(CAR XFh)) ;FAR SIDE X COORDINATE

(SETQ P1h(LIST X2H Y1h))

(SETQ P2h(LIST X1h Y1h))

(command "line" p1h p2h /c/c)))

(COMMAND "LAYER" "S" LAS "")

(SETVAR "OSMODE" 183)

(PRINC)

)

 

What I'm trying to do is draw a hidden line in an adjacent view by just selecting the line in the other "visible" view of the line. I want to specify if it will be vertical or horizontal (I think, might not be necessary) to draw the line. But I can't get it to select either line.

Link to comment
Share on other sites

At a quick glance, you have some invalid IF statements. Try COND.

 

eg. (UNTESTED as I don't know what this does and don't want to execute it)

 

(defun c:hln (/ LAS OS R1 R2 XNv XFv r2v Y1v X1v X2v P1v P2v xnh xfh r2h y1h x1h x2h p1h p2h)
 (SETVAR "CMDECHO" 0)
 (SETQ LAS (GETVAR "CLAYER"))
 (SETQ OS (GETVAR "OSMODE"))
 (initget "V H")
 (setq direc (getkword "Type: Vert/Horiz<current>"))
;need to change from horizontal to vertical
;swap involves components of chosen line
;if statement should control use of those components
;simple way, if V then change components to XNV versus XNH, etc.
 (command "layer" "s" "hid" "")
 (setvar "osmode" 512)
 (cond
   ((= "V" direc)
    (SETQ R1 (ENTSEL "Pick line: "))
    (SETQ XNv (GETPOINT "Pick BOTTOM side of plate: "))
    (terpri) ;point selected on top line
    (SETQ XFv (GETPOINT "Pick TOP hside of plate: "))
    (terpri) ;point selected on bottom line
    (setq R2v (entget (car R1)))
    (setq Y1v (CADR (ASSOC 10 R2v))) ;X COORDINATE
    (setq X1v (CADR XNv)) ;BOTTOM SIDE Y COORDINATE
    (setq X2v (CADR XFv)) ;TOP SIDE Y COORDINATE
    (SETQ P1v (LIST Y1v X1v))
    (SETQ P2v (LIST Y1v X2v))
    (command "line" p1v p2v /c/c)
   )
   ((= "H" direc)
    (SETQ R2 (ENTSEL "Pick line: "))
    (SETQ XNh (GETPOINT "Pick RIGHT side of plate: "))
    (terpri)
    (SETQ XFh (GETPOINT "Pick LEFT side of plate: "))
    (terpri)
    (setq R2h (entget (car R2)))
    (setq Y1h (CADDR (ASSOC 11 R2h))) ;Y COORDINATE
    (setq X1h (CADR XNh)) ;NEAR SIDE X COORDINATE
    (setq X2h (CAR XFh)) ;FAR SIDE X COORDINATE
    (SETQ P1h (LIST X2H Y1h))
    (SETQ P2h (LIST X1h Y1h))
    (command "line" p1h p2h /c/c)
   )
 )
 (COMMAND "LAYER" "S" LAS "")
 (SETVAR "OSMODE" 183)
 (PRINC)
)

Link to comment
Share on other sites

OK, tried that. Came back with malformed list. Parenthesis error. Checked them. On the "(Cond" statement was not included completely. Added two more parenthesis after the last one at

(command "line" p1h p2h /c/c)

)

))) ;right here

 

and that worked, except it came back with the

 

Command: (load "hidlnn")

; error: too many arguments: (IF (= "V" DIREC)

 

so, back to work on that.... help if want to.

Hey, want a copy of the drawing (very simple) I'm using to create this with?

Link to comment
Share on other sites

Well, fixed that. Too many arguments error.

Now it's back to the: ; error: bad argument type: lentityp nil

So COND didn't work. Help still needed. Thanks.

Link to comment
Share on other sites

Here's the code:

 

 
(defun c:hln(/ LAS OS R1 R2 XNv XFv r2v Y1v X1v X2v P1v P2v xnh xfh r2h y1h x1h x2h p1h p2h)
 (SETVAR "CMDECHO" 0)
 (SETQ LAS(GETVAR "CLAYER"))
 (SETQ OS (GETVAR "OSMODE"))
(initget "V H")
(setq direc(getkword "Type: Vert/Horiz<current>"))
;need to change from horizontal to vertical
;swap involves components of chosen line
;if statement should control use of those components
;simple way, if V then change components to XNV versus XNH, etc.
(command "layer" "s" "hid" "")
(setvar "osmode" 512)
(cond
((if(= "V" direc)
  (
(SETQ R1(ENTSEL "Pick line: "))
(SETQ XNv(GETPOINT "Pick BOTTOM side of plate: "))(terpri);point selected on top line
(SETQ XFv(GETPOINT "Pick TOP hside of plate: "))(terpri);point selected on bottom line
(setq R2v(entget(car R1)))
(setq Y1v(CADR(ASSOC 10 R2v)))          ;X COORDINATE
(setq X1v(CADR XNv))                    ;BOTTOM SIDE Y COORDINATE
(setq X2v(CADR XFv))                    ;TOP SIDE Y COORDINATE
(SETQ P1v(LIST Y1v X1v))
(SETQ P2v(LIST Y1v X2v))
(command "line" p1v p2v /c/c)
  ))
((if(= "H" direc)
  (
(SETQ R2(ENTSEL "Pick line: "))
(SETQ XNh(GETPOINT "Pick RIGHT side of plate: "))(terpri)
(SETQ XFh(GETPOINT "Pick LEFT side of plate: "))(terpri)
(setq R2h(entget(car R2)))
(setq Y1h(CADDR(ASSOC 11 R2h)))           ;Y COORDINATE
(setq X1h(CADR XNh))            ;NEAR SIDE X COORDINATE
(setq X2h(CAR XFh))                       ;FAR SIDE X COORDINATE
(SETQ P1h(LIST X2H Y1h))
(SETQ P2h(LIST X1h Y1h))            
(command "line" p1h p2h /c/c)
  ))
 )))
 (COMMAND "LAYER" "S" LAS "")
(SETVAR "OSMODE" 183)
(PRINC)
 )

Link to comment
Share on other sites

Here's the code:

 

 
(defun c:hln(/ LAS OS R1 R2 XNv XFv r2v Y1v X1v X2v P1v P2v xnh xfh r2h y1h x1h x2h p1h p2h)
 (SETVAR "CMDECHO" 0)
 (SETQ LAS(GETVAR "CLAYER"))
 (SETQ OS (GETVAR "OSMODE"))
(initget "V H")
(setq direc(getkword "Type: Vert/Horiz<current>"))
;need to change from horizontal to vertical
;swap involves components of chosen line
;if statement should control use of those components
;simple way, if V then change components to XNV versus XNH, etc.
(command "layer" "s" "hid" "")
(setvar "osmode" 512)
(cond
((if(= "V" direc)
  (
(SETQ R1(ENTSEL "Pick line: "))
(SETQ XNv(GETPOINT "Pick BOTTOM side of plate: "))(terpri);point selected on top line
(SETQ XFv(GETPOINT "Pick TOP hside of plate: "))(terpri);point selected on bottom line
(setq R2v(entget(car R1)))
(setq Y1v(CADR(ASSOC 10 R2v)))          ;X COORDINATE
(setq X1v(CADR XNv))                    ;BOTTOM SIDE Y COORDINATE
(setq X2v(CADR XFv))                    ;TOP SIDE Y COORDINATE
(SETQ P1v(LIST Y1v X1v))
(SETQ P2v(LIST Y1v X2v))
(command "line" p1v p2v /c/c)
  ))
((if(= "H" direc)
  (
(SETQ R2(ENTSEL "Pick line: "))
(SETQ XNh(GETPOINT "Pick RIGHT side of plate: "))(terpri)
(SETQ XFh(GETPOINT "Pick LEFT side of plate: "))(terpri)
(setq R2h(entget(car R2)))
(setq Y1h(CADDR(ASSOC 11 R2h)))           ;Y COORDINATE
(setq X1h(CADR XNh))            ;NEAR SIDE X COORDINATE
(setq X2h(CAR XFh))                       ;FAR SIDE X COORDINATE
(SETQ P1h(LIST X2H Y1h))
(SETQ P2h(LIST X1h Y1h))            
(command "line" p1h p2h /c/c)
  ))
 )))
 (COMMAND "LAYER" "S" LAS "")
(SETVAR "OSMODE" 183)
(PRINC)
 )

Try this

 

 (defun c:hln(/ LAS OS R1 R2 XNv XFv r2v Y1v X1v X2v P1v P2v xnh xfh r2h y1h x1h x2h p1h p2h)
 (SETVAR "CMDECHO" 0)
 (SETQ LAS(GETVAR "CLAYER"))
 (SETQ OS (GETVAR "OSMODE"))
(initget "V H")
(setq direc(getkword "Type: Vert/Horiz<current>"))
;need to change from horizontal to vertical
;swap involves components of chosen line
;if statement should control use of those components
;simple way, if V then change components to XNV versus XNH, etc.
(command "layer" "s" "hid" "")
(setvar "osmode" 512)
(cond
[color="Red"] ((= "V" direc)[/color]
  (SETQ R1(ENTSEL "Pick line: "))
  (SETQ XNv(GETPOINT "Pick BOTTOM side of plate: "))(terpri);point selected on top line
  (SETQ XFv(GETPOINT "Pick TOP hside of plate: "))(terpri);point selected on bottom line
  (setq R2v(entget(car R1)))
  (setq Y1v(CADR(ASSOC 10 R2v)))          ;X COORDINATE
  (setq X1v(CADR XNv))                    ;BOTTOM SIDE Y COORDINATE
  (setq X2v(CADR XFv))                    ;TOP SIDE Y COORDINATE
  (SETQ P1v(LIST Y1v X1v))
  (SETQ P2v(LIST Y1v X2v))
  (command "line" p1v p2v /c/c)[color="red"])[/color]
[color="Red"]  ((= "H" direc)[/color]
  (SETQ R2(ENTSEL "Pick line: "))
  (SETQ XNh(GETPOINT "Pick RIGHT side of plate: "))(terpri)
  (SETQ XFh(GETPOINT "Pick LEFT side of plate: "))(terpri)
  (setq R2h(entget(car R2)))
  (setq Y1h(CADDR(ASSOC 11 R2h)))           ;Y COORDINATE
  (setq X1h(CADR XNh))            ;NEAR SIDE X COORDINATE
  (setq X2h(CAR XFh))                       ;FAR SIDE X COORDINATE
  (SETQ P1h(LIST X2H Y1h))
  (SETQ P2h(LIST X1h Y1h))            
  (command "line" p1h p2h /c/c)[color="red"]))[/color]
 (COMMAND "LAYER" "S" LAS "")
(SETVAR "OSMODE" 183)
(PRINC)
 )

 

The conditional was written incorrectly.

Link to comment
Share on other sites

You 'da man Buzzard!!! Except for one error I made on point extraction, it works!! I really do remain impressed by this forum. Thanks.

Link to comment
Share on other sites

You 'da man Buzzard!!! Except for one error I made on point extraction, it works!! I really do remain impressed by this forum. Thanks.

Your welcome

Did you see where I highlighted in red to be the problem?

 

No need for the if part when you were using cond.

Link to comment
Share on other sites

I just looked back a few posts and alanjt had given you the answer already.

 

Did you check his post out?

 

I just caught the end of the thread and did not see that post.

 

You really should thank alanjt.

Link to comment
Share on other sites

I found some other problems in your code.

 

These two lines:

(command "layer" "s" "hid" "")
(COMMAND "LAYER" "S" LAS "")

 

You should make like this:

(command "._-layer" "_m" "HID" "")
(command "._-layer" "_m" "LAS" "")

 

And these two lines:

(command "line" p1v p2v /c/c))
(command "line" p1h p2h /c/c)))

 

Make like this:

(command "._line" p1v p2v /c/c))
(command "._line" p1h p2h /c/c)))

Link to comment
Share on other sites

Your welcome

Did you see where I highlighted in red to be the problem?

 

No need for the if part when you were using cond.

 

I have seldom used cond, maybe two or three times elsewhere. Thanks for the info.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...