Jump to content

Recommended Posts

Posted

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!! 

Posted

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))

 

Posted

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

 

 

Posted

Any reason why not use lisp ? Much easier to do this sort of thing.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...