Lisp or Script to Automate Titleblock Status and Rev Block Attribute Change

Lisp or Script to Automate Titleblock Status and Rev Block Attribute Change

BrianTHarleyHaddow
Participant Participant
1,940 Views
13 Replies
Message 1 of 14

Lisp or Script to Automate Titleblock Status and Rev Block Attribute Change

BrianTHarleyHaddow
Participant
Participant

(First up a warning, this is the first Script or Lisp i have attempted)

 

Hi there I have a block made up of various attributes which is used to update details of our title sheets. 

My aim is to automate the process of changing 2 of the atttributes.

Status and REV.

My first step is to replicate the process on the command line only (then use the inputs in a script or lisp).  I fail on the command line!!

I use GATTE or ATTEDIT but I cant seem to change the atttributes i want. When i tell the command i want to change the Status Tag Spec it doesnt recognise it.  I get an invalid message.

If anyone can tell me how best to manipulate the Status and REV attributes from the command line then it will get me on track to writing a script or a lisp.

A couple of things to note (not sure if bears any relevance though) is that the block HH_A1_ATT_NEW is inserted in our drawing template and as you might expect it is located in paperspace.

I have included a blank drawing with the attibute block included.

Any help is much appreciated.

 

0 Likes
Accepted solutions (1)
1,941 Views
13 Replies
Replies (13)
Message 2 of 14

ВeekeeCZ
Consultant
Consultant

Try THIS if it works for you.

Message 3 of 14

ronjonp
Mentor
Mentor

A simple first step to code is learning how to filter selection sets. I assume you want to be able to update many of these at once in one fell swoop?

 

If so paste this into your command line:

(sssetfirst nil (ssget "_X" '((0 . "insert") (2 . "HH_A1_ATT_NEW"))))

Then open your properties palette and change the values needed.

Message 4 of 14

maratovich
Advisor
Advisor

Do you want to change attributes in multiple files?

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
Message 5 of 14

BrianTHarleyHaddow
Participant
Participant

Thanks for reply RPEREZ, ideally i want to run this thing without having to manually type in the status every time

0 Likes
Message 6 of 14

BrianTHarleyHaddow
Participant
Participant

Thanks BeekeeCZ, I had seen this site on a previous trawl of the internet.  I  will try this.

0 Likes
Message 7 of 14

ronjonp
Mentor
Mentor

I like the way you think 🙂 .. next question, what dictates what this number should be? The information has to be somewhere otherwise you'll need to input something.

Message 8 of 14

BrianTHarleyHaddow
Participant
Participant

Hi Maratovich, yes typically i have to update a folder of between 5 to 20 drawings so being able to update them all automatically would save some time.

0 Likes
Message 9 of 14

pbejse
Mentor
Mentor

@ronjonp wrote:

.. what dictates what this number should be? 


 

On the same wavelength as rperez about using fields

 

 

 

 

Message 10 of 14

maratovich
Advisor
Advisor
Accepted solution

Use this:

 

 

 

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
Message 11 of 14

BrianTHarleyHaddow
Participant
Participant

Yes, its for when i have to issue batches of drawings

0 Likes
Message 12 of 14

BrianTHarleyHaddow
Participant
Participant

thats true, the status in the titleblock would be a constant i.e. CONTRACT, INFORMATION etc but the rev can change from drawing so it is probably best to leave that as an item that needs input, i believe you can put a pause in a lisp for user input.

0 Likes
Message 13 of 14

maratovich
Advisor
Advisor

Post #10

Today forum problems - does not show video.
Watch it at another time.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
Message 14 of 14

BrianTHarleyHaddow
Participant
Participant

Thank you that does exactly what i want

0 Likes