Hi,
I might be asking in the wrong forum, if so, apologies.
I have been asked to make the title text larger (drawing are being issued at 1/2 scale, A1 to A3) on a large set of drawings. My solution was to copy the title attibute block to a temporary location, resize the attributes and redefine the block by runnung a script (scriptpro). Some drawings needed the title line split to next line so I had to move the sheet counter (1 of xx, 2 of xx etc.) which was linked to drawing file name for number with a field/formula. The diesel expression shown below extracts that number. My problem is I cant figure out how to I can edit this expression to allow for a set not starting at 1. I had used a formula to subtract the difference,but how do you express this to run in a script?
Many thanks
Sean
This is my script......
attreq
0
-insert
ftc-gwp-a1-nosheet-stb=ftc-gwp-a1-nosheet-stb
0,0
1
1
0
erase
last
attreq
1
attsync
s
(ssget "X" '((0 . "INSERT")(2 . "ftc-gwp-a1-nosheet-stb")))
y
_gatte
b
ftc-gwp-a1-nosheet-stb
title4
PROPOSED ALTERATIONS
y
_gatte
b
ftc-gwp-a1-nosheet-stb
title5
Sheet %<\AcDiesel $(substr,$(getvar,dwgname),16,$(-,$(strlen,$(getvar,dwgname)) ,19))>% of 6
y
qsave
Hi,
Thanks for the reply. I was running _gatte through my script and it is easy to use this way. I figured out the diesel expression (a web crawl) to extract a number from the drawing file name and subtract a given number from that number. As follow...
Sheet $(eval,"$(-,$(eval,"$(substr,$(getvar,dwgname),16,$(-,$(strlen,$(getvar,dwgname)) ,19))"),10)") of 20
In this case I'm taking the characters between 16 and 19 and subtracting 10 from that value. Looks crazy, but it works.
thanks
Sean
Hi,
Correction - this is what is used in the script.
%<\AcDiesel $(eval,"$(-,$(eval,"$(substr,$(getvar,dwgname),16,$(-,$(strlen,$(getvar,dwgname)) ,19))"),10)")>%
Regards
Sean
Hi Dean,
I think you misunderstood the issue.
The attribute text resized was part of the title block in paper space. The drawings we produce are prepared on a A1 title template. After the entire set was prepared the client wished to issue them at A3 (1/2 scale) and asked if the title text could be made bigger. Not a problem, only the sheet counter field needed to be split to a new line to fit into the drawing sheet . Hence the question on how the diesel expression would be written to automatically input counter number through script.
I wasn't actually resizing the block, just printing it at 1/2 scale.
I have been using annotative dim and text, dynamic blocks, fields etc (for quite some time) and give all new features in Autocad a fair shake before I decide to use them or not. I pride myself in keeping up with the Jones.
If there is a way though, that I've missed, to have the attibutes in a title sheet to resize and flow to the next line when printing to a different page size, I will certainly update my templates to accommodate that feature.
Thank you,
Sean
Is it not possible to split up the field? So you have something like "Sheet (field 1) of (field 2)". Field 1 is your formula and make a custom field for total sheets that gets filled out in drawing properties.
Hello Christopher,
You are right. In my case though, the job had been set up without sheet set. (Another good reason to use sheet sets)
The job is out the door now, and I guess it never hurts to figure things out in different methods.
Thanks for the reply
Sean