Author Topic: Dynamic Intelligent Leader !  (Read 183276 times)

0 Members and 1 Guest are viewing this topic.

Aerdvark

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #60 on: August 24, 2009, 08:24:35 AM »
One of the best pieces of coding I ever found !! Thank you for sharing it on this forum.

I'd like to use it in combination with menu macro's (.mnu file), ie:

Code: [Select]
[Free Leader]^C^Cdila;m;That one works.

Code: [Select]
[Edit Leader]^C^Cdiledit;That works too, duh..

And this one doesn't work, I would like it to only prompt for "selecting object" and "text location"...:

Code: [Select]
[Leader 16mm]^C^Cdila;m;pause;pause;16mm;
I know it can be done within the coding but it can also be done in the .mnu file for other functions also work properly like "-insert":

Code: [Select]
[B1,Button 1]^C^C-insert;b1;s;$m=$(getvar,userr1)
Any help / solution is much appreciated.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #61 on: August 24, 2009, 08:48:49 AM »
Aerdvark ...first...welcome to theswamp !

thanks for the comment....i'll try to do something for that..
Keep smile...

Aerdvark

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #62 on: August 24, 2009, 09:04:24 AM »
Okay, thanks in advance !

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #63 on: August 24, 2009, 01:21:05 PM »
Well...

there we go....


DILEADER v.1.9
(Dynamic Intelligent Leader)

This release have some bug fix and a new option.

- Reactor for GRIPS was remake with :vlr-objectmodified to allow
  DiLeader to readjust the Leader when the Object is modified via
  the Propreties ToolPalette (MLEADER do not allow that ;-) )
- New Text Prompt to allow user to custom cui or mnl/mnu
- Bug fix when copying object with leader even with grips command
- Bug Fix for Annotative Mtext with DILEDIT command
- Bug Fix when Arrow switched - multi-language compatible

example of script to custom menu
Code: [Select]
^c^c^pdila;t;[color=navy]My text here[/color];
Code: [Select]
^c^c^pdil;m;

enjoy !
Keep smile...

KewlToyZ

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #64 on: August 24, 2009, 03:44:08 PM »
Hello Andrea, where are you controlling the leader head & text size factors specifically?
I use my dimscale but I need a different factor for my scaling.

Edited, should have re-read the post first my apologies :)
DiLEADER 1.1
Dynamic Intelligent Leader

Update 1
I have replaced the DL_textsize variable to take the existing
DIMTXT when Updated and the DIMTXT against TEXTSIZE when created.

Code: [Select]
(setq DL_textsize (vla-get-Height (vlax-ename->vla-object TXTobj)))
(setq DL_textsize (getvar "DIMTXT"))

Update 2
I use vlax-curve-getClosestPointTo
against vla-intersectwith This modification show diffrent leader reaction...but work better.

Update 3
I also updated the code to put the Arrow size as per DIMASZ
Code: [Select]
(vla-put-ArrowheadSize (vlax-ename->vla-object Llead) (getvar "DIMASZ"))
Update 4
Left/Right justification text was improved when object as been updated.

Update 5
and finaly..
the "NOTE" in the Mtext still there when moving the mouse to show dinamicly a preview..
but it will be gone when picking the loccation text.

Code: [Select]
(entmod (subst (cons 1 "") (assoc 1 (entget Ltext)) (entget Ltext)))
Let me know if all work ok.
thanks.

CAB.
I need to install 2000 for test..




« Last Edit: August 24, 2009, 03:59:55 PM by KewlToyZ »

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #65 on: August 24, 2009, 06:25:26 PM »
Hi KewlToyZ ...

All fix as been done few release ago... :wink:

your Update #3 have been done like this.
Code: [Select]
(vla-put-arrowheadsize
             (vlax-ename->vla-object llead)
             (* (getvar "DIMSCALE") (getvar "DIMASZ"))
           )

Keep smile...

Lee Mac

  • Seagull
  • Posts: 12928
  • London, England
Re: Dynamic Intelligent Leader !
« Reply #66 on: August 24, 2009, 06:57:20 PM »
I admire your continued effort in this program... it must be getting close to perfect by now....   ;-)

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #67 on: August 24, 2009, 08:40:40 PM »
I admire your continued effort in this program... it must be getting close to perfect by now....   ;-)

thanks...:)

I don't realy know when to considere a program is finished....anyone know ?  :lol:
I think that a program is finished when the owner decide that is finished..
it's like painting...

for my own....DiLeader is near the end.....but I have to many idea to improve this program.

- Multi-Leader (similar to this)
- Switch Leader to another object simply on Stretch on it
- Text/Mtext conversion
- Use Field
- Keep Link on object Mirrored or Copied
- Text attachement location
- use RTEXT
- use blocks Identification with attributes (similar to this)
- etc..... etc...

« Last Edit: August 24, 2009, 08:55:13 PM by Andrea »
Keep smile...

Aerdvark

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #68 on: August 25, 2009, 07:13:30 AM »
Hi Andrea,

Thank you for this great miracle! It allready is in my menu :-)
There is one thing I changed: the line "(alert "item added") for it reacts on the usual copy command. I changed "alert" into "princ".

In this case the routine stays the same only the alertbox is changed into a message on the command line.

I'd rather not use alertboxes in commands for they are annoiing (sorry I'm dutch).

If you want to have some more "wishes" to modify the routine: how about a leader that points two objects?

See image below.

Kind regards,
Marco.


Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #69 on: August 25, 2009, 08:17:55 AM »
Lol !! Forgot to remove my test alert...
thanks.   :-)

Yes, this feature is one of the list...

version 9.1.1 below (alert box removed)
Keep smile...

Lee Mac

  • Seagull
  • Posts: 12928
  • London, England
Re: Dynamic Intelligent Leader !
« Reply #70 on: August 25, 2009, 08:26:05 AM »
I've done that so many times...  :oops:

GDF

  • Water Moccasin
  • Posts: 2081
Re: Dynamic Intelligent Leader !
« Reply #71 on: August 25, 2009, 10:32:23 AM »
Andrea

Very nice.
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

mdbdesign

  • Newt
  • Posts: 52
Re: Dynamic Intelligent Leader !
« Reply #72 on: August 25, 2009, 12:58:24 PM »
Very nice, thank you.
Add it into my leader macro: ^C^C(LOAD "DILEADER") -la;set;text;;_dil \\\^C^C-la;set;text;;select;\tcircle;p;;0.25;S;V;
Marek

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #73 on: August 25, 2009, 02:03:01 PM »
Thank you guys..

mdbdesign....I didn't test it...but did you tried to use *^c^c....  for repeat action ?

what's next !??...

MDiLEADER    
(Multiple Dynamic Intelligent Leader)

Coming soon....;-)

overview...
Keep smile...

KewlToyZ

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #74 on: August 25, 2009, 02:11:17 PM »
 :-o
Holy crap! lol
I got to see this.