Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ARROW LEADER CONVERT TO LOOP LEADER???

33 REPLIES 33
Reply
Message 1 of 34
Anonymous
5053 Views, 33 Replies

ARROW LEADER CONVERT TO LOOP LEADER???

Is there a way to have the Arrow leader convert to Loop leader in one click.
Our company standards use diamond tags and sometimes i have to change the arrow to loop by inserting a leader.

Thanks
33 REPLIES 33
Message 2 of 34

Loop? I don't see a Loop option anywhere......

wrote in message news:5192997@discussion.autodesk.com...
Is there a way to have the Arrow leader convert to Loop leader in one click.
Our company standards use diamond tags and sometimes i have to change the
arrow to loop by inserting a leader.

Thanks
Message 3 of 34

We use loop for single line pipes. If you have a routine or something maybe I can modify something

Thanks
Message 4 of 34

IS THERE A WAY TO CONVERT A LEADER TO A DIFFERENT KIND OF LEADER????
Message 5 of 34

YES!

Could you post a small drawing with before & after leaders in it?

wrote in message news:5193058@discussion.autodesk.com...
IS THERE A WAY TO CONVERT A LEADER TO A DIFFERENT KIND OF LEADER????
Message 6 of 34

I attached three kinds of leaders that we use. I hope I did it right because this is my first time attaching a picture.

It is a bmp file.

Thanks
Message 7 of 34

So the loop leader, does it use a block for the loop symbol? The other 2 are
typical arrowhead types and those are quite easily swapped.

(defun c:swapdot (/ ent obj)
(vl-load-com)
(princ "\nSelect leader: ")
(if (setq ent (ssget ":S" '((0 . "LEADER"))))
(progn
(setq obj (vlax-ename->vla-object (ssname ent 0)))
(if (= (vla-get-arrowheadtype obj) acArrowDefault)
(vla-put-arrowheadtype obj acArrowDotSmall)
(vla-put-arrowheadtype obj acArrowDefault)
)
)
)
(princ)
)


wrote in message news:5193068@discussion.autodesk.com...
I attached three kinds of leaders that we use. I hope I did it right because
this is my first time attaching a picture.

It is a bmp file.

Thanks
Message 8 of 34

Easy:
You could grip all the leaders you want to update and from the Properties
window select "User Arrow" which will prompt you for a block name.

OR....

Not Easy:
Here is the gist of some code you could use (assuming you have defined a
"loop" block for the arrowhead and it's loaded in the current drawing):

(setq leader (entsel "\nSelect Leader: "))
(setq leader (vlax-ename->vla-object (car leader)))
(vla-put-ArrowheadBlock a "loop")

Josh

wrote in message news:5192997@discussion.autodesk.com...
Is there a way to have the Arrow leader convert to Loop leader in one click.
Our company standards use diamond tags and sometimes i have to change the
arrow to loop by inserting a leader.

Thanks
Message 9 of 34

I guess there is a Loop nested block somewhere here. I'll give the code a try
Message 10 of 34

this works great! now i need to find a way somehow to have it convert to loop.

i need loop to arrow and vice versa
Message 11 of 34

HOW DO I MAKE THIS ARROW CONVERT TO LOOP???

this is harder than i thought.

Please help.=)
Message 12 of 34

I also notice that its not following the Dimscale setup for it. how do we fix this??
Message 13 of 34

YES IT USES BLOCK FOR THE LOOP SYMBOL CALLED "LOOP"
Message 14 of 34

It uses the Dimscale already in place. I have not changed anything with
regard to that. I would again ask that you post a small drawing withe the
before & after dimensions in it. It will save me having to ask these
questions or take a guess as to what you need.

Load and run this "whatarrow" and paste back what it puts to the command
line. It will help to figure this out....use it on the different types of
leaders you use.

(defun c:whatarrow (/ obj mylist)
(if (setq obj (car (entsel "Select leader: ")))
(progn
(setq obj (vlax-ename->vla-object obj))
(setq mylist (cons (vla-get-arrowheadblock obj) mylist))
(setq mylist (cons (vla-get-arrowheadtype obj) mylist))
(setq mylist (cons (vla-get-ScaleFactor obj) mylist))
)
)
(print mylist)
(princ)
)


wrote in message news:5193216@discussion.autodesk.com...
I also notice that its not following the Dimscale setup for it. how do we
fix this??
Message 15 of 34

OK, I think this will do it......

(defun c:swaploop (/ ent obj)
(vl-load-com)
(princ "\nSelect leader: ")
(if (setq ent (ssget ":S" '((0 . "LEADER"))))
(progn
(setq obj (vlax-ename->vla-object (ssname ent 0)))
(if (= (vla-get-arrowheadtype obj) acArrowDefault)
(vla-put-arrowheadblock obj "loop")
(vla-put-arrowheadblock obj "")
)
)
)
(princ)
)


"Jeff Mishler" wrote in message
news:5193188@discussion.autodesk.com...
It uses the Dimscale already in place. I have not changed anything with
regard to that. I would again ask that you post a small drawing withe the
before & after dimensions in it. It will save me having to ask these
questions or take a guess as to what you need.

Load and run this "whatarrow" and paste back what it puts to the command
line. It will help to figure this out....use it on the different types of
leaders you use.

(defun c:whatarrow (/ obj mylist)
(if (setq obj (car (entsel "Select leader: ")))
(progn
(setq obj (vlax-ename->vla-object obj))
(setq mylist (cons (vla-get-arrowheadblock obj) mylist))
(setq mylist (cons (vla-get-arrowheadtype obj) mylist))
(setq mylist (cons (vla-get-ScaleFactor obj) mylist))
)
)
(print mylist)
(princ)
)


wrote in message news:5193216@discussion.autodesk.com...
I also notice that its not following the Dimscale setup for it. how do we
fix this??
Message 16 of 34

Please post a .png next time (they are much smaller.)

--
R. Robert Bell


wrote in message news:5193068@discussion.autodesk.com...
I attached three kinds of leaders that we use. I hope I did it right because
this is my first time attaching a picture.

It is a bmp file.

Thanks
Message 17 of 34

THIS ONE WORKS BUT THEN IT DOESNT FOLLOW THE SCALE.

After I convert the arrow to loop, it gets big. five 3 times the size of the regular loop.

Thanks
Message 18 of 34

Ralph, this is the last time I'll ask......please post a drawing with the
leaders (how you want them) in it. Both before & after they are changed. If
you look at the code I posted, you'll see that I do nothing with the scale.
Whatever the leader's scale was before, it still is after........


wrote in message news:5194303@discussion.autodesk.com...
THIS ONE WORKS BUT THEN IT DOESNT FOLLOW THE SCALE.

After I convert the arrow to loop, it gets big. five 3 times the size of the
regular loop.

Thanks
Message 19 of 34

FOR STANDARD ARROW

LEADER Layer: "G-ANNO-TEXT-NOTE-N"
Space: Model space
Handle = 32d5
associative: no
Normal: X= 0'-0" Y= 0'-0" Z= 0'-1"
Horizontal direction: X= 0'-1" Y= 0'-0" Z= 0'-0"
Vertex: X=243'-5 15/32" Y=412'-11 23/32" Z= 0'-0"
Vertex: X=243'-5 21/32" Y=412'-11 31/32" Z= 0'-0"
Vertex: X=243'-5 25/32" Y=412'-11 31/32" Z= 0'-0"
Hook Line: Off
Arrow: On
Path type: Straight
Associated to: MTEXT Handle = 32D6
dimension style: "Aec-Arch-I-96$7"
dimension style overrides:
DIMASZ 1/8"
DIMGAP 1/32"
DIMSCALE 1.000000
DIMTAD 0
DIMTXSTY STANDARDN
DIMTXT 7/64"
=============
FOR STANDARD DOT

LEADER Layer: "G-ANNO-TEXT-NOTE-N"
Space: Model space
Handle = 32db
associative: no
Normal: X= 0'-0" Y= 0'-0" Z= 0'-1"
Horizontal direction: X= 0'-1" Y= 0'-0" Z= 0'-0"
Vertex: X=243'-6 9/16" Y=412'-11 3/4" Z= 0'-0"
Vertex: X=243'-6 23/32" Y=412'-11 61/64" Z= 0'-0"
Vertex: X=243'-6 55/64" Y=412'-11 61/64" Z= 0'-0"
Hook Line: Off
Arrow: On
Path type: Straight
Associated to: MTEXT Handle = 32DC
dimension style: "Aec-Arch-I-96$7"
dimension style overrides:
DIMASZ 3/64"
DIMGAP 1/32"
DIMLDRBLK Dot
DIMSCALE 1.000000
DIMTAD 0
DIMTXSTY STANDARDN
DIMTXT 7/64"
=======================
AFTER SWAPPING [this is the dot from your routine]

LEADER Layer: "G-ANNO-TEXT-NOTE-N"
Space: Model space
Handle = 32d9
associative: no
Normal: X= 0'-0" Y= 0'-0" Z= 0'-1"
Horizontal direction: X= 0'-1" Y= 0'-0" Z= 0'-0"
Vertex: X=243'-6 25/64" Y=412'-11 3/8" Z= 0'-0"
Vertex: X=243'-6 37/64" Y=412'-11 5/8" Z= 0'-0"
Vertex: X=243'-6 23/32" Y=412'-11 5/8" Z= 0'-0"
Hook Line: Off
Arrow: On
Path type: Straight
Associated to: MTEXT Handle = 32DA
dimension style: "Aec-Arch-I-96$7"
dimension style overrides:
DIMASZ 1/8"
DIMGAP 1/32"
DIMLDRBLK DotSmall
DIMSCALE 1.000000
DIMTAD 0
DIMTXSTY STANDARDN
DIMTXT 7/64"



after I use the "swapdot" command, it doesn't say any errors, it goes back to command line.
Message 20 of 34

BMP FILE HERE

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

Post to forums  

Autodesk Design & Make Report

”Boost