studio icon indicating copy to clipboard operation
studio copied to clipboard

Possible bugs in importing project process

Open glt248 opened this issue 1 year ago • 4 comments

Hello, When you import 2 instances of a same project : image

We can see widgets for the two instances : image

But instances global variables are not distinct : image

So if I increment on variable, the two have the same value. I can't use two instances of the same project.

glt248 avatar May 07 '24 15:05 glt248

Can you explain the purpose of importing the same project twice?

mvladic avatar May 07 '24 15:05 mvladic

I'm using project to create a front end User Widgets and some User Actions in order to communicate with a DC/DC converter. So that is a under projet.

In a main project, I'm importing two instances of this controller because I'm using 2 DC/DC in a test bench...

glt248 avatar May 07 '24 15:05 glt248

I will investigate this.

But, you should consider the following solution for your use case as implemented in this project:

test_dashboard.zip

Here, there is an user widget which has device_idx input. With this input you can select for which device you want to work inside specific instance of user widget. Also, there is a global variable called devices, declared as array of Device structures, which holds all the date required per device.

I used this approach in several different dashboards, one is BB3 Dashboard (accessible from Examples tab) where each BB3 slot is represented with Slot user widget and there is slots variable of type array:struct:Slot which is defined as:

image

mvladic avatar May 07 '24 17:05 mvladic

Ok, thank you for this reply, I will have a look on your proposal.

glt248 avatar May 07 '24 17:05 glt248