Jump to content

Recommended Posts

Posted (edited)

Hi all,

 

Our drawing numbers come if the form of jobno_stage_year_series so an example is 6101_5.1_22_100.

 

If was looking to see if it's possible to get the last character only if it's a letter for getting the revision out of it.

 

So extract the from 6101_5.1_22_100_A but not extract anything from 6101_5.1_22_100

 

This gets the last character but no if check.

$(upper,$(substr,$(getvar,ctab),$(-,$(strlen,$(getvar,ctab)),1),1))

 

Edited by 3dwannab
Posted (edited)

Done, simplified version

 

$(if,$(eq,$(upper,$(substr,$(getvar,ctab),$(-,$(strlen,$(getvar,ctab)),1),1)),"_"),true,false)

 

Working version

$(if,$(eq,$(upper,$(substr,$(getvar,ctab),$(-,$(strlen,$(getvar,ctab)),1),1)),"_"),$(upper,$(substr,$(getvar,ctab),$(-,$(strlen,$(getvar,ctab)),0),1)),)

 

Amazing what reading the help files does. RTFM eh!! 🥴

 

https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-LT/files/GUID-F94A885A-4DA2-432B-AC1A-EB49CC6C1C72-htm.html

Edited by 3dwannab

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