TLB_CAD Posted September 3 Posted September 3 Hi I'm wondering if it is possible to create a diesel expression that would equal the value between parentheses in a layout tab name. So if our template layout tabs are named SHT (1) when it's copied it will automatically name the next tab to SHT (2), SHT (3)....SHT (20) extra. I started with the below expression, but haven't been able to get the field to equal "1" "2"......"20" Works with old name of layout tabs "s001" = "1" (suppresses leading zeroes) $(fix,$(substr,$(getvar,ctab),$(-,$(strlen,$(getvar,ctab)),2),5)) Any help on this would be greatly appreciated!! Quote
TLB_CAD Posted September 3 Author Posted September 3 Also I'm trying to get one more expression figured out. It seems to want to ignore the alpha's from the file name for a separate template. I'm not sure if it would be possible to make the sheet number a variable for length to accommodate the desired outcome. Again any help on this would be greatly appreciated. File names: E-39900s001r00 = 1 E-36900s001Ar00 =1A Current Expression: $(fix,$(substr,$(getvar,dwgname),$(-,$(strlen,$(getvar,dwgname)),9),12)) Quote
TLB_CAD Posted September 5 Author Posted September 5 Just in case anyone else is looking for the how to do this I've been continue to play with the expression and found that this works for the layout tab name. The great thing about this is if you copy layout tabs from 1-# it automatically numbers the layout tab, and attribute in the title block. $(substr,$(getvar,ctab),6,$(-,$(strlen,$(getvar,ctab)),6)) This will make the attribute = the number between () below are examples SHT (1) = 1 SHT (10) = 10 SHT (100) = 100 Quote
BIGAL Posted September 5 Posted September 5 Any reason why not use lisp ? Much easier to do this sort of thing. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.