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

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Dynamic Intelligent Leader !
« Reply #360 on: December 04, 2014, 08:13:32 AM »
Perhaps write it like this:
Code - Auto/Visual Lisp: [Select]
  1.   (setq lm (vl-registry-read "HKEY_CURRENT_USER\\Software\\DuctiSoft\\ObjectDCL ARX" "InstallDir"))
  2.   (findfile (strcat lm "\\ODCL_LM.vlx"))
  3.   (load lm)
  4. )
STRCAT will Sh!+ the bed if you pass it a null value. Although that still does not fix that the registry value is not there...

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #361 on: December 04, 2014, 12:20:10 PM »
Perhaps write it like this:
Code - Auto/Visual Lisp: [Select]
  1.   (setq lm (vl-registry-read "HKEY_CURRENT_USER\\Software\\DuctiSoft\\ObjectDCL ARX" "InstallDir"))
  2.   (findfile (strcat lm "\\ODCL_LM.vlx"))
  3.   (load lm)
  4. )
STRCAT will Sh!+ the bed if you pass it a null value. Although that still does not fix that the registry value is not there...

you'r right... :) thannk you.
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #362 on: December 04, 2014, 12:21:20 PM »
Code: [Select]
(if (setq LM
   (findfile
     (strcat
       (vl-registry-read "HKEY_CURRENT_USER\\Software\\DuctiSoft\\ObjectDCL ARX" "InstallDir")
       "\\ODCL_LM.vlx"
       )
     )
  )
  (load LM)
  )

Hello Andrea, Sorry to bother you again, but I get this error message when I attempt to run the code suggested in my startup lisp.

; error: bad argument type: stringp nil

Any ideas?

KR. Robbo

This mean that the
Code: [Select]
(vl-registry-read "HKEY_CURRENT_USER\\Software\\DuctiSoft\\ObjectDCL ARX" "InstallDir")
return Nil.
Keep smile...

ifncdylan

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #363 on: March 05, 2015, 12:14:21 AM »
Andrea, this lisp code is amazing. Thank you for your efforts to create it. There is certainly a helluva lot going on in the code.

I have a routine which I have written which extracts the length property of any line or polyline as a text string and then places an MTEXT object with that length pre-written.

Then I use the DILATTACH command to attach that MTEXT object to the line. Then I might modify the line, making its length longer. I would love for the DILEADER script to be able to then re-calculate the length and update it in the leader text.

Do you have any advice about how I would go about my modification to your DILEADER script to make that occur? Thanks again for the awesome work.

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #364 on: March 05, 2015, 08:59:43 AM »
Andrea, this lisp code is amazing. Thank you for your efforts to create it. There is certainly a helluva lot going on in the code.

I have a routine which I have written which extracts the length property of any line or polyline as a text string and then places an MTEXT object with that length pre-written.

Then I use the DILATTACH command to attach that MTEXT object to the line. Then I might modify the line, making its length longer. I would love for the DILEADER script to be able to then re-calculate the length and update it in the leader text.

Do you have any advice about how I would go about my modification to your DILEADER script to make that occur? Thanks again for the awesome work.


Hi ifncdylan,

First,..let me be the first to wish you "Welcome to the Swamp" :)
thank you for using DiLeader...many people use it.

you can modify the code for your convenance.
I suggest you to check the mywrittentext variable and put the field code in it.
If you need help, please let me know.

cheers.
Keep smile...

ifncdylan

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #365 on: March 05, 2015, 10:35:35 PM »
Thanks for that advice Andrea, I have gotten it to calculate the length of the line when I first run the DIL command:

Code - Auto/Visual Lisp: [Select]
  1. 314  (if dqobject
  2. 315    (progn
  3. 316
  4. 317           (setq mywrittentext (strcat "*" CONDUITTYPE "*\n*" (rtos (+ (roundup (vla-get-length (vlax-ename->vla-object (car dqobject))) 0.5) 0) 2 1) "*")
  5. 318            llayer (vla-get-layer (vlax-ename->vla-object (car dqobject))))
  6. 319            (princ "\nPick Text location...")
  7.  

Roundup is a function I have made which rounds a number up to the nearest 0.5 (or whatever number you give it). This gives me a string of *P23* *39.5* for a line that is 39.14 long, for example.

I am also writing CONDUITTYPE to xdata on the dqobject, and then in the reactors, pulling that XDATA back out so each of my leaders updates with the correct type of conduit and length each time I modify the line.

I will clean up the code a bit and then post it here, if anyone might want to use automatic conduit length calculating leader. :)

nirav

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #366 on: March 09, 2015, 07:15:13 PM »
Thanks Andrea.

That lisp looks very useful.

-Nirav

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #367 on: March 26, 2015, 01:25:41 PM »
Hi All,...

Since this tool was created,...
many request was sent on my mail..
so...

I'm proud to announce you that a new version of DILEADER is comming...
unlimited flexibility...many options added, all know bug was fixed,..

New add-on:

- New option allowing LISP evaluation expression
- New option allowing Field String
- Add Suffix and Prefix String
- New Ribbon Menu
- Reactor add regen to update field
- New addition, + - Key added on DILEDIT for arrow resizing
- New addition, TAB key added on DILEDIT for Arrow block switch
-"NOTE" string preview replaced by MTJIGSTRING variable
- New option allowing to use BLOCK with attribute
- DILALIGN offer now Vertical or Horizontal Alignement
- Auto-MTEXT justification can be readjusted
...many more..

Few preview...




« Last Edit: March 26, 2015, 01:29:16 PM by Andrea »
Keep smile...

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #368 on: March 26, 2015, 01:28:17 PM »
More...
Keep smile...

Lee Mac

  • Seagull
  • Posts: 12916
  • London, England
Re: Dynamic Intelligent Leader !
« Reply #369 on: March 26, 2015, 01:55:48 PM »
Very impressive Andrea!  :-)

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #370 on: March 26, 2015, 03:35:06 PM »
Very impressive Andrea!  :-)

Thank you Mr. Mac, :)

I forget to mention that DiLeader can also use LISP function and Variable as Text or Attribute.  :)
Keep smile...

francinez

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #371 on: March 30, 2015, 08:59:16 AM »
Hello,
Just a question: on this lisp is it possible to use mleader instead of leader?
The raison is that by mleader I can add or remove leader

Thanks

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Dynamic Intelligent Leader !
« Reply #372 on: March 30, 2015, 02:50:39 PM »
Hello,
Just a question: on this lisp is it possible to use mleader instead of leader?
The raison is that by mleader I can add or remove leader

Thanks

Hello Francinez,..
first,..Welcom to the swamp !  :)

Mleader have limited options..
DiLeader allow to add Leader at any time..
(see gif below)
Keep smile...

bilançikur

  • Newt
  • Posts: 82
Re: Dynamic Intelligent Leader !
« Reply #373 on: March 31, 2015, 01:52:50 AM »
Hi Andrea,

I am sure I have never seen such a complete program, written in LISP, with such nice interface and cool functions.
This will be of use for many people, and it is freeware still. My compliments for your great work.

Hopefuly people will get to know more of your programs, the free and non free stuff.
Personally I like the sDuct program as to be one of my favorites.

francinez

  • Guest
Re: Dynamic Intelligent Leader !
« Reply #374 on: March 31, 2015, 03:48:18 AM »
Andrea, thank you for your quick response

The raison of mleader is that I have autocad 2013 and multileader has been enhanced with additional tools. So if your lisp dileader would be implemented with mleader it would be top.

Regards
Francine