update title block

update title block

oskar_blomster
Explorer Explorer
397 Views
5 Replies
Message 1 of 6

update title block

oskar_blomster
Explorer
Explorer

Hi
Im using the attached lisp script to change in a title block.
The script opens this box

oskar_blomster_0-1741695455323.png

to use it to change the title block i edit the script line to:  _.open *file* utb _.qsave _.close

How it works:
The title blocks headers is written into an Excell.csv file.
under eache header i change the text to what i want it to be.
The drawing directory is changed to the correct file search way.

Autocad sends an error about the "utb" part of the script line -" unknown command.
Even though when i serch for it its a known command and it has worked on another file.

What is the problem?

0 Likes
Accepted solutions (2)
398 Views
5 Replies
Replies (5)
Message 2 of 6

DGCSCAD
Collaborator
Collaborator

UTB is not a native AutoCad command, it's a LISP function that was developed by Lee Mac (the same person who developed the Script Writer). I suspect it's not autoloaded with every drawing, so thats why it's erroring out. Unless you hard-code it, it needs to be located in a support/trusted directory, and your script will need to change to:

 

_.open *file* (load "UpdateTitleBlockV1-9") utb _.qsave _.close

 

The red portion is the version. Change that to the version/name you are currently using.

 

HTH

AutoCad 2018 (full)
Win 11 Pro
0 Likes
Message 3 of 6

paullimapa
Mentor
Mentor

If @DGCSCAD posting still doesn’t work try this alternative method of calling the utb lisp function:

_.open *file* (load "UpdateTitleBlockV1-9") (c:utb) _.qsave _.close

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 6

oskar_blomster
Explorer
Explorer

Thanks for the replays @DGSCAD and @paullimapa

Unfortunally did the changes in the scriptline not help me solve the problem.
Altough i did find a copy of LeeMacs script  that is edited and contains the variable utb.

Unforunally did it not change anything, i got a feeling im out in deep water in my efforts 😞


0 Likes
Message 5 of 6

oskar_blomster
Explorer
Explorer
Accepted solution

UPDATE!

Ive discoverd the problem!
The "include subdirectories" box does not work.
The excell.csv file have to be in the same map as the drawings.
If anybody has a solution to how to get the "include subdirectories" box to work it would be great. 

0 Likes
Message 6 of 6

paullimapa
Mentor
Mentor
Accepted solution

Time to goto Lee Macs website and let him know

https://www.lee-mac.com/contact.html


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes