rotating text

Hi all,
I really need help with this, Im working on a topographical survey, I have the original with the all wrong levels, and a new processed points dwg which
has the new correct levels on. ALL levels are in exact same place but on the original they are rotated in line with the road and on the new 1 they are all at zero rotation. Is there a lisp routine out there that can rotate and posibly move the new levels so they are exactly where the old 1s are?
any help will be much appreciated, if u need more info let me know Thanks RS
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
A mass rotation routine is pretty simple if an insertion point can be the origin of the rotation.
The moving part is tougher. You said the "levels are in the exact same place", but then you said you want to"move the new levels so they are exactly where the old 1s are". I'm confused.
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
haha ye just read it, is a bit confusing. each level which is in text is accompanied by a point which is also the insertion point of the text, it wont be a case of a mass rotation because the angles change as the road curves round. once the text is rotated its not going to be much of a problem moving them to best fit (so it looks presentable basically), but the points stay where they are, if that makes sense.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
If you want these points to rotate around their insertion points that's good. If you want to rotate them by varying amounts, that's bad. It will require a human. If large groups of these points are to be rotated the same amount, that could be done by lisp, and might save the human some time.
--


MichaelB
www.michaelbulatovich.ca
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Remo Shiva wrote:

It does sound like fun.
If there is something already written, go with that. If all the text you want to rotate is the same rotation, fix one and match properties.
Silly question: it sounds like they are two different files. That true?
Can you tell me that they are the same points? I mean, if it is existing v.s. new grade THERE MAY NOT BE AN EXACT MATCH for each point. And you could end up with bad data by trying to do it the easy way.
BUT:
If you have all the text entities in one file, and there is a 1 for 1 match. Let me assume different layers and that text entities are approximately in the same places, you could make a selection set of the original points, in a FOREACH loop ( or somesuch device ) looking for an entity in the other layer "close by", change it's insertion point to that of the old text, and match the rotation.
More than I thumbnail sketch of the routine is the best I can do without lots of detail about the file(s). But I have written, borrowed and downright stolen similar routines.
Now, my crystal ball is clouding over. Later.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

i really isn't ;)

yep 2 different files, but it's nothing for me to bring them both into 1 file but on different layers, then wblock when its done.

the points are the same, and will remain the same, and the text is rotated and moved around those points to make it look presentable, trouble is because the road curves round the angle of the text is different throughout.

I have tried using 'matchprop' but it only changes angle of text and not base point as well. If u know of a comand that does both i rekon that would be the way to go.
thanks for ur help
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

If there is a simple command for this, I don't know about it.
Do you ever write any LISP? And how many pieces of text are there. I ask because there are some real simple snippets that would go a long way, or more time might be invested if there is very much work to be saved long term.
I suck at error checking.
But a few terse lines might look something like:
make selction set of the old text run a foreach loop on each entity in the selection look for a text entity in the other layer within a certain xy range use the assoc and subst to match exact location and rotation of new text
it would be ugly code, but not really rocket science.
you in a hurry?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

actually since i posted the question I got through bout 70% of the drawing so far, so I'll prob just stick with it, but this isnt the first time Ive had to do this and that little run down of what a lisp would look like sounds good, I know someone that could put all that in lisp form, I'm only good with the basic stuff like editing the acad.lsp for new commands and basic routines, nothing like that^^^.
anyway, thanks again for ur help, it's much apreciated RS
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Remo Shiva wrote:

your're no fun !!! ( chuckles softly )
if you have any left, try this snippet and see what happens.
(defun c:txtmtch (/ ent1 ent2 ent3 new old) (setq    ent1 (entget (car (entsel "\nPick Old Text Entity:")))     ent2 (entget (car (entsel "\nPick New Text Entity:"))) ) (setq    new (assoc 1 ent2) ;;;new text     old (assoc 1 ent1) ;;;old text     ent3 (subst new old ent1) ;;;new text entity ) (setq    new (assoc 8 ent2) ;;;new text layer     old (assoc 8 ent1) ;;;old text layer     ent3 (subst new old ent3) ;;;new text entity ) (entmake ent3)
(entdel (cdr (assoc -1 ent2))) (princ) )
brute force, I know. first attempt went awry since the DFX codes change between MTXT and the generic variety. different stuff to record in the DXF.
so I settled on creating a copy of the old text entity, merely replacing the text content and layer - old to new. then deleting the old "new" entity. kind of round abouts. ugly.
that much works on my end - adding a few lines to do a bunch all at once would not be that much effort. and like I said, that code is ugly. sorry.
I am going back to "work" now.
roy
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hmm,
What you're looking for I don't have. It also could be done with VB or VBA however. Using each insertion point you could reach out to the polyline in a bounding box fashion. By finding the intersections of the (invisible) text box and the selected polyline one could discern the local angle.
At any rate, you may be interested in http://www.caddproductivity.com/survey.htm
Using the Export function, write selected entities to a survey format (x,y,z,point#,description) *.csv (XL) file.
Then use the Import function to insert blocks, text, points and/or coordinate markers per each unique description. Unfortunately however, rotation is not currently an option.
Mark Frise www.caddproductivity.com
Remo Shiva wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.