Points to a Z-height based on
I seem to remember that there have been routines posted here that can create Points with a Z-value based on Text-objects - but I can't seem to find it! Anyone remember the same thing? Anyone have any better luck at finding it?To clairfy a bit more what I am after: I get files from landscapers with new road layouts and such and they are schock-full with Z-heights, all typed out in MText. The files themselves have no Z-values on any objects. I want to take these Z-heights and get a point set at the insertion point of the Text, at the Z-height that the Text says. Makes sense?
Like I said, I am not asking for a routine like that - I am just so sure that I have seen it somewhere so I am asking for help with the Search. Have you tried Lee Mac's site? I've seen one somewhere out there. Hi Tiger,
Maybe something like this?
(defun c:test ( / en i pt ss zv ) (if (setq ss (ssget '((0 . "TEXT,MTEXT")))) (repeat (setq i (sslength ss)) (setq en (entget (ssname ss (setq i (1- i))))) (if (and (eq "TEXT" (cdr (assoc 0 en))) (or (< 0 (cdr (assoc 72 en))) (< 0 (cdr (assoc 73 en))) ) ) (setq pt (cdr (assoc 11 en))) (setq pt (cdr (assoc 10 en))) ) (if (setq zv (distof (cdr (assoc 1 en)))) (entmakex (list (cons 0 "POINT") (list 10 (car pt) (cadr pt) zv) ) ) ) ) ) (princ))
It will work for Text/MText with any alignment. It will use your current settings for CLAYER/CECOLOR/CELTYPE/THICKNESS etc, however, the code could be altered to match these settings for the selected Text items.
Thanks for the plug Tyke aww Lee
I will take a look at it tomorrow - off for an work event (with beer) now
Nice!...
Don't mention it Lee :wink: Awesome Lee! Thanks a million!
The work-event (with beer) was an outing with my little part of the company into the woods for a High-rope course. We climbing about 15meters up a tree and "walked" across lines, poles, wires, ladder-esque things to the next tree - and the next tree - and the next... my arms hurt today I might add.
But I did get beer in the end
Some people have all the luck :wink: and others have to work.
All work and no play makes Tyke a sad Yorkshire :wink:
页:
[1]
2