Author Topic: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )  (Read 2796 times)

0 Members and 1 Guest are viewing this topic.

vnanhvu

  • Guest
HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« on: November 08, 2011, 11:47:56 PM »
    Can you help me, creat a lisp for: draw arrow ( same command: qleader ). But it no belong Size Arrow Dimstyle, and can fillet lines. I also modify factor arrow for appropriate with drawing. Also I want to put it on Layer "Arrow" with color "ByLayer". Someone has created a lisp, but file .VLX I can not improve for the better. ( Command: MT... and Choose size arrow : T .. ).
  Thanks for help!

Ketxu

  • Newt
  • Posts: 109
Re: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« Reply #1 on: November 09, 2011, 01:38:10 AM »
Your rountine create LWPolyline with change width, so it shape is similar a leader (not leader), and you can find many lisp with the same function in GG.
With your vlx we can't do anything more ^^ no edit
But, you can use a template func to call it, similar :
Code: [Select]
(defun c:mtt(/ oldlay oldCol)
  (setq oldLay (getvar "clayer") oldCol (getvar "cecolor"))
  (setvar "clayer" "0")
  (setvar "cecolor" "BYLAYER")
  (c:mt)
  (setvar "clayer" oldLay)
  (setvar "cecolor" oldCol)
  )
P/s : Why don't you ask this problem in where you downloaded it :) (so you can use your language :) )

vnanhvu

  • Guest
Re: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« Reply #2 on: November 09, 2011, 04:48:10 AM »
Thank you, but have error with color: display COLOR 9  ( I want to display color Bylayer ).
Thanks for all from your help!

thuphong

  • Guest
Re: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« Reply #3 on: November 09, 2011, 07:36:47 AM »
visit www.cadviet.com.
Hello! ketxu and vnanhvu

KewlToyZ

  • Guest
Re: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« Reply #4 on: November 09, 2011, 08:56:48 AM »
You may want to check out this thread...
http://www.theswamp.org/index.php?topic=29245.0;topicseen

Ketxu

  • Newt
  • Posts: 109
Re: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« Reply #5 on: November 09, 2011, 10:19:52 AM »
Thank you, but have error with color: display COLOR 9  ( I want to display color Bylayer ).
Thanks for all from your help!
Maybe color 9 is asign in your mt code. So you must put color after job finished

Code: [Select]
(defun c:mtt(/ oldlay)
  (setq oldLay (getvar "clayer"))
  (setvar "clayer" "0") ;0 is layer that you want
  (setvar "cecolor" "BYLAYER")
  (c:mt)
  (setvar "clayer" oldLay)
  (vla-put-color (vlax-ename->vla-object (entlast)) "256")
  )
@thuphong : chào :)

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« Reply #6 on: November 09, 2011, 10:40:16 AM »
Thank you, but have error with color: display COLOR 9  ( I want to display color Bylayer ).
Thanks for all from your help!
Maybe color 9 is asign in your mt code. So you must put color after job finished

Code: [Select]
(defun c:mtt(/ oldlay)
  (setq oldLay (getvar "clayer"))
  (setvar "clayer" "0") ;0 is layer that you want
  (setvar "cecolor" "BYLAYER")
  (c:mt)
  (setvar "clayer" oldLay)
  (vla-put-color (vlax-ename->vla-object (entlast)) "256")
  )
@thuphong : chào :)

Code: [Select]
(defun c:MTT (/ ent data)
  (setq ent (entlast))
  (c:MT)
  (if (not (equal ent (setq ent (entlast))))
    (entmod (subst '(8 . "LAYER")
                   (assoc 8 (setq data (entget ent)))
                   (subst '(62 . 256) (assoc 62 data) data)
            )
    )
  )
  (princ)
)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Ketxu

  • Newt
  • Posts: 109
Re: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« Reply #7 on: November 09, 2011, 10:59:46 AM »
Thank alanjt for check entlast :)
And maybe check if exist dxf 62 ? (in this case it always do^^)

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« Reply #8 on: November 09, 2011, 11:01:15 AM »
Thank alanjt for check entlast :)
And maybe check if exist dxf 62 ? (in this case it always do^^)
It doesn't exist if bylayer, but if it is already bylayer, subst still just try and substitute '(62 . 256) with nil, which will just return the entity data.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Ketxu

  • Newt
  • Posts: 109
Re: HELP ME WITH DRAW ARROW ( SAME COMMAND: QLEADER )
« Reply #9 on: November 09, 2011, 08:23:55 PM »
Ok, so it will be OK ^^