Using Reference Parameters in functions

Using Reference Parameters in functions

Anonymous
Not applicable
3,851 Views
18 Replies
Message 1 of 19

Using Reference Parameters in functions

Anonymous
Not applicable

Hello all,

I am creating a parameterized  drawing and I ran into a problem. I am able to create functions using other dimensions and user parameters. But when i try to use reference parameters I get an error. I am not using this number to drive anything, just calculate some ratio. Is there no way to use a reference parameter in an equation? 

 

Thanks, Sami

Capture.PNG

Capture2.PNG

3,852 Views
18 Replies
Replies (18)
Message 2 of 19

natasha.l
Alumni
Alumni

Hello @Anonymous, 

 

A reference parameter is a driven dimensional constraint, either dynamic or annotational it only reports a measurement similar to a dimension object. You can use dimensional constraint parameter set to an expression that includes a function, in parentheses to determine the precedence of operations. 

 

When a dynamic dimensional constraint references one or more parameters, the prefix fx:is added to the name of the constraint. This prefix is displayed only in the drawing. Its purpose is to help you to avoid accidentally overwriting parameters and formulas when the dimension name format is set to Value or Name, which suppresses the display of the parameters and formulas.

 

Please "Accept Solution" if a reply or replies have helped resolve the issue or answered your question, to help others in the community.

0 Likes
Message 3 of 19

mmmosher
Participant
Participant

I am confused.  It seems like you are saying  you can't Reference a "Reference" dimension in a formula; but that is what I want to do.

When I try to set the height of the rectangle to 3/2*width in the "expression" box the value defaults back to the number it was before when I press enter. Even if I put use "(width)" it still refuses to accept the expression.

 

So the question is how do I let an object's dimension(s) float or be constrained by it's geometry but use one particular measurement of an object to set the parameters of another object.

 

In the simple sample here I want the height of the rectangle to be 3/2 the width which is contained by the circle.  I want the rectangle width to be dynamic in that it will resize to another object, in this case the circle (I am using a constrained ellipse in my real work).

 

This really is a work around to AutoCad's inability to parametrically constrain objects to the arc of an ellipse or circle to the intersection of the object's curve.

0 Likes
Message 4 of 19

dbroad
Mentor
Mentor

I don't understand the problem with the sample drawing. Just select the reference dimension and uncheck the reference property.  Then use it as you want.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 5 of 19

mmmosher
Participant
Participant

I want the width of the rectangle to be SET, or DRIVEN BY,  by the circle diameter; or some other aspect of the drawing.

 

I want to use the width of the rectangle to set, or DRIVE, the height of the rectangle.

 

Another way of saying this is I want to create a variable that is based on a measurement.

 

"Reference Parameters

A reference parameter is a driven dimensional constraint, either dynamic or annotational. This means that it does not control the associated geometry, but rather reports a measurement similar to a dimension object."

 

https://knowledge.autodesk.com/support/autocad-for-mac/learn-explore/caas/CloudHelp/cloudhelp/2020/E...

 

 

0 Likes
Message 6 of 19

dbroad
Mentor
Mentor

"Reference Parameters

A reference parameter is a driven dimensional constraint, either dynamic or annotational. This means that it does not control the associated geometry, but rather reports a measurement similar to a dimension object."

So, by definition, it can't be used in formulas.  I wouldn't think it would matter though.  If diameter= width, use diameter in the formulas. Keep width for reporting. In your sample drawing, there is no diameter parameter.  There is a width parameter. Change the name of that parameter if you wish to diameter and remove the reporting property. Then either use it in your formula or add a user parameter called width and set it equal to diameter and then put width in your height formula. No....big...deal.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 7 of 19

mmmosher
Participant
Participant

You read the help file documentation differently than I do in that the reference dimension does not control geometry.

 

There is also a tool tip that pops up when you hover over the "reference" checkbox that says, "... Reference dimensions can be used in expressions but don't drive geometry - similar to an associative dimension."  See ScreenCast.

 

The simple example is a proxy for what I am trying to do.  What I really want to do is use the major and minor dimensions of an ellipse* in a formula expression to control other aspects in the drawing.  * The ellipse is constrained by the geometry.

a444c566-bf2f-4d7a-b674-268c38f965cb,640,620

 

 
 
0 Likes
Message 9 of 19

dbroad
Mentor
Mentor

I can't follow the screencast because most of the text is too small.  Try a short screencast that just demonstrates the problem and adjust the application window so that it doesn't take up more than 1280px wide.

You are also using an Apple OS so things might vary.  Perhaps the tool tip is wrong. Trust the errors and stop trying to fight the system.  Also contact your instructor.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 10 of 19

JBerns
Advisor
Advisor

I realize this is an old post, but does AutoCAD 2026 now have the ability to use reference dimensions in equations?

I just tried in AutoCAD 2025 and I get the error about "reference dimensions can't drive...".

Why not? They are reporting a length. Why can't this length be used by another dimension?

Inventor can. Fusion can. Seems like other Autodesk teams have a solution to this issue.

For what it is worth, I have submitted a feature request in the beta site. (I did not see any other suggestions for this).

 

-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
Message 11 of 19

leeminardi
Mentor
Mentor

Since a reference dimension is in essence a constant perhaps you can  create a constant as a workaround and reference it in the constraint dimension with the function.

For example, the following Parameters Manager panel includes a contant named "c2" under User Parameters. The constrained dimension for dia1 references it and the value of d1,  a constrained dimension.  You can change the value of c1 but not of reference dimension d2.  This runs the risk of having d2 and c2 with different values but if you think d2's value is going to change then perhaps it shouldn't be a reference dimension!

leeminardi_0-1761611270608.png

 

lee.minardi
0 Likes
Message 12 of 19

j.palmeL29YX
Mentor
Mentor

@JBerns wrote:

... does AutoCAD 2026 now have the ability to use reference dimensions in equations?

 


Unfortunately, still not. In my opinion, this is one of the major shortcomings of AutoCAD's parametric capabilities. And yes, other programs can and do allow this. Why not AutoCAD? Ask the developers... 

 

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 13 of 19

JBerns
Advisor
Advisor

@leeminardi,

 

Semantics aside, I would not consider a reference dimension to be a constant.

 

For example, the block below contains linear dimensional parameters to control overall length and hole offsets.

Given the "internal" hole spacing, the number of holes in the array can be calculated to fill the remaining space.

 

In other CAD systems I can create a reference dimension between the first and last holes. It would not be a constant since the lengths and offsets could change.

 

Granted, the "remaining" area would be the equation, OAL - Hole_Start_Offset - Hole_Finish_Offset.

A reference dimension would avoid having to use such a long expression in an equation.

 

JBerns_0-1761665089004.png

 

The workaround is to create a User Parameter to store the value. Then use the User Parameter in an equation.

 

When switching between CAD systems, it can be expected that workflows and practices may change.

When working within the same family (Autodesk products), I was surprised to discover that AutoCAD did not support methods common in Inventor and Fusion.

 

Reference dimensions would certainly add convenience.

 

 

Regards,

Jerry

 

 

 

 

 

-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
0 Likes
Message 14 of 19

leeminardi
Mentor
Mentor

@JBerns I agree that it should be possible to use a reference dimension in an expression.  In fact, when adding a dimension that would overly constrain geometry the user gets the following message stating the it CAN be used in an expression.

leeminardi_1-1761667781809.png

However, when tryng to create an expression that uses the reference dimension the user sees the following and, as you know, the expression is not accpeted.

leeminardi_0-1761667670768.png

It would appear that this inconsistency should be easy to fix by AutoCAD.

 

My suggestion was meant as a workaround that may be helpful in certain situations.

lee.minardi
Message 15 of 19

JBerns
Advisor
Advisor

@leeminardi,

Ackn. Agreed. AutoCAD offers to create a reference dimension and then fails to complete the task.

Looks like a bug that Autodesk needs to fix.

-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
Message 16 of 19

jhlimGJ872
Contributor
Contributor

How can the AutoCAD developers see this and fix it in the next updates?

and honestly, I don’t see any real use for reference parameters if they only display dimensions.
A normal dimension can already do that, so why should I use reference parameters?
And why are they even called “parameters” if they can’t drive anything?
It would be really useful, because entering long formulas manually is very prone to errors.

0 Likes
Message 17 of 19

DumR0
Advocate
Advocate

Hello

 

Try to delete some geometrical constrain, then one of your  dimensional constrains will turned into driven constrain

because geometrical and dimensional parameters are over - define an scketch

0 Likes
Message 18 of 19

jhlimGJ872
Contributor
Contributor

jhlimGJ872_0-1764895203726.png

as an Example, will need a reference parameters for P1V7, which is coincident with a non centered crossing horizontal line and the circle, to recalculate P1V7 (which can be 0.01 near to 0, or a floored number for an array). I know there're alternative ways in inserting geometry formulas, but if the reference PARAMETERS are usable in expression will save allot of time and effort, and also because they named them as PARAMETERS, why not allowing users to use it as REFERENCE in their expression?

0 Likes
Message 19 of 19

DumR0
Advocate
Advocate

long story -short ---> reference parameter is viewed as over constrain so the meaning / role of that parameter (in autocad) only for information. 

0 Likes