Jump to content

Recommended Posts

Posted

can anyone create lisp help, so the "measure" attribute of line can be extracted and put above the line as mtext with ft(') symbol.

image.png.12ef2b2a977cd3cf44265724cba1eb22.png

test.dwgFetching info...

Posted

The length of a line is just the distance between its start and end point, so:

(if (setq ss (ssget "_+.:E:S" '((0 . "LINE"))))
  (progn
    (setq enx (entget (ssname ss 0)))
    (setq measured (distance (cdr (assoc 10 enx)) (cdr (assoc 11 enx))))

    (princ "\nLength of the line is: ")
    (princ measured)
  )
)
(princ)

 

Posted

@smitaranjan The "OD:New_strand > Measured" property must be from a custom application or vertical. It does not show up in my properties when opening the drawing in vanilla AutoCAD, So personally I would not know how to extract it without knowing what created it.

 

@dexus Note - the property shown on the OP's drawing is a custom one, which seems to be a rounded representation of the length? In any case, it doesn't precisely match the actual length of the line (227.5203), as your routine pulls. The OP asked that the value of the property is to be extracted, but that is not a standard property of the line for AutoCAD.

  • Like 1
Posted
  On 1/7/2025 at 3:40 PM, pkenewell said:

@smitaranjan The "OD:New_strand > Measured" property must be from a custom application or vertical. It does not show up in my properties when opening the drawing in vanilla AutoCAD, So personally I would not know how to extract it without knowing what created it.

 

@dexus Note - the property shown on the OP's drawing is a custom one, which seems to be a rounded representation of the length? In any case, it doesn't precisely match the actual length of the line (227.5203), as your routine pulls. The OP asked that the value of the property is to be extracted, but that is not a standard property of the line for AutoCAD.

YES. The solution I GOT IT. Can be done and extracted with "MAPANNTEMPLATE" and then MAPANNTEXT(selecting the object property) and then using MAPANNINSERT can be placed.

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...