Jump to content

Recommended Posts

Posted

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.

Posted

Have you tried Lee Mac's site? I've seen one somewhere out there.

Posted

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.

Posted
Have you tried Lee Mac's site? I've seen one somewhere out there.

 

Thanks for the plug Tyke :D

Posted

aww Lee :)

 

I will take a look at it tomorrow - off for an work event (with beer) now :)

Posted
Thanks for the plug Tyke :D

 

Don't mention it Lee :wink:

Posted

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 :)

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

Posted
Some people have all the luck :wink: and others have to work.

 

All work and no play makes Tyke a sad Yorkshire :wink:

Posted
All work and no play makes Tyke a sad Yorkshire :wink:

 

:thumbsup: perhaps I' just a little envious :wink:

Posted
Awesome Lee! Thanks a million!

 

You're very welcome :)

 

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 :)

 

That sounds brilliant - especially the beer part! :P

Posted

If you would drink the beer FIRST, the course would be much more challenging.

Posted
If you would drink the beer FIRST, the course would be much more challenging.

 

Or much more enjoyable... (un)fortunatly, there was a no-alcohol-policy on the course - even those that where done and on the ground had to be sober.

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