After numerical increment add Northing Easting dynamically in multileader

After numerical increment add Northing Easting dynamically in multileader

ishaq03
Advocate Advocate
775 Views
8 Replies
Message 1 of 9

After numerical increment add Northing Easting dynamically in multileader

ishaq03
Advocate
Advocate

Hi to All,
I have a lisp which created numerical increment in multileader command provided by Pbejse in this forum previously,
Now my questions is can we add northing easting coordinate below the numeric increment dynamically Via use Insert Field formula . I am attaching the previous lisp command here and attaching video for more understanding.

 

 

Please find the link below for previous discussion for numeric increment for multileader

 

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/numeric-increment-along-with-multile...

0 Likes
Accepted solutions (1)
776 Views
8 Replies
Replies (8)
Message 2 of 9

ВeekeeCZ
Consultant
Consultant

I see that it's pretty hot up there, is it the reason why you're so eager?

 

While you wait, there are plenty of examples already, just search for a while and learn.

0 Likes
Message 3 of 9

ishaq03
Advocate
Advocate

Thanks beekee,

It's very hot here, but I'm eagerly waiting for the right answer. I already checked but I didn't find any lisp as per my requirement. May be  I failed to search in the right direction if you find something as per my need please provide here. Again my requirement is after numerical increment in multileader below should be Northing Easting Coordinates dynamical as per explained in the video.

0 Likes
Message 4 of 9

calderg1000
Mentor
Mentor

Regards @ishaq03 

It is possible that you will find in the Network, several routines that give you the information that you require. But not through FIELD.

 


Carlos Calderon G
EESignature
>Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

0 Likes
Message 5 of 9

ronjonp
Mentor
Mentor

@ishaq03 Give this quick mod a try:

 

(defun c:incat (/ _padzeros e e2 h o p1 p2 prefix s startnos)
  (defun _padzeros (s l)
    (if	(< (strlen s) l)
      (_padzeros (strcat "0" s) l)
      s
    )
  )
  (if (and (setq prefix (getstring "\nEnter Prefix string value"))
	   (setq startnos (getint "\nEnter Start number: "))
      )
    (progn
      (setvar 'cmdecho 0)
      (while
	(and (setq p1 (getpoint "\nPick target point")) (setq p2 (getpoint p1 "\nText Location")))
	 (command "_Mleader" "_non" (trans p1 1 0) "_non" (trans p2 1 0) "")
	 (setq o (vlax-ename->vla-object (setq e (entlast)))
	       s nil
	       s (ssadd)
	       s (ssadd e s)
	 )
	 ;; RJP » 2022-08-25
	 ;; Added field linked to point placed on arrowhead point
	 (setq e2
		(entmakex (list	'(0 . "POINT")
				(assoc 8 (entget e))
				(cons 10 (mapcar '+ '(0 0 0) (vlax-invoke o 'getleaderlinevertices 0)))
			  )
		)
	 )
	 (setq s (ssadd e2 s))
	 (setq h (itoa (vla-get-objectid (vlax-ename->vla-object e2))))
	 (vla-put-textstring
	   o
	   (strcat prefix
		   "-"
		   (_padzeros (itoa startnos) 3)
		   "\\P%<\\AcObjProp Object(%<\\_ObjId "
		   h
		   ">%).Coordinates \\f \"%lu2%pt1%pr3\">%\\P"
		   "%<\\AcObjProp Object(%<\\_ObjId "
		   h
		   ">%).Coordinates \\f \"%lu2%pt2%pr3\">%"
	   )
	 )
	 (command "_.group" "_Create" "*" "*" s "")
	 (setq startnos (1+ startnos))
      )
      (command "_.regen")
      (setvar 'cmdecho 1)
    )
  )
  (princ)
)

 

 

 

 

0 Likes
Message 6 of 9

ishaq03
Advocate
Advocate

Hi ronjonp,

Thanks for your support,It's perfect as my need, But only the precision more than 3 Digit how to control this please advise.

  

 

 

 

 

ishaq03_0-1661491442281.png

 

0 Likes
Message 7 of 9

ronjonp
Mentor
Mentor
Accepted solution

@ishaq03 Code updated above:

ronjonp_0-1661522798172.png

 

0 Likes
Message 8 of 9

ishaq03
Advocate
Advocate

@ronjonp 

Thanks for your solution now it's perfect.

0 Likes
Message 9 of 9

ronjonp
Mentor
Mentor

@ishaq03 wrote:

@ronjonp 

Thanks for your solution now it's perfect.


Glad to help. 🙂

0 Likes