How hta Changed the Way I Deliver Builds - Part 5 - Opening Windows Explorer and Dev Build hta

How hta Changed the Way I Deliver Builds - Part 5 - Opening Windows Explorer and Dev Build hta

The one thing I do like about the hta interface isn't so much the fact that I now have a way to deliver builds, but the fact that I can add a lot more value to these builds through the same interface. One of the easier, but more popular, additions is the Explore button I have on all my hta files. The idea here is that instead of having to search Windows Explorer through a great list of paths, I can use the variables in the hta to open Explorer straight to where I need to be.

The code for the button is fairly simple:

<div align="left">

<p> 

<input id=startexpldirbutton type="button" value="Explorer" name="startexpldir" style="width=60px" onclick?="startexpldir">

</p>

</div>

The sub is fairly straight forward as well. Note how the path has been given it's own variable in this case.

The is the great advantage of having standard company builds which include standard directory structures.

Next, as I've mentioned before, I run 2 different builds. One build is for testing and development and the other is the active main build. NOTHING is live tested, everything is testing in the dev build first before deploying. 

As such I also run a different hta file for the dev build. The main guts of the file run the same as we have looked at in the articles to date, but with a few subtle differences. The first of these is that I add an extra set of buttons so I can debug the build. To do the debug requires a subtle change to the code we used for application start: 

Sub StartV8bug 

objFSO.CopyFile SitePath + "MS85\Standards\data\std_appl.cfg" , "C:\Program Files (x86)\Bentley2004\Program\MicroStation\config\appl\", OverwriteExisting 

WshShell.Run """C:\Program Files (x86)\Bentley2004\Program\MicroStation\ustation.exe"" -debug=4" 

End Sub 

Take note of where the debug string sits at the end of the run string. This can be modified for any Bentley vertical application: 

Sub StartV8BSbug 

objFSO.CopyFile SitePath + "MS85\Standards\data\std_appl.cfg" , "C:\Program Files (x86)\Bentley2004\Program\MicroStation\config\appl\", OverwriteExisting 

WshShell.run """C:\Program Files (x86)\Bentley2004\Program\MicroStation\ustation.exe"" -wc""C:\Program Files (x86)\Bentley2004\Program\TriForma\config\stflocal.cfg"" -debug=4" 

End Sub 

To finish it all off I then have a final set of buttons to open the msdebug files. I already have these associated with notepad++, but you could have them open in what ever suits. This code could also be added to the end of the run command for the debug, but you may need to tweak timing to have it run once the debug is completed: 

Sub startmsdebug 

Set objShell = CreateObject("Wscript.Shell") 

Set oShell = CreateObject("Wscript.Shell") 

Dim strDirectory, strFile, strText, strUserProfile, fso, file 

strUserProfile = oShell.ExpandEnvironmentStrings("%USERPROFILE%") 

strPath = strUserProfile + "\Local Settings\Temp" 

strFile = "\msdebug.txt" 

strLoad = strPath + strFile 

objShell.Run("notepad++ " & strLoad) 

End Sub 

Sub startmsdebug2 

Set objShell = CreateObject("Wscript.Shell") 

Set oShell = CreateObject("Wscript.Shell") 

Dim strDirectory, strFile, strText, DevPath, fso, file 

DevPath = "R:\_CADDdev\Bentley" 

strPath = DevPath + "\Site\Batch" 

strFile = "\msdebug.txt" 

strLoad = strPath + strFile 

objShell.Run("notepad++ " & strLoad) 

End Sub 

Note that the subs have been modified to suit the location where each version of MicroStation saves the debug file. SS3 MicroStation allows you to set where YOU want the debug file to go, a good addition. 

More soon.

要查看或添加评论,请登录

Sean 'Bear' Forward的更多文章

  • An appl a Day

    An appl a Day

    I've had a few queries on where, why and how when it comes to cfg placement to fire off builds and if it can be used if…

  • Bentley Connect Changes to CADmanage Start-Up

    Bentley Connect Changes to CADmanage Start-Up

    So, while we've had changes to the configs between V8i and Connect, the key to have all of this work using the same app…

  • OBD Connect - std_appl.cfg Revisited

    OBD Connect - std_appl.cfg Revisited

    It's been a while since I've had time to sit down and put some updates together. I've been wanting to share some…

  • Work Smarter, Not Harder II

    Work Smarter, Not Harder II

    We're all wired differently. Me, I like to have things simplified when it comes to my tools.

  • Work Smarter, Not Harder

    Work Smarter, Not Harder

    It's the little things that can make the difference when it comes to different CAD packages and the versions changes…

  • Stinking Pile of Directories

    Stinking Pile of Directories

    So, what does STD_APP have to do with anything? Well, while worrying about how to sort out everything else, I forgot…

  • Stuck with It – WorkSpace and Workset

    Stuck with It – WorkSpace and Workset

    I tried. I really did try.

    2 条评论
  • User Files – Wherefor Art Thou

    User Files – Wherefor Art Thou

    One of the first issues raised during the beta process was the changes to the location of user files. During beta and…

  • My CADmanage Journey V8i to Connect

    My CADmanage Journey V8i to Connect

    As a CAD Admin there is no such thing as consistency. Client standards, users, project styles, discipline requirements…

  • Sometimes It's the Basics - Part 3

    Sometimes It's the Basics - Part 3

    I hope you're going well during these hard times. It's certainly left me penty of time to ponder the future of the…

    1 条评论

社区洞察

其他会员也浏览了