AutoCAD 2010/2011/2012 DWG Format
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi All
As in my previous posts I am very new to this AutoCAD lark.
All I am trying to do at the moment is create an attribute on a drawing template that will simply display the users username.
I am hoping then that this will be presented as 'Designed By' or something similar, on the drawing and then I am hoping to try and get it into Vault.
Hope someone can enlighten me.
Gareth
Solved! Go to Solution.
Re: Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
To make the attribute type
ATTDEF
When the dialog box appears
Select - Preset. This will allow you to edit the block that contains the attribute.
If you enter the values shown for TAG, PROMPT & DEFAULT like this:
When you edit the block that contains the attribute with the ATTEDIT command, it will look like this:
Re: Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks for the reply.
But can I get the 'Designed By' to default so that it automatically takes the users username.
So in my case if I begin a dwg, it will automatically populate the 'Designed by' with jgw2, my Windows username?
Gareth
Re: Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Gareth,
well one way to do it is to define the DESIGNER-NAME attribute value as field
first you need to add this expression to your acad.lsp (or any other lisp file that is autoload)
(setq username (getenv "username"))
now prepare your title block and invoke the ATTDEF command
in tag field enter DESIGNER-NAME
in prompt field enter Design Name
in Default field click on the Insert Field button...this opens the Field dialog box
then select "Other" Category
Field name -> LispVariable
and roll the list to find the username
(it should be there if you add the expression to acad.lsp and load it)
finish with ATTDEF dialog and define your block
after inserting your title block save the dwg and reopen it you will see that
the user name is update
another way of doing it is with autolisp but that's totally another story
GoodLuck
Moshe
Re: Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You could use a field instead.
When in the text command right-click and select insert field.
In the field names list select DeselExpression.
In the diesel expression area type $(getenv, username)
Re: Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Yes Hensley, you are absolutely right, this saves the use of acad.lsp
thank you very much for your remark
Moshe
Re: Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Fantastic, thanks for this.
That has opened a few doors for me.
Gareth
Re: Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks for responding.
I am just starting to look at .lsp files, didn't realise you could use them for things like this.
Gareth
Re: Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hensley
I foolishly thought that when the username command took the current users username, that when another user opened the drawing it would keep the existing username. But it doesn't it overwrites with the other user (If that makes sense!)
What I am trying to achieve is that the creator of the drawing will always appear on the DWG file??
Can you help?
Gareth
Re: Designed By Attribute
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I don't know how to display who created the drawing. You can display who saved it last, if that helps. Or if you fill out the author field of the drawing properties (using DWGPROPS command) you can display that.
To display who saved a drawing last, instead of selecting DieselExpression select LastSavedBy.
