Jump to content

how to find out highest value in a sheet


pmadhwal7

Recommended Posts

Dear all

please help me to find out what is the highest value in a sheet, parallel inside the blue line and those who are crossing that blue line, as in the sample I have attached, the highest value Is 3.50 meters

Depth.dwg

Edited by pmadhwal7
Link to comment
Share on other sites

Just get a selection set of text or mtext search the text for "Depth" pull that line out, then parse out the numeric value, compare and keep the biggest number , up to you what to do next.

 

The pull apart mtext not in my collection. Need to find.

 

;Author hak_vz 

(defun string_to_list ( str del / pos )
	(if (setq pos (vl-string-search del str))
		(cons (substr str 1 pos) (string_to_list (substr str (+ pos 1 (strlen del))) del))
		(list str)
	)
)

(setq eo (vlax-ename->vla-object (car (entsel "\nSelect MTEXT  >"))))
(setq txt (vlax-get eo 'TextString))
(setq tlist (string_to_list txt "\\P"))

 

Edited by BIGAL
Link to comment
Share on other sites

I just provided the method not solution you have asked often enough that you should be starting to do on your own thing.

 

Use (setq ss (ssget (list (cons 0  "text,mtext")))) then just go through the selection use the string to list, look at each line, does it have "Depth" if yes get the numeric value, hint Lee-mac, compare is it bigger than prior value if yes save.

 

Cadtutor is here to help not necessarily a place to get code written for free. Have a go help is here when you get stuck.

Edited by BIGAL
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...