attribute rotation

was I dreaming?
I seem to remember just a week or two ago I finally figured out how to rotate just the attributes in a block. never used attributes much because
they rotated with the block and I was too dumb to make them read "right".
it might have been a command, it could have been lisp. don't remember.
was I dreaming?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I do not recall where I picked this up but it works for me. hth Brian
;;; Attrot.lsp * ;;; Rotate attributes. Pick attributes one by one and rotate them * ;;; to an absolute angle. *
(defun C:ATTROT (/ ent entl alist ahdl ang) (initget " ") (while (and (setq ent (nentsel "\nPick an attribute: ")) (/= ent "")) (if (and ent (/= ent "")) (progn (setq entl (entget (car ent))) (if (/= (cdr (assoc 0 entl)) "ATTRIB") (setq ent nil) (if (not (member (setq ahdl (cdr (assoc 5 entl))) alist)) (setq alist (cons ahdl alist)) ) ) ) (setq ent nil) ) (initget " ") ) (if alist (setq ang (getangle "Specify new rotation angle: ")) ) (while alist (setq ent (handent (car alist)) entl (entget ent) ) (entmod (subst (cons 50 ang) (assoc 50 entl) entl)) (entupd ent) (setq alist (cdr alist)) ) )
"Roy Knapp" wrote in message

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Since the routine only allows single item selection, I can't see why this is better than the native ATTEDIT command. ATTEDIT allows (clunky) selection of multiple atts and can be easily incorporated into a custom routine to streamline that limitation. It also allows keyboard angle specification.
MichaelB www.michaelbulatovich.com
----- Original Message -----
Newsgroups: alt.cad.autocad Sent: Saturday, July 10, 2004 10:45 PM Subject: Re: attribute rotation

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I use this due to I only rotated some of the blocks. I am doing photo locations for bridge and/or building reports and need to drop in a block with the photo number. Approx. where from and to point in direction of photo. With the bridge photos I am using your "bseq" routine then fix the attribute. I can select ALL the desired blocks (albeit individually picked no window option) and change all attributes to 0 degrees. This suits my needs fine, as I don't want all the attributes rotated.
Thanks again for bseq
Brian
"Michael Bulatovich" wrote in message> Since the routine only allows single item selection, I can't see why this is

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

picked
single
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Here is one more option. This is what I use for rotating attributes. Just select the attributes you want to rotate and type in the new angle. I don't have any problems with it but be forwarned it doesn't have any error checking.
Regards, LT
(DEFUN C:ATTROT(/ SELSET X ENT ENTG ATT ATTG OLDROT NEWROT NEWATTG ANGL) (DEFUN DTR (D)(/ (* PI D) 180))
(SETQ SELSET (SSGET)) (SETQ ANGL (DTR (GETREAL "New rotation angle for attributes: "))) (SETQ X 0)
(REPEAT (SSLENGTH SELSET) (SETQ ENT (SSNAME SELSET X)) (SETQ ENTG (ENTGET ENT)) (SETQ ATT (CDR (ASSOC -1 ENTG)))
(WHILE (/= (CDR (ASSOC 0 (ENTGET (SETQ ATT (ENTNEXT ATT))))) "SEQEND") (PRINC (STRCAT "\n" (CDR(ASSOC 0 (ENTGET ATT))))) (IF (= (CDR(ASSOC 0(ENTGET ATT))) "ATTRIB") (PROGN (SETQ ATTG (ENTGET ATT)) (SETQ OLDROT (ASSOC 50 ATTG)) (SETQ NEWROT (CONS 50 ANGL)) (SETQ NEWATTG (SUBST NEWROT OLDROT ATTG)) (ENTMOD NEWATTG)(ENTMOD ENTG) ) )
);WHILE (SETQ X (1+ X)) );REPEAT
);ROTATTS

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
If you're working in full blown, there's a second tab called "text options" in your standard attribute editor - this will allow you to change angle.
If you're using LT then you need the -ATTEDIT command on the command line. Keep on hitting enter until you're promted to "select object," then select as many attributed as you want to edit, press enter when you're done. You're then promted to select an editing option (height, angle, position, or value) or to go to the next attribute in your selection (exits the command if you've run out of selected attributes).
Hope this helps, you can add a line in one of your menus that can jump straight to the "select objects" bit if you want to. I can't remember the code now, but will post it tomorrow...
DJE

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
This can be put into a button to rotate ONE attribute to zero angle in the current UCS:
attedit;;;;;\;a;0;;
--


MichaelB
www.michaelbulatovich.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ah. I'd tried that and couldn't get it to work. I think I was short by a couple of semi-colons. :-(
DJE

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
A semicolon equals an "Enter". When you program a button just transcribe exactly your keystrokes. Remember that some commands will have a different set of prompts depending on the setting of the EXPERT sysvar. (eg....Are you sure you want to do what you said? <Y>/N:)

to
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I knew that. I guess I just miss-counted :-(
Thanks anyway. the other guys in the office might appreciate it....
DJE

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