Jump to content

GATTE 2 (Global Attribute Edit with Layout Select)


SteveK
 Share

Recommended Posts

To contribute something to this forum I thought I might post this small program; maybe others will find it beneficial.

 

I find the GATTE command is a great tool except that if I have say 60 layouts and want to change an attribute on 30 of them it just can't help me. I wanted something just like it but with a layout selection option. So I made this.

 

NB. It uses CAB's Layout Select Program to select which layout you want. (Make sure you download and place LayoutSelect.dcl in an autoCAD search path or GATTE2 will not work!) If you want LayoutSelect as a standalone it's here.

 

Update: If anyone is interested I've made a slightly extended version of this command to allow for a number incrementer. The original program is still in this post, and I've kept it for two reasons;

1. In case you want it as simple as it can get. &

2. The extended version is made with C#.NET and there was a time I didn't like loading dll's either.

The extended version can be found at this post.

 

Let me know bugs and please comment if you use it. Hope it works for you.

 

Code/Program can be found here.

 

Thanks

Link to comment
Share on other sites

  • Replies 29
  • Created
  • Last Reply

Top Posters In This Topic

  • SteveK

    11

  • dober

    4

  • Lee Mac

    3

  • alanjt

    2

Top Posters In This Topic

Posted Images

I thought about this very thing with gatte, but never got around to writing my own. Very nice work. Thanks for sharing.

 

I like how the number of downloads for Gatte2.lsp is more than the downloads for LayoutSelect.DCL. LoL

Link to comment
Share on other sites

I thought about this very thing with gatte, but never got around to writing my own. Very nice work. Thanks for sharing.

 

I like how the number of downloads for Gatte2.lsp is more than the downloads for LayoutSelect.DCL. LoL

Thanks Alan. :)

 

The difference in file downloads can be added to the number of disappointed users. :cry:

Link to comment
Share on other sites

Nice one Steve :)

 

One small point, I believe it is better practice to delete the VL Selection Set after you are finished with it, just a quick:

 

(vla-delete sel)

Lee

 

Thanks Lee :)

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 months later...

Here is a version of GATTE2 that includes the original Layout Selection and a number incrementer (optional).

 

I thought this a good task for my first main program in C#.NET, so bugs, comments and coding improvements are welcome.

 

If you're new to dll loading in autocad there's a couple of ways to load them, the command NETLOAD is the simplest. This can then be put into a lisp for startup. Another way is shown here.

 

 

Code/Program can be found here.

 

 

Thanks again :)

Capture.PNG

Link to comment
Share on other sites

Wow Steve.. you're coming up in the world - part of the C# club now o:)

I'm feel like a right newbie now - only know LISP... :geek:

I wouldn't say it's moving up in the world. It's on the same street, just in a newer building. :wink:

 

Besides, your lisp programs are setting a benchmark for autocad extension free software (I've had to create a whole folder called LeeMac!)

 

As I remember you tackled C++ in autoCAD, and I think if I tackled it I wouldn't have got very far. I'm finding C# a much easier mountain to climb. It's still huge, but the incline is not as steep.

Link to comment
Share on other sites

:) ha, your lisp programs are setting a benchmark for autocad extension free software (I've had to create a whole folder called LeeMac!)

 

Haha - thanks Steve - I feel honoured that I have a place on your PC :P

 

As I remember you tackled C++ in autoCAD...

 

*attempted* would be more the word... I know only the basics... :geek:

 

...and I think if I tackled it I wouldn't have got very far. I'm finding C# a much easier mountain to climb. It's still huge, but the incline is not as steep.

 

I think that's the way to go - after reading what most people say over at theSwamp, the best way is to learn C# and 'migrate' into C++, purely because the mountain seems so steep with C++ that you get very little return for the initial time you invest.... although, the long-term rewards for such an investment are valuable indeed :)

Link to comment
Share on other sites

  • 4 months later...

Hi Steve,

 

Thanks so much for the GATTE2 routine. Up till now I haven't had to worry about multi layout tabbed drawings but our new parent company wants us to use multiple layouts instead of multiple drawings. I only discovered the GATTE tool today for the first time and then found it wouldn't do what I wanted, whereas your GATTE2 lisp routine did the job with no problems at all.

 

Now I can tackle the new drawing procedures without raising a sweat. :lol:

 

Robert Smeallie

Electrical Design Engineer

Link to comment
Share on other sites

  • 6 months later...

Steve,

 

1st of all, thank you very for sharing the "gatte2"; it is good feature.

 

Q1:

How can I globally chage an attribute without selecting layouts? (like "gatte" worked in ACAD2008)

 

Q2:

When I tried to change page increment numbers using the version 2 of gatte2, it is working properly only upto layout-9. When I add layout 10, 11,..., it is assigning page #2, 3,... on layouts 10, 11 respectively then continue on layouts 2, 3..

 

Could you please advise me how this issue can be resolved?

 

Thanks,

krish

Edited by KRISHK
Link to comment
Share on other sites

Regarding the DLL file, when I run this I get an error that says "FATAL ERROR: Unsupported version of Windows Presentation Foundation". What is that and why can't I run this?

 

Regarding the LISP, I personally think it's better if it asked for the new text string right after it asks you what attributes you want to change. When I ran it, it asked for the attribute, then the DCL popped up to pick the layout, then it asked me to enter the new text string. Seems unefficient to jump from keyboard to mouse to keyboard again IMHO.

Link to comment
Share on other sites

Thanks for your comments.

 

Q1: How can I globally chage an attribute without selecting layouts? (like "gatte" worked in ACAD2008)

I didn't know they took away GATTE in ACAD 2011?

 

Q2: When I tried to change page increment numbers using the version 2 of gatte2, it is working properly only upto layout-9. When I add layout 10, 11,..., it is assigning page #2, 3,... on layouts 10, 11 respectively then continue on layouts 2, 3..

I was sure I ironed out those problems when I was testing it; I'm sorry to hear they're still there.

 

Regarding the DLL file, when I run this I get an error that says "FATAL ERROR: Unsupported version of Windows Presentation Foundation". What is that and why can't I run this?

This program hasn't been tested with MEP2010 so that might be the problem. Otherwise maybe you have an older version (than 3.5 I think) of the .NET Framework?

 

Unfortunately I'm no longer working with AutoCAD so I'm unable to test (and for that reason make) any further changes to the program for a while.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...