3dwannab Posted August 26, 2022 Posted August 26, 2022 (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 A 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 August 26, 2022 by 3dwannab Quote
3dwannab Posted August 26, 2022 Author Posted August 26, 2022 (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 August 26, 2022 by 3dwannab 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.