This post is a follow-up to the Assembly Automation Tutorial for Inventor iLogic post where we added the fifty-some odd lines of iLogic code to our Inventor Assembly. Today’s post will attempt to explain that code.
This post was supposed to be published yesterday, but I spent most of the day screwing around with a plugin that will eventually allow me to post Inventor iLogic code with the proper syntax highlighting that can be copy & pasted right from the webpage into your iLogic Code Editorwithout intermediate programs adding special characters that screw up the code. I’ll be posting a bit more on that in the next post. Until that is up-and-running, I’ll use images…
The first two lines of code (above) are creating variables. The Nut_Offset variable gets its value by reading the Nut_Offset parameter in the Hanger Bolt:1 part. The second variable, Overall_Size is reading two local parameters (Blue) and multiplying them against each other to get its value.
In this, the final installment in this little sidebar iLogic tutorial for the Shaker Table series of tutorials, we will add the iLogic code that will hook the model to the spec’s posted at the beginning of this miniseries. Once this tutorial is completed, we will insert this part into the table and have the table control it automatically.
This iLogic Tutorial is winding down –there is not a lot left to do so let’s get right at it. Open up the Hanger Bolt.iam assembly, then open up the iLogic Rule Editor. You should have the following code there…
…if not, you will need to get it there. From looking at the list of available hanger bolts below, we can see that there are no bolts that have two different diameters for a particular length…
I left off in the last iLogic code post with the code that limits the Shaker Table’s apron to a minimum of two inches. Today’s post will cover the apron’s maximum width code as well as the min/max for the thickness.
But first, I promised to show how to make the model semi-transparent. It is not at all necessary to do so, but I like to use the technique when adding and testing iLogic code so that I can get an x-ray view as to what is going on in my model. I have posted the How-To under the title iLogic Code Writing and Testing in a Semi-Transparent Model
When writing iLogic code in Autodesk Inventor, you need to test the code constantly to assure that it is behaving as expected in your model. Some of what is happening would normally be hidden from view. The answer to that problem is to have a semi-transparent model while testing. Here’s how to do it….
For this tutorial on iLogic code I have used the table from the Shaker Table Tutorial for this how-to, but any part with multiple solid bodies will do.
We will be using the Shaker Table created in an earlier iLogic tutorial as a base for this one, so if you haven’t completed it, I suggest you do so —it is geared towards beginners, and shouldn’t take too long.
Changing the Apron_Width parameter will automatically change the tenon width because we used the -( Apron_Width – ( Tenon_Shoulder * 2 ul ) ) formulato create the distance between the two planes that describe its width extents. The Tenon_Shoulder parameter used in the formula is a driven dimension placed on one segment of a group of three equal segments constrained to the thickness of the apron. As the apron thickness changes, the tenon remains exactly 1/3 of the thickness, and that dimension is transferred via the driven dimension to the mortise in the Leg solid.
This video shows the current progress on the BIM (Building Information Model) Eco Cottage (Blackhawk Cottage) currently in the works here at the Open Design Project. The video specifically shows the state of the routed systems such as the gas lines, the DWV (Drain Waste Vent) system, and the PEX plumbing.
I am hoping to have the water lines completely routed by the end of the week, and then jump over to the electrical, but I have quite a few other commitments this week so things may take a bit longer. Enjoy the video and have a great day…