I’m trying to redefine a line in an existing custom vb programme and I have only just started to understand vb.net but have written in vba previously (some years ago).
This is the line I want to edit:
StartProjectNumber = MSApp.ActiveWorkspace.ExpandConfigurationVariable("$(first(_USTN_PROJECTNAME))")
The history… I’m trying to tidy up a messy workspace and part of that is the project list, we have four and five digit project numbers but due to the numeric nature of the list our 10000 numbers appear at the head of the list when they should follow behind 9999. This is easy enough to fix which I did by adding a preceding ‘0’ to the four digit numbers to make them all five digits but I didn’t anticipate the effect on some custom programming, which verifies the correct project is open against the open file.
The result is the programme now fails because it interprets 09999 from the pcf as not matching the directory which is actually 9999.
So I need to find a way of either redefining "StartProjectNumber" so that the expanded variable $(_USTN_PROJECTNAME) loses the preceding zero or look at replacing it with a shortened path from $(_DGNDIR) i.e. $(_DGNDIR)=S:\9999\ to drop the ‘S:\’ and end ‘\’ to get ‘9999’
Any suggestions will be gratefully received.
Thanks.