CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.095.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.

CAD tip CAD tip # 9630:

Question

CAD 
 %  platform  category 
A
Even without iLogic you can use a math trick in Inventor to set a parameter value based on a logical condition, depending on the value of another parameter.

Strictly speaking it is not about a logical condition, but rather about testing of divisibility by two, using the standard arithmetic operator modulo (%):

The expression:

v%2

returns 1 for odd values of v

and the expression:

(v+1)%2

returns 1 for even values of the parameter v.

By combining these two expressions you can form a "logical" conditional statement, which evaluates to H1 for odd values of v and to H2 for even values of v:

(v%2)*H1+((v+1)%2)*H2

Analogically you can extend this method also for other values but the resulting expression may get complicated fast.

Inventor
100% *CAD
8.1.2014    15014×  
applies to: Inventor ·

See also:
Tip 14569:The extent of the sheetmetal unfold rounded to integer numbers.
Tip 14560:JobTime for Autodesk Fusion - tracking time spent on a job.
Tip 14204:How to draw a parabola in Autodesk Fusion (or other 2D/3D curves).
Tip 14200:How can I use multiple title blocks in an Inventor drawing?
Tip 14098:How to use arc length parameter in Inventor sketch?


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Increase your productivity with our set of BIM add-on functions for Autodesk Revit
CADstudio Revit Tools More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist