What's new

Script examples and/or sample videos

MikeHenry

Alibre Super User
Are there any examples or videos show where scripting may be beneficial and ways that it is be used to improve the deign experience? Maybe I used the wrong search criteria, but Google didn't turn up much and the Script add-on page has very little info.
 

albie0803

Alibre Super User
I think at the moment the scripting is really for "what would be useful for me", creating it and then sharing it to give people ideas and examples.

Here is a script I created from a script Oldfox shared. This will put the correct sized metric keyway into a hole ie pulley/gear/sprocket etc.

It uses windows input boxes and you select the relevant edge and face by clicking on them.
Select the hole edge to use, click the pointer button next to the edge question then click it again and the selected edge will show in the box.

upload_2018-10-30_10-48-8.png
 

Attachments

  • Alibre Script Keyway.zip
    23 KB · Views: 11

oldfox

Alibre Super User
Thanks Albie. I've heard (read) in the forum, some folks mentioning that their work is always different so scripts would really be of no value. :rolleyes:
Quite the contrar' bon frer. Think about working with keyseats and keyways. Every one you must do is different. Granted. So if you have a good
script (like this one), then all you have to do is to enter just a few (4 - 6 maybe) variables and the script will cut the key way and the keyseat
for you. Send it to the CNC. NEXT !!!
How about items of construction like boards, beams , shafts, bracing members, tubing parts, etc. etc. and on and on. Grab a script that looks like
it may work for you and figure out how you could modify it for your own use. That's what scripting is really all about.
Good luck.

This will put the correct sized metric keyway into a hole ie pulley/gear/sprocket etc.

Just change the dims to Inches and it still works. :D
 

albie0803

Alibre Super User
I have added a script to the examples folder that has all the option.append types I know of. I will add to it as a ready reference as I become aware of others.

Options.append([None, WindowsInputTypes.Image, 'test.png', 114]) #image file in same directory as script
Options.append(['Choose Axis', WindowsInputTypes.Axis, None])
Options.append(['Choose Edge', WindowsInputTypes.Edge, None])
Options.append(['Choose Face', WindowsInputTypes.Face, None])
Options.append(['Choose Plane', WindowsInputTypes.Plane, None])
Options.append(['Angle 0..360°', WindowsInputTypes.Real, 15.000])
Options.append(['Name of the item', WindowsInputTypes.String, 'Baz'])
Options.append(['Enabled', WindowsInputTypes.Boolean, True])
Options.append(['Count', WindowsInputTypes.Integer, 123456])
Options.append([None, WindowsInputTypes.Label, 'Label Text'])
 

albie0803

Alibre Super User
Just change the dims to Inches and it still works. :D
True and I will be doing that as a separate script as well as an "Imperial sizes in mm" because that is what I mainly work in.

As Oldfox said, find something tedious and look for a script that works the same sort of way and modify it or work step by step, looking at available scripts that have the step you want. "Copy - Paste - Modify" Bit by bit.

If you get stuck then ask for help here. The satisfaction of getting a script working "just as you want it" (within the current limitations) is well worth the effort, especially the first time you really use it.
 

oldfox

Alibre Super User
Amen, Albie.
If you look at the "Atlas 618 Quick Change Gearbox" in the gallery, I had to do each gear one by one. I did that model years ago. If I would have
had a script to do all of the gears for me, it would have taken maybe 10% of the time I actually spent on the gears.
 

albie0803

Alibre Super User
Heh! I grabbed a few scripts for RHS and SHS (max kudos to the original author, who did all of the hard work), added windows boxes and made it to work in an assembly, and all of a sudden, an RHS frame became 5mins work with all of the items correctly labelled and sized. That saved hours of work. I was so delighted!
I promptly went on to modify them to create C-Channel, Equal and Unequal Angle in Australian sizes.
 

MikeHenry

Alibre Super User
Thanks, both Albie and OldFox for the example and pointers to more. I'll check some of them out when time allows.
 
Top