Inconsistent units errors using trigonometric formulas

Inconsistent units errors using trigonometric formulas

cuemkt
Contributor Contributor
4,995 Views
13 Replies
Message 1 of 14

Inconsistent units errors using trigonometric formulas

cuemkt
Contributor
Contributor

Hello everyone,

I've been suffering from defining what was going on in my situation. I got a triangle pattern family and I used U, V and Top Angle parameters to report the size data of the pattern. The result I want to achive is a similar internal Triangle Ref Lines whose offset distances are constraint by the ref points segment lengths. Things were ok for the first calculation of the Top and the 2 adjacent lines as well (I guess) but when I used trigonometric to find out the degree value of the Side Angle I got the message "Inconsistent Units". I tried to add units at the end of the value but everything still stuck...

Please take a look. Any suggestions and advices are always welcome and appreciated.

Sorry for my bad English and explanation.

0 Likes
Accepted solutions (2)
4,996 Views
13 Replies
Replies (13)
Message 2 of 14

barthbradley
Consultant
Consultant

Have you tried divide by one ("/1")?  

 

Read Munkholm's "Revit - Inconsistent Units and how to neutralize them"  here: 

 

https://www.revitforum.org/tutorials-tips-tricks/1138-revit-inconsistent-units-how-neutralize-them.h...

 

 

...you might also like Munkholm's "Revit Formulas for "everyday" usage" here: 

 

https://www.revitforum.org/tutorials-tips-tricks/1046-revit-formulas-everyday-usage.html

 

0 Likes
Message 3 of 14

barthbradley
Consultant
Consultant

Hard to tell without knowing the units.  Can't tell from the screenshot. Post the family.   

0 Likes
Message 4 of 14

bin
Advisor
Advisor
Accepted solution

It is because you create this Side Angle parameter as a number parameter. You can tell from the default figure "0.0".

Delete this parameter and create a new one, and select the Angular type.

 

Although this will fix the Inconsistent units issue, you will still have a lot of problems, especially if you are using this for some irregular shape other than a rectangular face.

0 Likes
Message 5 of 14

cuemkt
Contributor
Contributor

Hi barthbradley,

It's a pleasure to see you again :). Thank you for your help. Yes, I've read those two topics and tried the methods but it didn't work in this case. Bin's suggestion was right, I change the parameter type and the problem is solved now. If you don't mind, I will post the family once I finish, I think there will be more to work on next.

0 Likes
Message 6 of 14

cuemkt
Contributor
Contributor

Hi bin,

Thank you so much. It works Smiley Happy. I will finish the rest of workflow and try on the surfaces. Could you please tell me some of your predictions about the problems that you mentioned?

0 Likes
Message 7 of 14

cuemkt
Contributor
Contributor

Hi guys,

Yeah, as bin said, things are much more complicated than I thought it would be. It both fails to get in irregular shape surface and the performance itself :).

I just notice two issues, which may affect some of the performance above. Once is the error "a2 value not invalid" when I try to invert the value of U-V directly without a neutral one. Second is the reaction with the offset, Revit seems not to understand my method of ensuring the internal triangle to be always inside the first one. I have the family posted for you guys to take a look. If you find out more issues, please let me know. I will also study and research more to get the result.Issue 1- a2 value not invalid inverting U-V value.pngIssue 2- Internal Constraint.pngThank you so much :). 

 

0 Likes
Message 8 of 14

barthbradley
Consultant
Consultant

FWIW: Side Angle could have remained a Number type parameter and Times One (" *1 ") could have neutralized it in the formula for "a3" to eliminate the "inconsistence error". 

 

Neutralizer.png

Message 9 of 14

bin
Advisor
Advisor

Your family will probably work fine if it's only some very regular shape mass, but if you create some organic shape, it won't work because most of the triangle shape will have different angles and side length.

The easiest way to work out the area of the triangle is to use the length of 3 sides.

S=(a+b+c)/2
Area =sqrt(s*(s-a)*(s-b)*(s-c))

a,b and c are the length of the sides and are reporting parameters.

The next challenge for you is to create the internal triangle with a set offset. You will need to create a reference line using the working plane of the existing reference lines.

Your last challenge is to work out the area of the internal triangle. Although you will have the internal triangle from the last step, you are not allowed to use the reporting parameter this time. You will also create issues if you use instance parameters because this will overstrain your model and break your family.
You will need to take more steps, using the relationship between the length of the external triangle, the angles, and the length of the internal triangle to eventually work out the internal area from the length of the external triangle sides and the offset.

Have a try yourself. I can make you a video tonight (Aus) to explain if you like.
Enjoy modelling.

Message 10 of 14

cuemkt
Contributor
Contributor

Hi barhbradley,

Thank you for the tips!  

0 Likes
Message 11 of 14

cuemkt
Contributor
Contributor

Hi bin,

It's a great pleasure for me to see your explanation video, I can't tell how much thankful I am to receive such a support from you and everyone on the forum! I will try the things and wait for it!

Yes, It's not a good feeling when you face troubles one after one but I think we can find happiness from solving them little by little and be better everyday. I'm learning a lot of things from you guys in this case. 

Wish you all have a nice day!

Message 12 of 14

bin
Advisor
Advisor
Accepted solution

Here it is:

https://youtu.be/WbGNcOeeBK4

 

There's a link for the file under the video.

Please let me know if you have better solutions.

Message 13 of 14

cuemkt
Contributor
Contributor

Hi bin,

You save my day!  Your method also makes me realize how confused and over-thinking I was to create such a messy calculation with some nonsense parameters :). This is exactly what I’m after. I’m getting to learn more of how to get a efficient approach to the information before choosing the solutions.

I just have a small quiery that in my Revit version (18), things are overconstraint if I try to lock a model line by the 2 opposite reference ones- just check “lock” option when I pick lines and they work well. And I’m quite unsure of what the “lock” button of parameters in the Family Type table  is used for.

Actually this result gets a big impact on the workflow of creating the external glazing family type that I posted at another topic before. It also give me the motivation to do some more study on the triangle pattern. I would love to post once it finish but since I’m in a crazy time of rushing for the projects deadline in my company, It would take some time.

Once again, thank you guys so much for sharing the knowledge with us! I hope to see you on the next topics. I wish you all the best!

Message 14 of 14

bin
Advisor
Advisor

It's probably because you are picking the end points of the wrong model line. But if it works, don't worry about it.

 

The "lock" in the Family Type, to my understanding, is not actually to lock the figure. It helps to keep the figure of that parameter while you testing your family, like dragging the reference planes. I don't know much about it, and usually will ignore it. But sometime I will try it when the family is not working as expected.

 

Good luck! 🙂