GATTE not recognising Attributes?

GATTE not recognising Attributes?

Anonymous
Not applicable
4,042 Views
14 Replies
Message 1 of 15

GATTE not recognising Attributes?

Anonymous
Not applicable

I am trying to update Title block attributes using GATTE.

But when I enter the Attribute name, GATTE does not recognize it, sometimes selecting a totally different Attribute, sometimes saying Invalid Attribute.

 

I am using AutoCAD 2106.

 

Command: GATTE
Select block or attribute [Block name]: b
Enter block name: SLR_TfNSW_A1_Tblock
Known tag names for block: tbLocality tbLine tbDetail1 tbDetail2 tbDetail3 tbFileNo tbStatus tbSheetNo TPDDRAWINGNO TPDREVNO tbOfSheets tbDrawingNo tbRevisionNo tbSheetSize tbScale tbDrwnName tbDrwnDate tbDsnName tbDsnDate tbDrgChkName tbDrgChkDate tbDsnChkName tbDsnChkDate tbApprName tbApprDate tbDiscipline REVMARK_REV1 REVMARK_BY1 REVMARK_DATE1 REVMARK_DESC1 REVMARK_CHECKED1 REVMARK_REV2 REVMARK_BY2 REVMARK_DATE2 REVMARK_DESC2 REVMARK_CHECKED2 REVMARK_REV3 REVMARK_BY3 REVMARK_DATE3 REVMARK_DESC3 REVMARK_CHECKED3 REVMARK_REV4 REVMARK_BY4 REVMARK_DATE4 REVMARK_DESC4 REVMARK_CHECKED4 REVMARK_REV5 REVMARK_BY5 REVMARK_DATE5 REVMARK_DESC5 REVMARK_CHECKED5 REVMARK_REV6 REVMARK_BY6 REVMARK_DATE6 REVMARK_DESC6 REVMARK_CHECKED6 REVMARK_REV7 REVMARK_BY7 REVMARK_DATE7 REVMARK_DESC7 REVMARK_CHECKED7
Select attribute or type attribute name: TPDDRAWINGNO
Block: SLR_TfNSW_A1_Tblock   Attribute tag: REVMARK_DESC2

 

 

0 Likes
Accepted solutions (1)
4,043 Views
14 Replies
Replies (14)
Message 2 of 15

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

can you attach the drawing you are having problems with?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 15

imadHabash
Mentor
Mentor

Hi,

 

does your issue happened in general or just on a certain CAD file ? 

Imad Habash

EESignature

0 Likes
Message 4 of 15

Anonymous
Not applicable

Here is the dwg file.

 

I am trying to develop a procedure run from Excel to update all title block attributes in over 2,000 drawing files with values stored in Excel.

The dwg file I have attached is the template that we have used to create all our drawings. I would assume that unless a drawing has been altered from the template, all drawings would have the same attributes and therefore work the same.

 

(I will deal with any differences at a later stage).

 

JG

 

0 Likes
Message 5 of 15

cadffm
Consultant
Consultant

Hi Julio,

 

i had read the ATTIN Thread and now your GATTE here.

 

For your Target you should use a better Tool as old Attin or Gatte, write your own function in VB(A) or a other API,

from inside Acad or from external source like Excel maybe.

 

But it is easier to look for a tool what can read and write title informations for 2000 files by "one click"

Google: AutoCAD block  excel import export or ADESK APP STORE

 

 

--

 

GATTE: You have lowercase character in attribut tags, that is a bad idea, simple functions like Gatte dont like it (but it is possible to fix that)

 

Note: Command ATTDEF change your lowercase to uppercase! But it is possible to edit in lowercase with PropertiePalette and command ddedit,

          and other programs can create lowercase AttributTags too.

 

  I've seen your answer with the file too late

 

Your Example above it is not possible for me. I am thinking, only by Attribut-selecting with the Mouse it is possible that Acad take the wrong tag.

If you type-in the Attribut Tagname (that situation display your post above), it is impossible (i think so).

Is your text really copy&paste 1:1 from Textwindow[F2] ? If yes, please upload und describe an example.

 

  The problem which switch the AttributTag is the Underscore in AttributTags of your Block,

  that create a problem with the INITGET function in GATTE.

 

 

 

 

 

Sebastian

Message 6 of 15

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

I can reproduce the issue, tried AutoCAD 2017.
Sorry that I have not enough time to now go into detail of that block, but as GATTE is quite old it could be a lot of reasons like number of attributes, upper and lower case (on my system the enhanced attribute editor shows the tagstring as upper case, the list of attributes during GATTE are shown in lower case, maybe you changed that during your edits ... but in older AutoCAD releases it's a rule to use only UPPERCASE tagstrings ... and there are tools out that need that also today).

 

>> I am trying to develop a procedure run from Excel to update all title

>> block attributes in over 2,000 drawing files with values stored in Excel

Are you using Excel to build scripts for AutoCAD or are you using VBA?

Because for VBA you would not need GATTE at all.

 

[EDIT] ... seems I'm too late 😉 [/EDIT]

 

Good luck, - alfred -

 

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 7 of 15

Anonymous
Not applicable

Hi Alfred,

 

Thanks for your reply.

 

I am trying to write a script in VBA to bulk change the attribute values for all drawings in our project, based on values in an Excel spread sheet.

 

I am new to AutoCAD, and looking on GOOGLE found GATTE which I thought is ideal for what I need to do.

 

But - do you have another suggestion?

I could not find any other function more suitable.

 

Most of our drawing files have multiple sheets, so I need to change the attribute values of all of them.

 

I am attaching the spread sheet I am using as well as the macro (as a .txt file as the forum will not allow uploading a macro file).

This is still in development, so the sheet is just a small number of drawings.

Once I get the method done, I can populate the spread sheet fully and increase the number of drawings.

 

Any help would be appreciated.

 

Julio

 

0 Likes
Message 8 of 15

Anonymous
Not applicable

>> The problem which switch the AttributTag is the Underscore in AttributTags of your Block,

 >> that create a problem with the INITGET function in GATTE.

 

Sorry, I don't understand what you are saying.

 

Also, I have tried the GATTE with both upper case as well as lower case attribute names with no luck.

 

Is there a way to change attribute names from lower case to upper case through a function automatically? Or does it have to be done drawing by drawing? (We have over 2000 drawings, with multiple sheets in each!)

 

Julio

 

0 Likes
Message 9 of 15

steven-g
Mentor
Mentor

Rather than struggling with all these different options, why not try a different approach, just delete the old title block and insert it again, the base point is 0,0 and inserting the block will automatically prompt you for all the new attribute values which you can just feed in as a list from excel, that should be a lot easier to write in your VBA code, as it should just be a simple horizontal and vertical loop through all the cells.

0 Likes
Message 10 of 15

Anonymous
Not applicable

@steven-g wrote:

Rather than struggling with all these different options, why not try a different approach, just delete the old title block and insert it again, the base point is 0,0 and inserting the block will automatically prompt you for all the new attribute values which you can just feed in as a list from excel, that should be a lot easier to write in your VBA code, as it should just be a simple horizontal and vertical loop through all the cells.


I would rather not make such major modifications to the drawings. Too much chance of something going wrong.

0 Likes
Message 11 of 15

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

as you are writing your tool with VBA please do not send commands, use the API from AutoCAD to find the title-blocks and change the attribute values.

 

The disadvantage of running SendCommand is that you don't get any feedback, if a command failed you don't see that after your SendCommand, no chance to handle errors in the drawing then.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 12 of 15

Anonymous
Not applicable

@cadffm wrote:

 

For your Target you should use a better Tool as old Attin or Gatte, write your own function in VB(A) or a other API,

from inside Acad or from external source like Excel maybe.

 

 


I don't know of any better tools to use.

 

Can you suggest one?

I need to change all the Attributes in the title block of multiple sheets in a drawing (all have the same attributes and all will be changed to the same value).

 

As I need to do this in multiple drawing files from one Excel file, I feel it is better to drive this from Excel using VBA.

 

I have searched using Google, but can't find anything. All results are driven from AutoCAD.

 

JG

0 Likes
Message 13 of 15

Anonymous
Not applicable

@Alfred.NESWADBA wrote:

 

as you are writing your tool with VBA please do not send commands, use the API from AutoCAD to find the title-blocks and change the attribute values.

 


I don't know how to use the API from AutoCAD. I am new to AutoCAD (no training).

 

Can you make a suggestion to get me started?

 

JG

0 Likes
Message 14 of 15

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

using Google to search for "AutoCAD VBA Attributes" brings you a lot of sample code.

You'll find a AutoCAD VBA forum here: >>>click<<<

The help for AutoCAD VBA can be found there: >>>click<<< (with samples for each function)

 

What you need to know is the structure, how AutoCAD works with geometry in modelspace and paperspace, in your case especially with blocks.

There are some types defined in AutoCAD for that project (good for searching in www):

  • block-definitions (ActiveX = 'AcadBlock')
  • block-insertions (ActiveX = 'AcadBlockReference')
  • attributes in block-insertions (ActiveX = 'AcadAttributeReference')

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 15 of 15

Anonymous
Not applicable
Accepted solution

I have found an alternate solution, a routine by Lee Mac called Update Attributes.

 

Many thanks Lee.

 

JG

0 Likes