AutoCAD LT General Discussion

AutoCAD LT General Discussion

Reply
Valued Contributor
c.dufrene
Posts: 51
Registered: ‎04-26-2012
Message 1 of 8 (691 Views)
Accepted Solution

attedit vs -attedit

691 Views, 7 Replies
12-11-2012 04:46 AM

It seems that this old bug is not yet solved in 2013LT ???

 

But what is also strange is that the command reacts differently if it's alone under a custom button or among many commands, scripts etc...

 

See attachment, the last one is the alone command under a custom button.

 

But I REALLY need the command to work as _ATTEDIT

 

Any ideas ?

 

Try using EATTEDIT command instead of ATTEDIT, there is no command line version and in a quick test here seemed to work the way you want it to in a macro.

 

*Expert Elite*
pendean
Posts: 22,923
Registered: ‎11-06-2003
Message 2 of 8 (686 Views)

Re: attedit vs -attedit

12-11-2012 05:18 AM in reply to: c.dufrene

It's not a bug if you don't know that some commands (and most pop-up commands), when called in a script (or Lisp) or menu macro, default to the command line version (and sometimes the much older "totally different" command). That's one of them. It's by design, someone at Autodesk decided this a very long time ago and it continues.

 

What exactly are you trying to do with your macro? Post the full string here as well, maybe someone can help you tweak it (if it's an option).

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Valued Contributor
c.dufrene
Posts: 51
Registered: ‎04-26-2012
Message 3 of 8 (675 Views)

Re: attedit vs -attedit

12-11-2012 06:08 AM in reply to: pendean

Here's the full version of what was done with AutoCAD 2005 LT, and it worked perfectly...

 

^C^Cscr;rd-1;setenv;rev-i;\scr;rd-2;lo;d;;-i;REVISION-DETAILS;\;;;;$M=$(upper,$(getenv,rev-i));$M=$(eval,"$(edtime,$(getvar,date),DD"/"MO"/"YYYY)");;lo;r;;$M=$(eval,$(if,$(eq,$(substr,$(getvar,ctab),4,1),"-"),$(substr,$(getvar,ctab),1,$(-,$(strlen,$(getvar,ctab)),4))"_rev-"$(upper,$(getenv,rev-i)),$(substr,$(getvar,ctab),1,$(-,$(strlen,$(getvar,ctab)),4))"_rev-"$(upper,$(getenv,rev-i))));attdia;1;_osmode;2807;attedit;l;_attdia;0;_-insert;REVISION-MARK;\;;;;_attdia;1;

 

If I have to go through the -ATTEDIT commands there a way after answering all questions to come back to some on-screen selection of the block ?

 

Thanks.

 

*Expert Elite*
pendean
Posts: 22,923
Registered: ‎11-06-2003
Message 4 of 8 (673 Views)

Re: attedit vs -attedit

12-11-2012 06:12 AM in reply to: c.dufrene

What is it that ATTEDIT did in LT2005 exactly? That command changed starting in LT2006 or LT2007, so you are going to have to refresh my memory going that far back.

All your macro does is run ATTEDIT, call LAST, then move on with no user input if I read it correctly. Plus, in your screenshot in the first post, you needed to use REPLACE and not CHANGE to edit the value of the attribute (since you know what the new needs to be but don't care about the old).

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Valued Contributor
c.dufrene
Posts: 51
Registered: ‎04-26-2012
Message 5 of 8 (661 Views)

Re: attedit vs -attedit

12-11-2012 06:25 AM in reply to: pendean

After the "last" input, it opens the attribute window so the user can input the field "PW"

 

See attachment

 

Then goes on with the insertion of REVISION-MARK block.

 

P.S. I'm more lost then you because it's the first time I have to deal with those mix of scripts, lisp, macros, VBA, etc. that were created many years ago...

 

*Expert Elite*
pendean
Posts: 22,923
Registered: ‎11-06-2003
Message 6 of 8 (637 Views)

Re: attedit vs -attedit

12-11-2012 10:24 AM in reply to: c.dufrene

Try using EATTEDIT command instead of ATTEDIT, there is no command line version and in a quick test here seemed to work the way you want it to in a macro.

 

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Valued Contributor
c.dufrene
Posts: 51
Registered: ‎04-26-2012
Message 7 of 8 (606 Views)

Re: attedit vs -attedit

12-11-2012 11:24 PM in reply to: pendean

Thanks Dean,

 

OK, the window is different, but IT WORKS !

Thanks a lot :smileyhappy:

 

*Expert Elite*
pendean
Posts: 22,923
Registered: ‎11-06-2003
Message 8 of 8 (597 Views)

Re: attedit vs -attedit

12-12-2012 05:11 AM in reply to: c.dufrene

It's more powerful, check it out, don't just get glazy-eyed with the new pop-up :smileyhappy:

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.