We are moving to ACADE 2019, and I'm trying to map our titleblocks. I have just about everything mapped to either a project property or drawing property. The only 3 attributes that I do not: checked by, drawing scale, and plot scale. I was able to find that I could easily use LISP to get system variables to fill in checked by (loginname) and drawing scale (cannoscale), but I seem to be stuck on plot scale. Our plot scale follows 1=1 or 1=4 as examples. I thought I could use the following lisp expression, but it doesn't work and it errors. The error message I get is "Error: bad argument type: stringp 1.0".
At the moment I'm just trying to get the scale factor to show up based on the anno scale, but would like for it to be the standard way we show it, 1=1 or 1=4 or 1=8, etc. We only use model space at my company.
In my WDT file:
PLOTSCALE = (/ 1 (GETVAR "CANNOSCALEVALUE"))
Any help to get it there is appreciated and welcomed.
Solved! Go to Solution.
Solved by metal_pro2. Go to Solution.
Not sure on how to do it with Titleblock update but you can use a field to achieve this. To update the field, use commands UPDATEFIELD, QSAVE or REGEN.
you need to convert the CANNOSCALEVALUE (a real number) from a number to string value,
try using the RTOS function
PLOTSCALE = (strcat "1=" (rtos (/ 1 (GETVAR "CANNOSCALEVALUE")) 5 1))
What is the purpose of the 5 and 1 within the parenthesis towards the end? I took that part out.
I copied and pasted the suggested LISP expression into the WDT file and it didn't update the title block when I ran the title block update. I ran the expression in the command prompt, and it gave the correct format and output I was looking for.
Why is it not working in my title block?
When I reduced it to (RTOS (/ 1 (GETVAR "CANNOSCALEVALUE"))) the scale factor shows up in the attribute on the title block.
I couldn't use the lisp expression "PLOTSCALE = (strcat "1=" (rtos (/ 1 (GETVAR "CANNOSCALEVALUE")) 5 1))" directly in the title block update user defined area. I saved this as it's own LSP in the support files, and set the lisp expression in the title block user defined setup to load that LSP file for my plotscale attribute. Once I did that, it populated plotscale correctly. I don't know why it worked that way, but it did.
Thanks for the help.
Can't find what you're looking for? Ask the community or share your knowledge.