Title Block Update User-Defined Attributes

Title Block Update User-Defined Attributes

janssen_l
Advocate Advocate
1,328 Views
4 Replies
Message 1 of 5

Title Block Update User-Defined Attributes

janssen_l
Advocate
Advocate

Hi Everyone,

 

I'm using ACAD Electrical 2020 and want to setup a company title block. Now updating the project or drawing related attributes is quite straight forward with the "Project>Title Block Update" function, but where / how can I update the title block attribute that where linked to a user-defined value (e.g. a LISP or a field)?

 

Best Regards,

Lukas

0 Likes
Accepted solutions (1)
1,329 Views
4 Replies
Replies (4)
Message 2 of 5

jseefdrumr
Mentor
Mentor
You do this during the Title Block Setup command. When you're mapping the attributes, there is a button in the bottom right-hand corner for user-defined attributes and LISP.

If it's not a LISP, you might be able to map the attributes normally. I'm not sure about fields; the only one I use is a Diesel expression that provides the current date each time the drawing is opened, and as such, it updates on its own and so I didn't map it in the setup command. I didn't want the Title Block Update tool to mess with it.


Jim Seefeldt
Electrical Engineering Technician


0 Likes
Message 3 of 5

janssen_l
Advocate
Advocate

Hi Jim,

 

Thank you for the reply, but the question is not about where to setup the user-defines attribute links, its where I can update them.

Example: I have a LISP routine that reads the loginname and returns an abbreviation (Lukas Janssen -> LUJ), I link this LISP via user-defined attribute to the title block field "Drawn By".

 

When creating a new drawing with my title block all the attribute fields are empty in the beginning, first you need to run the "Title Block Update" utility. Where can you trigger this event for the user-defined attributes. When I created the document but someone else is drawing on it, he needs to be able to update this attribute so it reflects his name...

0 Likes
Message 4 of 5

jseefdrumr
Mentor
Mentor
What may be happening here, is similar to what happens if you try to use the DATE field.

If you use the DATE field as-is, and assign that to an attribute, then what happens is that attribute only gets populated once, at the time the drawing is created. It won't update again. It's telling you the date the drawing was created.

Using LISP to get the login name also seems to only happen once. It is the creation of the attribute (via inserting your title block into a blank drawing) that causes that LISP to run. Title block update, as far as I know, can't trigger that LISP to run again. So the end result is, you see who created the drawing.

This is my guest guess as to WHAT is happening. As for how to fix it, I would guess a Diesel expression but I wouldn't know how to format it correctly. The one I use for the date, which automatically provides me with the current date each time a drawing is opened, is $(edtime, $(getvar,date), M/DD/YYYY).

UPDATEFIELD is the command for updating fields in attributes, but I don't know if it will affect your LISP call.

So far, I haven't come across a way to get the Title Block Update command to affect fields or user-defined attributes.


Jim Seefeldt
Electrical Engineering Technician


0 Likes
Message 5 of 5

janssen_l
Advocate
Advocate
Accepted solution

Hi Jim,

 

FYI, it seems that the fault was partly on my side - I had the LISP that translates loginname to abbreviation in acad.lsp and the attribute got never updated, not at creation, not at title block update. But acad.lsp is run only for the first document opened (drawing 1), when opening now my drawing it seems the function defined in acad.lsp was not available in my drawing.

I moved the function to acaddoc.lsp and the attribute updates with "Title Block Update" tool, when I change the abbreviation inside the function (e.g. L.JAN -> LU.JA) and re-run the "Title Block Update" tool the attribute gets populated with the new values, though there is no checkmark in the update tool, it seems the user-define attributes get always updated as well - including re-run the LISP.

 

Thank you for your help!

0 Likes