Hi, just dipping my toes into Ilogic customization, last time I did any programming was TurboPascal at uni a million years ago.
Problem background:
We are using multisheet IDWs with each sheet assigned a unique four-digit number for its name. Inventor appears to add an instance extension to this four digit number when using ActiveSheet.Name.
Thus if we have five sheets in an idw in ascending order such as 1600, 1601, 1605, 1606, and 1608, ActiveSheet.Name returns 1600:1, 1601:2, 1605:3, 1606:4, and 1608:5 respectively.
What code could I use to truncate the ":#" part of each ActiveSheet.Name, or is there an option to return only the user assigned portion of the name?
Thanks for any help, much appreciated!
Regards,
Rob B
Solved! Go to Solution.
Solved by danvang. Go to Solution.
Okay, I did what I should have done at first...googled it. This was pretty close to what I needed:
http://inventortrenches.blogspot.co.nz/2011/04/ilogic-to-trim-file-name-to-populate.html
I just modified my variable as follows:
strCurrentSeqNum = (Left(ActiveSheet.Name, 4))
This starts at the left side of the string and takes the first four character, omitting whatever follows. Hope it helps someone...
Thanks for posting your solution, as it is more robust than mine, I've changed my code to yours. Much appreciated!