Layouts and conveyors

Layouts and conveyors

MarcoBaccalaro
Participant Participant
23 Views
1 Reply
Message 1 of 2

Layouts and conveyors

MarcoBaccalaro
Participant
Participant

[ FlexSim 24.1.0 ]

Hello,

the Model Layouts functionality is incompatible with the conveyors.

I managed to solve the problem for the straight conveyors with the following code, but I can't solve it for the curves because the starting angle, sweeping angle and radius are not saved.


forobjecttreeunder(model()){

if(getdatatype(a) == DATATYPE_OBJECT){

if(isclasstype(a,"Conveyor::AbstractConveyor")){

Object conv = a;

double sx = spatialsx(conv).value;

setvarnum(conv,"length",sx);

conv.applyProperties("length");

function_s(conv,"finalizeSpatialChanges");

updatelocations(conv);

}

}

24 Views
1 Reply
Reply (1)
Message 2 of 2

logan_gold
Community Manager
Community Manager

This seems like Model Layouts are not intended to work with Conveyors. Model Layouts just save off the spatial information of each object, and Conveyors would need to have more data saved off and set whenever the layout changes.

I don't really have a good workaround for getting it to work with Curved Conveyors. You would need to save off the relevant data yourself whenever the Model Layout is set. And then set that data whenever the layout changes. You could probably change the necessary code in the Model Layouts view, but I wonder if that would need something like a Module to make sure those changes persist?

At any rate, I've added a request to the developers to update Model Layouts so they work better with Conveyors.

0 Likes