Repository Batch Update Utility

Developers can possibly work with quite a few repositories, especially in hsbcad offices since it is common practice to keep a copy for each active branch of each repository. I found it time consuming to update each repository using the typical Git clients, and I don’t like my repos to get too far behind.

To address this, I’ve written a PowerShell script which navigates to each repo and pulls down changes. It features a custom alias of ‘git pull’ which specifies fast forward and enables some other switches.

You can read about the recommended alias here if you’re interested.

So, to get started you need to define this alias on your machine. Note that this is all for PowerShell, if you prefer a different shell in your terminal you might have to edit this somewhat, but the concept is universal.

At any PowerShell command prompt, enter and run:

git config --global alias.up '!git remote update -p; git merge --ff-only @{u}'

The script itself is quite concise:

$repos = “<Repo Path 1>”, “<Repo Path 2>”, …

foreach ($repo in $repos)

{    

Set-Location "${repo}"    

git checkout master     

git up

}

Save this to a file with the .ps1 extension. With PowerShell installed you should get an option to run the script when you Rt-click. Or you can open it in VS Code and use it’s built-in PowerShell terminal.

You might be prompted about Execution policy, but that is straightforward to answer.

My version of this script can be downloaded here.

Cheers,

cc

Tsl Search Utility

Although it was published some time ago, I have found that most users are unaware of this handy little tool. Here is the text from hsbAcademy

·      TslSearch.exe is a small utility to search for Tsl scripts (.mcr) on the local file system. 

This is a new stand-alone utility which can also be run directly from the ACA environment. It tracks standard Tsl folders such as hsbCompany/Tsl and those selected in the automatic update function. It analyzes each .mcr script in selected folders and allows the user to filter them according to their function, name, and description.

In addition to being run from AutoCAD (HSB_TSLINDEXER) the app can be run independently. <hsbInstallation>/Utilities.Acad/TslIndexer/TslSearch.exe. When used outside of ACA, scripts can be listed and viewed but are not able to be imported into AutoCAD. When run from AutoCAD you can directly import the script into the currently open .dwg

·      Steps to use the tool 

The idea is that the user can define 3 types of search parameters.

1.      Insertion Entity. What is selected when the script is first executed?

2.      Action. The common actions taken by Tsl scripts in the ACA environment are listed, along with appropriate target objects. Does it create Beams? Sheets? Draw Linework or Dimensions?
Multiple rules can be specified.

3.      Keywords. Any text entered here is matched against the script Name and Description in addition to formal Keywords listed in the script definition.
Multiple separate Keywords can be defined, delineated by comma, space, or semicolon.
So: “Term, Another Term; Thing” will search using “Term”, “Another”, and “Thing”


Picture1.png

A. Results List

B. Selected script Name and Description

C. Launch selected script in system code viewer

D. Match rating

E. The Entities which are selected during insertion

F. Action Rules, defining what the script does

G. Keywords, one or more user defined search terms

H. Status Message, communicates current state to the user

K. Options, allows user to select which folders are searched/indexed


Picture2.png

The Options dialog:

A. Button to add new folders to the search path

B. Check box to include or exclude this folder from the current search

C. Delete this folder from the list.

D. Hsb Company folder, and folders defined in the Tsl Auto Update function are always present and cannot be deleted here

Support ticket website

We had started a new support system in 2020, TeamLeader. Anything you send to support.na@hsbcad.com will automatically create a ticket and hopefully be a bit more transparent for both users and technicians. It also allows us to more easily track conversations and associated files.

We have had several cases of clients finding that their ticket interface was in Dutch; we have only recently discovered this is a setting on your client profile. So if you click on the ticket link and the website is not in English, just let us know and we can make that switch easily.

It is not an ideal system, we are still researching other solutions. However, it should prove much more useful than the previous email only procedure.

cc

A New Decade, A new Era

2020 is a big year for hsbcad in the US and Canada. We have established a new company to license, manage, and support hsbcad software. Hsbcad North America LLC is solely owned by hsbcad BVBA Belgium. The LLC will maintain physical offices in Seattle, Washington and Phoenix, Arizona.

The support email listed below feeds into a new ticketing system. It is the recommended channel for all bug reporting and technical issues. It keeps a dynamic history of your inquiry and can be accessed both by hsbcad staff in the US and Europe.

We will also soon be bringing online a new licensing system, currently being tested in the UK and other parts of Europe. It will allow you to directly administer your licenses and avoid many of the shortcomings inherent in the previous fingerprint and activation code systems. There have also been significant updates to hsb on Revit, hsbShare, and hsbMake.  In addition to the main corporate website, North America specific news and information will be made available at our updated blog: http://www.hsbcad.us

Contact Information:

Legal Name:  hsbcad North America LLC

Phone: 844.472.2231

Support:        support.us@hsbcad.com

Address:       1734 NW 61st St., Seattle, WA 98107

ACH info:      Available on request

Website:       http://www.hsbcad.com

 

We look forward to building great things with you in the coming year, and as always, empowering you to realise.

Staff:

CEO: Randy Laplante randy.laplante@hsbcad.com

COO: Craig Colomb craig.colomb@hsbcad.com

Senior Technician: Jared Flores jared.flores@hsbcad.com

Technician, Developer: Taya Blackrose taya.blackrose@hsbcad.com

Streamlined Profiling

Tsl scripting is a key feature of Hsb; in fact likely our single most powerful tool for customization of design environments. However, as with any powerful tool you are given the ability not only to do good work, but possibly some harm. I have seen more than one office where scripts which were either overly ambitious, or poorly architected have led to severe performance degradation. In a workflow which might utilize several (or even dozens) of Tsl scripts it’s not always apparent where the compute cycles are going.

To address this, Tsl provides 4 ACA commands for performance profiling. These are of course also described in Tsl Help.

  • HSB_TIMETRACKSTART

    • Activates time tracking, which will remain active until stopped with one of the END commands. Basic TimeTracking reports time of execution for each script.

  • HSB_TIMETRACKSTARTPROFILING

    • Activates Profiling, which will log activity until stopped by one of the END commands. This provides more detail than the TimeTrackStart command, it reports execution time for each function called by each Tsl. All calls to a particular function are grouped in the report.

  • HSB_TIMETRACKEND

    • Ends TimeTracking (duh) and then displays the report in a dialog.

  • HSB_TIMETRACKENDANDFILE

    • Ends TimeTracking and then prompts the user to save the report as a text file. The text file is ‘;’ delimited and can be imported into Excel for further analysis.

I had an interesting request from a rather advanced client the other day. He does a lot of internal development, and had been doing some Tsl profiling to try and improve efficiency. Some of his asks were pretty involved (reporting source code line numbers along with duration…). However, he also commented that the process of starting profiling, then running a script, then ending profiling was a bit tedious. As a quick proof of concept, to address this issue I came up with this Lisp routine.

It defines a new command, “pf” which will start profiling, fire HSB_RECALC and prompt you to select a script, then after the script runs it ends profiling and prompts the user to select a save location for the report.

I’m not sure how much profiling is done in the Hsb world, but this approach could be a time-saver if you do it regularly. The command only works against HSB_RECALC in this incarnation, but it would be straightforward to modify it to track wall generation, or script insertion.

Cheers,

cc

I'm Baaack! Custom Tsl Properties and other Dialogs

I have revived this blog to publish some documentation on new Visual Studio Project Templates which I have uploaded to the Visual Studio Marketplace. You can download the VSIX installers from the marketplace to add new Project types to the New Project dialog in Visual Studio 2019.

Once you’ve run the installer(s) and restarted Visual Studio, you can find the new project types in the new project dialog by searching for ‘tsl’ or ‘hsbcad’.

This is extending the work Chirag did in this area. He had published a video describing the use of the ViewModel and other base classes he’d created for this purpose, but please note that these base classes were subsequently updated and the video is no longer entirely accurate.

Plugin Properties Dialogs are here.

Map Based callDotNet2 Project Template is here.

This page describes how to use the Project Templates.

Feedback is of course welcome, Enjoy!

cc

Hello and Welcome

I am Craig Colomb, and I have been working with hsbcad for nearly 20 years. Starting in 2001 as a CAD Manager for a heavy timber design build firm, since 2007 I've been a full-time developer and support technician under Woodsoft Solutions out of Montreal, exclusive retailer of hsbcad in North America (and sometimes beyond).

This site is intended to:

  • Provide documentation and samples of N.A. specific tools
  • Publish news and tips around using hsbcad
  • Publish examples of exciting hsbcad related projects

Most of the North American specific content currently lives on the "NA Documentation" page which is linked in the navigation bar. It's also useful to be aware that the hsbcad team is maintaining an official help site and feedback forum.