question

Marco Baccalaro avatar image
1 Like"
Marco Baccalaro asked Logan Gold edited

Layouts and conveyors

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);

}

}

FlexSim 24.1.0
bugmodel layouts
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Logan Gold avatar image
0 Likes"
Logan Gold answered Logan Gold edited

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.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.