Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 3-Jul-2018 12:52:47

GeoffCtec3D
Member
Registered: 2-Jul-2018
Posts: 32

Display number of values assigned to objects

Hello,
The task I want to sort out is the following:
I need to assigned to my 3D model's objects binary values. I want to count the total of the objects that got the "1" value. And then display the total using a dialog Box.

I tried to assigned logical values using the Plugit<Var, incrementing and decrementing by clicking== Plugit<object click and Plugit<sequence.

But can't manage to count and display the value.

Does someone know how to do that? smile

Thank you

Geoffrey

Offline

#2 3-Jul-2018 14:54:57

Xeonadow
Scol language & OpenSpace3D developer
Registered: 28-Jul-2017
Posts: 11

Re: Display number of values assigned to objects

Hello

I made a small example. You can download it here :
http://www.openspace3d.com/rsc/samples/ … values.xos

When one of the values is modified, I use a multi output plugIT to first reset the count var, then get each value again to check if they are equal to 1.

Hoping this solves your problem smile

Last edited by Xeonadow (3-Jul-2018 16:20:45)

Offline

#3 3-Jul-2018 15:36:45

GeoffCtec3D
Member
Registered: 2-Jul-2018
Posts: 32

Re: Display number of values assigned to objects

Thank you verry much!
The file you gave me seems perfect for what I need to do smile

Offline

#4 9-Jul-2018 09:36:33

GeoffCtec3D
Member
Registered: 2-Jul-2018
Posts: 32

Re: Display number of values assigned to objects

Hello,
I have a problem and I would need some help smile
I used the exemple you gave me and I wanted to add another functionality
Using another if<plugit, I want to set to 0 the value of the objects if the counter reaches 3.

I made : count.var.Modified<if==3.Equal

if==3.True<cylinder var.SetValue
if==3.True<sphere var.SetValue
if==3.True<cube var.SetValue

Each time setting the value as Int=0

When I execute it it works, when the counter reaches 3 the object values are set back to 0 but the cylinder value which remains at 1... sad

I d'ont understand why and I can't seem to make it work

Do you have any idea why?

Offline

#5 9-Jul-2018 09:48:23

GeoffCtec3D
Member
Registered: 2-Jul-2018
Posts: 32

Re: Display number of values assigned to objects

I'm checking and apparently the problem come from the following link:
cylinder var. Modified<var modified multi output.Input
var modified multi output.Out2<cylinder var.GetValue

When I delete and recreate the link it doesn't work anymore, but can't fix the problem

Offline

Board footer

Powered by FluxBB