Attributes mirror after using ATTREDEF
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Attributes mirror after using ATTREDEF

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
simon.weel
Guest





Posted: Wed Jan 05, 2005 2:11 pm    Post subject: Attributes mirror after using ATTREDEF Reply with quote

Hello,

We experience a nasty problem with ATTREDEF.
Blocks with attributes can be mirrored and the text is still readable. But after changing a block with attributes using the ATTREDEF command, the attributes in mirrored blocks become mirrored as well, making them unreadable.

I've been trying to tackle this for a while, but can't get a grasp on it. Some strange things happen. Although it is possible to edit the attribute values by simply double-clicking the block, the command -ATTEDIT reports 0 attributes found when you pick such a mirrored attribute.

Does anyone has a clue in how to solve this? It seems like the ATTREDEF command does some unexpected things...

Greetings,

Simon Weel

Back to top
James Allen
Guest





Posted: Thu Jan 06, 2005 4:41 am    Post subject: Re: Attributes mirror after using ATTREDEF Reply with quote

Hi Simon,

I don't see that problem now, but think I remember seeing it when we
discussed this before. (
http://discussion.autodesk.com/thread.jspa?messageID=4132889 ) Perhaps
related; I do see other strange happenings on my system involving attributes
in mirrored blocks (non-uniformly scaled blocks in general, actually).

I may not be able to, but I'm interested in helping figure this out. I
would need more info though. What version of AutoCAD? It may be that the
problem or even possible solutions to it are version specific (maybe why I
don't see it now). And as I mentioned before, looking at a small sample
file that demonstrates the problem would help a lot too.

James


"simon.weel" <nospam@address.withheld> wrote in message
news:14140777.1104918815432.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
Hello,

We experience a nasty problem with ATTREDEF.
Blocks with attributes can be mirrored and the text is still readable. But
after changing a block with attributes using the ATTREDEF command, the

attributes in mirrored blocks become mirrored as well, making them
unreadable.
Quote:

I've been trying to tackle this for a while, but can't get a grasp on it.
Some strange things happen. Although it is possible to edit the attribute

values by simply double-clicking the block, the command -ATTEDIT reports 0
attributes found when you pick such a mirrored attribute.
Quote:

Does anyone has a clue in how to solve this? It seems like the ATTREDEF
command does some unexpected things...

Greetings,

Simon Weel
Back to top
James Allen
Guest





Posted: Thu Jan 06, 2005 7:14 pm    Post subject: Re: Attributes mirror after using ATTREDEF Reply with quote

Ahhh! Now I see. My current routine to fix this "moves" the attribute if
it is not justified middle center. This will require a bit more work.
Looking into it now and will post back.

James


"simon.weel" <nospam@address.withheld> wrote in message
news:22826535.1105000197858.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
Hello James,

You're right, I started this discussion before :)

I made a sample drawing, making clear what the problem is (I hope). We use
AutoCAD 2000i.

The drawing contains two blocks (Block1 and Block2). Both are inserted
normal and mirrored. The attribute value in both blocks is readable. Then I

exploded block2 and used ATTREDEF to redefine it. Block2 mirrored shows what
happens then. The attribute value is mirrored, making it hard to read.
Quote:

You can modify the attribute value of block2 mirrored by simple double
clicking it, but if you try -ATTEDIT, you'll notice you cannot select the

attribute.
Quote:

It's not a breath-taking problem since we try to use the ATTREDEF command
as little as possible, but we do have a problem in cases it IS used...

Greetings,

Simon Weel


Back to top
Jay
Guest





Posted: Thu Jan 06, 2005 9:10 pm    Post subject: Re: Attributes mirror after using ATTREDEF Reply with quote

When I mirror your BLOCK2, the text doesn't mirror, unlike what your samle shows.

Anyway, have you considered using the Express Tolls Block Attribute Manager?

Jay
Back to top
James Allen
Guest





Posted: Thu Jan 06, 2005 9:20 pm    Post subject: Re: Attributes mirror after using ATTREDEF Reply with quote

Simon, see if this works for you.

James

Code:

;;; Fixes attributes that are facing away
(defun c:FixAtt (/ edt enm jst ins nrm rot vdr wid)
  (command "_.undo" "begin")
  (setq vdr (trans (getvar "viewdir") 1 0)
 enm (car (nentsel "\nPick Attribute to Fix: "))
 edt (entget enm)
 nrm (assoc 210 edt)
  )
  (if (equal (cdr nrm) '(0 0 -1) 0.1)
    (progn
      (setq jst (cdr (assoc 72 edt))
     wid (if (vl-position
        t
        (mapcar '(lambda (a) (= jst a)) '(1 3 4 5))
      )
    0
    (progn
      (setq wid (textbox (entget enm))
     wid (- (caadr wid) (caar wid))
      )
      (if (= jst 2)
        wid
        (- wid)
      )
    )
  )
     rot (cdr (assoc 50 edt))
     rot (list (cos rot) (sin rot) 0)
     rot (trans rot enm vdr)
     rot (+ (angle '(0 0 0) rot) pi)
     edt (subst (cons 50 rot) (assoc 50 edt) edt)
     wid (polar '(0 0 0) rot wid)
     ins (trans (cdr (assoc 10 edt)) enm vdr)
     ins (mapcar '+ ins wid)
     edt (subst (cons 10 ins) (assoc 10 edt) edt)
     ins (trans (cdr (assoc 11 edt)) enm vdr)
     ins (mapcar '+ ins wid)
     edt (subst (cons 11 ins) (assoc 11 edt) edt)
     edt (subst (cons 210 vdr) (assoc 210 edt) edt)
      )
      (entmod edt)
      (entupd enm)
    )
  )
  (command "_.undo" "end")
  (princ)
)



"simon.weel" <nospam@address.withheld> wrote in message
news:22826535.1105000197858.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
Hello James,

You're right, I started this discussion before :)

I made a sample drawing, making clear what the problem is (I hope). We use
AutoCAD 2000i.

The drawing contains two blocks (Block1 and Block2). Both are inserted
normal and mirrored. The attribute value in both blocks is readable. Then I

exploded block2 and used ATTREDEF to redefine it. Block2 mirrored shows what
happens then. The attribute value is mirrored, making it hard to read.
Quote:

You can modify the attribute value of block2 mirrored by simple double
clicking it, but if you try -ATTEDIT, you'll notice you cannot select the

attribute.
Quote:

It's not a breath-taking problem since we try to use the ATTREDEF command
as little as possible, but we do have a problem in cases it IS used...

Greetings,

Simon Weel
Back to top
simon.weel
Guest





Posted: Thu Jan 06, 2005 9:38 pm    Post subject: Re: Attributes mirror after using ATTREDEF Reply with quote

Yes! Great!!

Thanks a lot James, me and my colleagues are very happy with this routine.

Greetings,

Simon Weel
Back to top
James Allen
Guest





Posted: Fri Jan 07, 2005 12:24 am    Post subject: Re: Attributes mirror after using ATTREDEF Reply with quote

Excellent! You're welcome.

James


"simon.weel" <nospam@address.withheld> wrote in message
news:6987929.1105029513650.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
Yes! Great!!

Thanks a lot James, me and my colleagues are very happy with this routine.

Greetings,

Simon Weel
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB