About the authors

Autodesk Blogs

Sketching

04/24/2012

When I heard about Inventor 2013’s ability to add custom parameters of both text and Boolean types I immediately thought it was a nice enhancement though I couldn’t really see a need to have something like an emboss show “True” or “False” in a part, but there may be a use for Boolean parameters in text that you’ll find and I’m overlooking. The next thought was there had to be a use for a Boolean with the text mixed with a little iLogic.

Here’s a very simple example of using a user text parameter and a Boolean parameter and put them to good use (and add the parameters to a part sketch without getting the “There is no parameter under this source” warning from previous versions)...

The first part is nothing new, just a matter of adding the parameters:

Sadly, you can’t send these parameters to a custom iProperty at this point as you can with a numeric parameter by checking on the export parameter box, right clicking and using the custom property format (as in d4 pictured below):

But what a delight to not see the warning when inserting the parameter by selecting the source as user parameters:

Now I can emboss and, voila, it’ll change when I change the parameter - immediately. The possibilities are starting to increase.

Now the only things left to do are 1) use iLogic to automatically control its visibility (incorporate the Boolean created) and; 2) since I’m already in VB, send the custom parameter to a custom iProperty – after first setting it to a null value so no warnings pop up the first time you run the rule. Why not as long as I’m already there, right? Now the catch here is I can set a string (text) value to null in VB or iLogic, but I don’t know how or if it’s even possible to set a Boolean value to null – just True or False to the best of my knowledge. But we can still use the Boolean to control whether or not the text value is visible with just a few simple lines:

And, now control the visibility of the emboss with that rule and the Boolean parameter:

I hope this helps you find more creative and complex ways to use this new functionality!

04/12/2012

It has been a while since I have blogged about sketches in Inventor and I thought the new Equation Curve command in Inventor 2013 would be a good occasion to diversify the topics covered on this blog, while at the same time highlighting a cool new feature.

A nice example I can think of is to experiment with ellipses. Inventor generates an ellipse starting from a center point and by defining the extents of the major and minor axis.

But how would you create an ellipse based on its two focal points and the minor axis? It all depends with what Inventor release you are working with.

In 2013:

You can now create an ellipse with two focal points with the new Equation Curve command by using an explicit polar equation. See this part file for an example.

The mathematical definition of such an ellipse based on its two focal points is

r = (B^2)/(A-C*cos(Q)) with Q between 0 and 360 deg

Fig 1: Ellipse with half focal distance C shown

A= half major axis

B = half minor axis

C= half the distance between the two focal points

r (radius) and Q(angle)being the polar coordinates of a point on the ellipse (radius and angle)

Note: I added an index 1 to the parameters and used A1, B1 and C1 instead of A, B and C to avoid confusion with reserved parameter keywords.

The result of using such an equation curve can be seen below. The first focal point sits on the origin. To create the second focal point you could for instance mirror the first one along the minor axis.

Fig 3: Creating an ellipse via an explicit polar equation

In 2012 (or earlier versions):

There is not such a thing as equation curves in 2012 unfortunately. But you can quite easily create such an ellipse via the API in the older versions.

You can download here a sample VBA project that you can load in the VBA editor with the Load Project command.

To run the code, run the macro called ShowEllipseDialog

It creates an ellipse with one of its focal points positioned on the origin and the major axis aligned with the X-axis.

You need to have a XY sketch active before running the dialog. The two focal points are connected with a construction line.

B and C values can be freely chosen but A is automatically calculated based on the A^2 = B^2 + C^2 formula.