Problem Swood variable integer not true

Hello everyone,

I'm a Swood user under solidworks, my problem is that in the editor of the binding library when in my variables I choose an integer , well this type of variable is not really an integer.

That is to say that the variable only shows the whole part but keeps in memory all the digits after the decimal point.

Does anyone know a way to have a real integer without the decimals.

It seems simple like that but it's a real headache, because even mathematically I don't know a formula to remove decimals.

And I can't find any code to do a truncation with Swood.

So in the midst of despair, I am asking you because I am completely displaced.

Thanks in advance

Hello, I don't know Swood at all but isn't there a way to make a "rounding" function down or up directly or via Excel as we do for the families of parts (there is sure that you will have this function)?

 

Good night

1 Like

Hello and thank you for your answer FUZ3D,

There is certainly a function, but I do not know it.

As for excel, I don't think you can do data exchanges between swood and Excel. 

I just found a function that keeps the integer part that works, it's fix().

Could someone tell me in which programming language is this function found?

Because I tell myself that there must be more to discover.

Hello 

In the solidworks swood 2019 release notes (ftp://ftp.solidline.de/SWOOD%202019/What'sNew_SWOOD2019.pdf), they talk about new features added to Swood script. (See pj)

I looked quickly and couldn't find the complete list, but with a little perseverance you should be able to find this famous list of functions.

 


swood_script.png

see this video maybe it will help you https://www.youtube.com/watch?v=rRFQH2ISAFI&t=1248s