Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems I having with Trig in Parameters and iLogic

1 REPLY 1
Reply
Message 1 of 2
chris
134 Views, 1 Reply

Problems I having with Trig in Parameters and iLogic

I'm running into some issues while trying to add some trig functions in either the Parameters window or in iLogic, so I'm looking for some assistance.

 

Example: If I use a parameter called "P_T", (which is a value of "2" and has a unit of inches) in another parameter and I type it like this: ((P_T)*1ul), I would expect to get a value of = 2ul

but I don't, I get a value of = 5.080000 ul

 

The issue I'm running into here is I'm trying to do some sin, cos, asin, acos equations, which involve unitless and angle inputs of numbers that are lengths and I can't figure out how to write this stuff, and when I try to write it in iLogic vs. Parameters, I get different results.

 

Here's a "short" video showing/explaining a couple of the problems I'm having and the differences I'm getting when "I think" I'm writing the same equation between Parameters and iLogic.

 

Tags (2)
1 REPLY 1
Message 2 of 2
chris
in reply to: chris

Update: I went back and watched that video again, and I noticed a little gem, (see video 41:46), applying the "divide by 1in, then multiple by 1in I was able to get this to work in Parameters:

 

Asin Value:     asin(( ( ( LOD / 1 in ) - ( SOD / 1 in ) ) / 2 ul ) / ( P_W / 1 in ))

Cosine Value:     ( P_T / 1 in ) * 1 deg * ( cos(180 deg - ( 90 deg + ( asin(( ( ( LOD / 1 in ) - ( SOD / 1 in ) ) / 2 ul ) / ( P_W / 1 in )) ) )) )

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report