Paper Size Field for Titleblock

Paper Size Field for Titleblock

Anonymous
Not applicable
2,052 Views
9 Replies
Message 1 of 10

Paper Size Field for Titleblock

Anonymous
Not applicable

I woUld like to create a field to display the plot setting for the paper size

 

Using

 

%<\AcVar PaperSize>%

 

gives A2 (landscape)

 

because the plotter calls this as the A2 plot size

 

How can I shorten this to just A2?

0 Likes
2,053 Views
9 Replies
Replies (9)
Message 2 of 10

alexKoshman
Collaborator
Collaborator

Hello, sbanister!

You have to use DIESEL expression $SUBSTR in this Field to take only two first symbols: %<\AcDiesel $(substr,%<\AcVar PaperSize>%,1,2)>%

 

[5 minutes later]

Hmmmm...

Only work once a time... Sorry...

: ((

Message 3 of 10

Shneuph
Collaborator
Collaborator

A regen should update it.  Fieldeval = 31

---sig---------------------------------------
'(83 104 110 101 117 112 104 64 71 109 97 105 108 46 99 111 109)
0 Likes
Message 4 of 10

alexKoshman
Collaborator
Collaborator

No. Worse...

 

I mean that others fields do not work inside DIESEL field expressions - see many posts here...

Sorry...

0 Likes
Message 5 of 10

Anonymous
Not applicable

Sadly it doesn't wotk on my PC, I shall have to keep experimenting

0 Likes
Message 6 of 10

alexKoshman
Collaborator
Collaborator

Unfortunately it doesn't work on anybody's PC...

: ((

Message 7 of 10

joe.otieno
Explorer
Explorer

Hi @alexKoshmanand everyone else on this post ,

 

I know this is an old topic, but I've got it working using:

Multiline Text>Text Editor >Field(Under Insert tab)>Field category>DiselExpression>  $(substr,%<\AcVar PaperSize>%,1,2).

This , resulted in the text going from reading "ISO full bleed A3 (297.00x 420.00MM)" to "A3"

 

This in a newer version of C3D from 2023 onwards so AutoDesk might have increased the powers of the diesel expression tool since 2016.

 

Thank you so much! Hope this helps others!

JOts

0 Likes
Message 8 of 10

cadffm
Consultant
Consultant

Hi,

are you sure? That would be new to me.

Check your field code or simply: Change your pagesetup papersize, run Regen.

And now?

 

 

You can not nest fields in DieselExpressions (your papersize-field converts to a simple string, it's no longer a field)

 

I am wrong? That would be fantastic.

Sebastian

0 Likes
Message 9 of 10

joe.otieno
Explorer
Explorer

Hi @cadffm 

Thanks for the reply. I see your point. It seems that it was working for me because I was using the same paper size 23 different times, so it made no difference for me when I ran Regen. I already had the other 22 layouts finished so I copied the field within the MultiText and pasted it within the same spot within that MultiText in the other layouts which worked.

 

I did try and change the paper size, and as you said it converted the paper size to a simple string and it was no longer a field.

Unfortunately the only workaround I found for this, is copying and pasting the PaperSize field expression "%<\AcVar PaperSize>%" and pasting it back into the diesel expression for the copied or new layout. This defys the point of the  DieselExpression, but might help someone nonetheless.

 

The only other solution is adding a piece of the AutoLisp reactor/ creating a Macro to repeat what I stated above similar to what is said here https://forums.autodesk.com/t5/autocad-forum/how-to-display-only-a-part-of-a-field-in-autocad/td-p/1... 

 

Will update you incase I find another solution at any point.

0 Likes
Message 10 of 10

rravgeotec
Contributor
Contributor

$(substr,ISO full bleed A3 (420.00 x 297.00 MM),16,2)

0 Likes