What's new

Thread File Editor for Alibre Design by albie0803 (Allan)

albie0803

Alibre Super User
Hello all,

I have put my meager programming skills to work and created a thread file editor in visual basic.

The Thread File Editor for Alibre Design is a simple front end to simplify adding, removing and editing of thread data.

It installs an add-on which makes it accessible from the Add-On tab in Alibre Design.

Why I created this.

The thread file is named alibre_unicode_custom.thd and allows additional threads to be used in conjunction with the ones that are hard coded into Alibre Design.

My original idea was to provide not only an easy editor but also a way to swap what is the custom file when a different name format was needed as alibre_unicode_custom.thd is the only accepted file.

eg Have a file of military designated threads called alibre_unicode_military.thd that could be copied over the custom file when needed.

To this end, when the program is first run, alibre_unicode_custom.thd is backed up as alibre_unicode_custom.bak and then copied as alibre_unicode_standard.thd

If more than one thread file is desired, these files can be copied over the custom file when needed without data being lost, as edits should be done to the standard and other files which are then selected to become the custom file, causing the custom file to be overwritten. Note that Alibre will have to be restarted after edits are made as the alibre_unicode_custom.thd file is only read on startup.

Maybe most importantly, it allows for easy opening of the folder where the THD file lives. Something that a lot of people often forget where to find it when they need it.

André from CadTec Switzerland (a user here) asked about possibly localizing it and so after a lot of back and forth, both the program, addon and installer are available in both English and SWISS-German.

The program comes with a standard windows uninstaller package.

I hope this proves to be useful from time to time. Any comments, issues, suggestions etc are welcome.

Once again, when the program is first run, alibre_unicode_custom.thd is backed up as alibre_unicode_custom.bak so if something goes horribly wrong, (not that I expect it to) you haven't lost everything. Just change the BAK to THD and all is restored.

A simple doc explaining the basics can be found under the Options/Folder menu


NOTE: File has been updated to latest version V1.5

Changes: Cosmetic label fix and multi-language option temporarily removed
 

Attachments

  • ThreadEditorforAlibreInstallerV1.5.zip
    514.3 KB · Views: 51
Last edited:
Hello Albie -- As someone who lives in the FED-STD-H28 universe, I hear and understand your issues. I gor (somewhat) back and forth between the "H-28" side of things and the "DIN" side of things. Not being able to quickly "swap" a (say) alibre_unicode_H28.thd with a (say) alibre_unicode_DIN.thd is a royal PITA! And the "hard coded data" would have to "work up" to qualify as worthless for me.

I will take a look at your stuff (not tonight) and get back to you.
 

albie0803

Alibre Super User
No Lew, hopefully I've heard yours. When I started designing this I thought about what else I could get it to, other than being the Thread File editor and your often heard cry for the need of varied thread descriptors came to mind. I have used an alternate thread descriptor in a part and drawing and then changed back to the default thread file and the descriptor held.
I work in a repair and maintenance workshop where our drawings are for inhouse and the built in threads plus BSPP BSPT NPT are normally all I need. So I really hope you particularly find it useful.
 

DavidJ

Alibre Super User
Staff member
I've installed and had a very quick look only so far.

The editor runs if called from Desktop shortcut. When I try to enable the Add-on in the Add-on Manager I get the message shown..
ThrdEdit.jpg

When I run editor from desktop shortcut it has created the bak file and a standard file. However LOAD doesn't seem to achieve anything. Could not get anything to appear in the UI after selecting the file.

I did notice at first run that English(Australia) was the only English option (not sure if that might be significant).

The options look good - can't wait to get it working....
 

DavidJ

Alibre Super User
Staff member
Apologies - ignore that piece about files not loading - I hadn't noticed the tabbed layout for separate thread types (my custom threads are all NPT or User English, the UNC tab was empty.
 

DavidJ

Alibre Super User
Staff member
I don't see a tab for user/generic Metric (type 2000).

When adding thread to new file - it goes into UNC tab, regardless of which tab is selected.

Tried Inserting thread -> Unhandled exception.
 

DavidJ

Alibre Super User
Staff member
The Exception doesn't happen if I Add a row first - so can be worked around. Seems OK once the table has entries.

I recently came across some really odd behaviour in Alibre with a mis-configured custom thread file - perhaps something to consider for a future version of the editor would be to include some very basic entry checking. I'm thinking of perhaps just highlighting empty fields, and non-numeric entries in any of the dimension fields.
 

albie0803

Alibre Super User
Nate had the same sort of issue with my generic addon post. Have a look here at how he got around the problem.

I was not aware that there was a 2000 option. I will have to ask Max about that
 

DavidJ

Alibre Super User
Staff member
That thread didn't really help, I couldn't see any information on how he got around it.

The dll and other files are in C:\Program Files\Alibre Design\Program\Addons\ThreadEditor
I notice that half the files are called 'External' - no idea if that matters.

2000 option is listed in the sample file.

Don't think I'm moaning - I know that problems inevitably surface when a wider audience gets hold of software.
 

albie0803

Alibre Super User
Nate for some reason couldn't get the link path "C:\Windows\system32\calc.exe" to work but this format did "file:///C:/Windows/system32/calc.exe".

Is the Thread Editor installed in "C:\Program Files\ThreadEditor"?

I have fixed the error of the thread not being added into the open tab and have disabled insert if less than 2 threads are present on a tab. I will upload a new version in the morning. Adding 2000 will take a little longer.

The addon files files being named external is explained in the referenced thread

Thanks for your feedback, it is most welcome. If the program doesn't work correctly then what is the use of it?
 
Last edited:

DavidJ

Alibre Super User
Staff member
I saw that, but couldn't work out what I should be looking to edit - i.e. in which of files in the folder. I've even less experience that you at this kind of stuff.


Yes - Thread Editor is installed in default location
 
Last edited:

albie0803

Alibre Super User
In C:\Program Files\Alibre Design\Program\Addons\ThreadEditor there is a shortcut called External. It should be the first file in the list. If you double click it, does the Thread Editor run? If it doesn't, open C:\Program Files\ThreadEditor and drag a shortcut of ThreadEditor.exe (the one with the thread symbol) to the addons folder above, delete the Extrenal shortcut and then rename the new one to external.

To my understanding, the adc file creates the addon button. when you click it, it calls ExternalAdddOn.dll which calls the External shortcut. It should be that simple. I'm sorry I don't understand why something that works perfectly for me just won't work elsewhere.
 

DavidJ

Alibre Super User
Staff member
The link provided in the ThreadEditor folder works fine for me.

This feels perhaps like a Path issue, or maybe there is something installed on your system that is required (by the dll?) , but that not everyone has.

I am running Win10 BTW.
 

DavidJ

Alibre Super User
Staff member
Since you have to close Alibre Design anyway for changes to take effect - the add-on button is perhaps not critical (though I guess it does avoid having to have a desktop shortcut, or having to remember the program name).
 

albie0803

Alibre Super User
I have updated the file in the first post to V1.2

I have fixed the errors in the program you have mentioned and added a tab for Metric-Generic (2000)

The addon issue will need more investigation by those who understand C++. I will have to ask.
 
Last edited:

DavidJ

Alibre Super User
Staff member
Thanks - it seems to have updated over the original version without problem. It'll be useful even without the add-on button.
 

NateLiqGrav

Alibre Super User
Instead of using "Building a Program Launcher Addon" I got it to work by using your instructions for "Building a Webpage Launcher Addon" I got the Webpage one to open an .exe by using the url format for a local file: For example "file:///C:/Windows/system32/calc.exe
 
Hello Albie -- I just downloaded V1.2. Do I "just run" the program or are there any "uninstall: things that need to be done first? [Irrational minds want to know.]
 
Top