Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
FINET_Laurent
in reply to: L.Greft

Morning,

 

First, in the case where RESTMAAT is greater than 50, I don't see how it could be 0, so I'd remove the if/else statement there.

 

Next I'd move the iProperty.Value out of the statements, after the parameter is set.

 

Like so :

 

If RESTMAAT <= 50 Then
	
	If RESTMAAT = 0 Then
		ZAAGMAAT = 0
	
	Else
		ZAAGMAAT = Floor(23 + Sqrt(2) * RESTMAAT) + 0.99
	
	End If
	

	
ElseIf RESTMAAT > 50 Then

		ZAAGMAAT = Floor(8 + Sqrt(2) * RESTMAAT) + 0.99
	


End If

iProperties.Value("BA50rs", "Custom", "ISAH-Memo") = FormatAsFraction(ZAAGMAAT, 2)

InventorVb.DocumentUpdate()

Maybe this does the trick ?


Regards,


FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill