BIGAL Posted July 27, 2016 Share Posted July 27, 2016 We import from our GIS street maps inculding names and Street numbers. One of the things we do is often use a UCS so a street is shown as horizontal on the sheet, the only problem is that the street numbers are still at the angle of true world co-ords. I had a search for a auto rotate text to view etc but did not find anything suitable, found some stuff but its not 100% meeting task. If some one has something please let me know. Anyway as a work around if you have CIV3D you can do it fairly simple, take the text export it to a csv file and read it back in as CIV3D points apply a lable style showing description (original text) that has "orient to view" set and the text will always be displayed horizontal. ; converts text to xyz with text description ; ; by Alan H July 2016 (defun stnumlable ( / ss x y) (setq oldsnap (getvar "osmode")) (setvar "osmode" 0) (alert "Make sure you have only the correct text layer on\n \nPress Esc now if you need to exit") (setq ss (ssget)) (setq y (sslength ss)) (alert (strcat "You have picked " (rtos y 2 0 ) " St Numbers")) (setq x (- (getint "Enter start point number") 1)) ;subtract 1 then add on in while (setq fo (open "c:\\acadtemp\\Stnames.xyz" "W")) (repeat (sslength ss) (setq en (entget (ssname ss (setq y (- y 1))))) ; Entity type (setq entyp (cdr (assoc 0 en))) (if (= entyp "TEXT") (progn (setq xyz (cdr (assoc 10 en))) (setq txtstr (cdr (assoc 1 en))) (WRITE-LINE (STRCAT (RTOS (setq X (+ x 1)) 2 0) "," (RTOS (car xyz) 2 2) "," (RTOS (cadr xyz) 2 2) "," "0.0" "," txtstr) fo) ) ) ;end while ) (close fo) (alert "All done") (setvar "osmode" oldsnap) ) ; defun (princ ) (stnumlable) Quote Link to comment Share on other sites More sharing options...
abra-CAD-abra Posted July 28, 2016 Share Posted July 28, 2016 BIGAL, I use the following by alanjt: http://www.cadtutor.net/forum/showthread.php?41290-ZeroRotation.lsp-Set-rotation-of-objects-to-zero-(based-on-current-UCS) You may be able to modify it to suit your specific requirements. Cheers Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 28, 2016 Author Share Posted July 28, 2016 Close abr-CAD-abra it sets text to current ucs but I have 2 layouts which are orientated 90deg apart so ucs1 text correct, ucs2 its at 90 which is my problem. Quote Link to comment Share on other sites More sharing options...
abra-CAD-abra Posted July 28, 2016 Share Posted July 28, 2016 An alternative approach, if I understand correctly: Using an attributed block (annotative) with 'Match Orientation to Layout' on: Substitute all street name text entities with the named attributed block. The attribute value will be the text string of each street name(s). Delete the original text string. Code something like this: http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-to-substitute-text-to-blocks-at-point-location/td-p/3585322 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 28, 2016 Author Share Posted July 28, 2016 That sounds like what I want "Match Orientation" will have a play. Adding blocks is no prob. Quote Link to comment Share on other sites More sharing options...
iconeo Posted August 4, 2016 Share Posted August 4, 2016 For the block the text needs to be annotative. The annotative style does not need match to layout on. The text properties should be annotative yes with match orientation yes. I think this is what your looking for... Drawing3.dwg Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 5, 2016 Share Posted August 5, 2016 Hi BIGAL, no doubt you already know about Lee's http://www.lee-mac.com/2dprojection.html which was spawned from one of SEANT's? I have never used this one, may well be what you are after. Thanks Lee Mac & SEANT! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 5, 2016 Author Share Posted August 5, 2016 Iconeo thank you thats exactly what I wanted, works with multiple ucs and text is horizontal. I will have a good look at it and post a solution to my problem. Dadgad thanks also. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 5, 2016 Author Share Posted August 5, 2016 My hopes were dashed I am still going in circles, all I need in the block is one single attribute "st name" no line work, no extra anything, but the attribute text must appear horizontal no matter what UCS I use. If we need a line as a reference then put it on defpoints. Quote Link to comment Share on other sites More sharing options...
srini Posted August 5, 2016 Share Posted August 5, 2016 pls. post the dwg. in cad, so its easier to understand what you want to do in cad with blocks. better save it to cad 2010 and post it. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 6, 2016 Author Share Posted August 6, 2016 srini I thought I was clear create a block and all it has is one single attribute no lines, no arcs, no nothing else, the value of the attribute is a street number, it must always be horizontal no matter what UCS angle it seen in a layout, the UCS has no Z plane always = 0 Quote Link to comment Share on other sites More sharing options...
steven-g Posted August 6, 2016 Share Posted August 6, 2016 (edited) Could you humor us and post a block that isn't working, because looking at the info that is being given it does work for me. The lines and circles are just to show the orientation of the viewports. Edited August 6, 2016 by steven-g Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 7, 2016 Author Share Posted August 7, 2016 steven-g the problem how do I create it ! I know how to create a block with attributes etc but if I change the ucs the text appears at the wrong angle. Its about the dynamic settings. Thats what I am having problems with please post screen capture showing the steps etc. Where is this 'Match Orientation to Layout' new block.dwg Quote Link to comment Share on other sites More sharing options...
steven-g Posted August 7, 2016 Share Posted August 7, 2016 It's in a couple of places Text Style dialogue, and there is a similar option in the create block dialogue. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 7, 2016 Author Share Posted August 7, 2016 Thanks Steven-g and abr-CAD-abra the most obvious answer was right in front of me all the time. You look and just can not see. We do a bit of cleaning up of our GIS output so will add the correct style to all the text easy done. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.