• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

parametric formula

  • Thread starter Thread starter cen82
  • Start date Start date

cen82

Guest
Hello, everyone.
I need to automate, to change the length of the piece, the definition of the number of holes being known (I insert by hand) the pitch of the holes.

I'll explain better with the formula I use.
[numero fori] = [lunghezza]/ [passo fori]il problema sorge quando [numero fori] is not a whole number and in fact in inventor during the creation of the series of holes, in the holes field, of course, does not accept a number with decimals.

what I need to understand is if there is any kind of education that allows me to take only the whole part of the value [numero fori]for example in vb or excel doi:

int( [numero fori]help :-)

ps but there is a guide for the programming language accepted by default by inventor?
 
the default inventor language is the vba, and the network is full of tutorials and manuals. the problem is to interface to inventor to read and write parameters or do more complex actions... ilogic should greatly simplify life and f1 does wonders!
In your case, I wouldn't shake any of this. I would create a custom parameter in the parameters window and use the formula :
floor(100 mm / 30 mm) (=3, floor round bottom)
or
ceil(100 mm / 30 mm) (=4, floor round top)

of course instead of 100mm and 30mm other custom parameters or less, and the parameter you insert will have unit measuring "on", without unit: that parameter is then usable as you prefer
Bye!

Hi.
 
Thank you so much! :-)
after your answer I found a list. Maybe it can help someone.
hello and thanks again

use of equations and parameters

you can use equations wherever you can enter a numerical value. e.g., you can write equations in the Edit Shares dialog box, parameters and features. equations can vary according to complexity and it is possible to use them to calculate the size of the processing, offsets or angles of the joint constraints or simulate the movement between multiple components.

equations can be simple or contain many algebraic operators, prefixes and functions. here is a simple equation as an example:

2 on *(6+3)

the following complex equation uses internal parameters, including the pi:

(pi rad/5 on +(25 gr * pi rad/180 gr))

algebra operators

the following table lists algebraic operators supported by autodesk inventor.

operator
meaning

+
Addition

-
subtraction

%
mobile comma module

*
multiplication

/
Division

^
power power

(
Delimitation of expressions

)
Delimitation of expressions

;
delimiter for functions with multiple topics


prefixes of units of measurement

the following table lists the prefixes of measuring units supported by autodesk inventor.

prefixed
symbol
value

Exit
and
1.0e18

peta
p
1.0e18

you will
?
1.0e18

giga
g
1.0e9

mega
m
1.0e6

Chilo

1.0e3


h
1.0e2

Decade
from
1.0e1

decisions
d
1.0e-1

cents
C
1.0e-2


m
1.0e-3

micro micro micro micro micro micro micro micro micro micro micro micro micro micro micro micro micro
micro micro micro micro micro micro micro micro micro micro micro micro micro micro micro micro micro
1.0-6

dwarf
No
1.0-9

Pico
p
1.0e-12

fem

1.0-15

Act
a
1.0e-18


when using the measuring unit prefixes in an equation, enter the prefix symbol and not the prefix. For example, an equation that includes the measuring unit "nanometer" could be expressed as follows: 3.5 ul * 2.6 nm.

adding the prefix of the unit by name to the metric unit, the equation will be calculated according to the length of 2.6 nanometers.

note for the symbols of prefixes is made distinction between upper and lowercase letters. Enter them exactly as they appear in the previous table.
Functions

the following table lists the supported functions.

syntax
type returned unit
type of unit

what(expression)
without unit
angle

breast(expression)
without unit
angle

tan(expression)
without unit
angle

acos(expression)
angle
without unit

asin(expression)
angle
without unit

atan(expression)
angle
without unit

cosh(expression)
without unit
angle

tanh(expression)
without unit
angle

acosh(expression)
angle
without unit

asinh(expression)
angle
without unit

sqrt(expression)
Unit
any

sign(expression)
without unit
any (returns 0 if negative, 1 if positive. )

exp(expression)
without unit
any (returns the exponential power of the expression: for example, returns 2 for 100, 3 for 1000 and so on).

floor(expression)
without unit
without unit (minor next whole number. )

ceil(expression)
without unit
without unit (more next full number. )

round(expression)
without unit
without unit (closer whole number. )

abs(expression)
any
any

max(expression1;expression2)
any
any

min(expression1;expression2)
any
any

(expression)
without unit
without unit

log(expression)
without unit
without unit

pow(expression1;expression2)
Unit
any and without unit respectively

random(expression)
without unit
without unit

isolated(expression; unity; unity)
any
any


note for the names of the functions is made distinction between upper and lowercase letters. Enter them exactly as they appear in the previous table.
reserved system parameters

the following table lists reserved system parameters supported by autodesk inventor.

parameter
value


3.14159265358932384643383

and
2.7182818284045236


types of units

the type of unit used with an equation depends on the type of data you are considering. for example, to evaluate a linear or angular value, use the type of unit in millimeters, inches or degrees (mm, in or gr)

some equations must return a value without unity, for example, an equation to solve the number of occurrences in a model. is designated a value without unit with the characters on. for example, 5 on means that the equation has been evaluated and returned number 5, as in the number of occurrences within a model.

note maintain the uniformity of units within equations containing parameters that represent different types of units. this is possible using the island function. For example, to calculate the number of occurrences of a model based on a recurrence for each unit of the width parameter, the linear equation would be as follows:
isolated(width;mm;su)

the number of occurrences in a dialog box requires a result without unit (on) but you are referring to the width unit that corresponds to a linear value. convert the width parameter to a value without unit.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top