question

Sean Webster avatar image
0 Likes"
Sean Webster asked Ben Wilson commented

Visual bug with conveyor legs when created with a script

I am working on a program which involves creating straight conveyors using a script and setting the "rise" variable to create a slope on the conveyor. When two of these conveyors are connected, often one or more of the legs on the conveyor have a visual bug where only half of the leg seems to be behaving normally. I'll attach a screenshot of part of the script and the resulting conveyor. Is there something in the script I should change or is this a bug that needs to be fixed on your end?

treenode rollerVisual = node("MODEL:/ConveyorSystem>variables/visualizations/RollerConveyor");

Object objlADE = createinstance(node("conveyor/CurvedConveyor", library()), model());
objlADE.setVariable("radius", 1.1938);
objlADE.setVariable("sweepAngle", -90);
objlADE.setVariable("startAngle", 90.0);
objlADE.setLocation(3.6560124999999988,7.286625000000001,0.762);
objlADE.setVariable("rise", 0.0);
objlADE.setVariable("width", 0.6414);
objlADE.setVariable("visualization", rollerVisual);
objlADE.setVariable("speed", 24.0);
objlADE.setVariable("accumType", 1.00);
objlADE.setVariable("stopSpaceSizeFactor", 0.00);
objlADE.setVariable("moveSpaceSizeFactor", 0.00);
objlADE.setVariable("entrySpaceSizeFactor", 0.00);
objlADE.setVariable("stopSpacePadding", 0.0);
objlADE.setVariable("moveSpacePadding", 0.0);
objlADE.setVariable("entrySpacePadding", 0.0);
function_s(objlADE, "finalizeSpatialChanges");
 
Object obj24B7 = createinstance(node("conveyor/StraightConveyor", library()), model());
obj24B7.setLocation(4.849812499999999,7.286625000000001,0.762);
obj24B7.setRotation(0,0,270.0);
obj24B7.setSize(3.048,0.711,1);
obj24B7.setVariable("rise", 0.254);
obj24B7.setVariable("width", 0.6414);
obj24B7.setVariable("visualization", rollerVisual);
obj24B7.setVariable("speed", 24.0);
obj24B7.setVariable("accumType", 1.00);
obj24B7.setVariable("stopSpaceSizeFactor", 0.00);
obj24B7.setVariable("moveSpaceSizeFactor", 0.00);
obj24B7.setVariable("entrySpaceSizeFactor", 0.00);
obj24B7.setVariable("stopSpacePadding", 0.762);
obj24B7.setVariable("moveSpacePadding", 0.762);
obj24B7.setVariable("entrySpacePadding", 0.762);
function_s(obj24B7, "finalizeSpatialChanges"); 

Object obj2DC8 = createinstance(node("conveyor/StraightConveyor", library()), model());
obj2DC8.setLocation(4.849812499999999,4.240212500000002,1.016);
obj2DC8.setRotation(0,0,270.0);
obj2DC8.setSize(3.048,0.711,1);
obj2DC8.setVariable("rise", 0.254);
obj2DC8.setVariable("width", 0.6414);
obj2DC8.setVariable("visualization", rollerVisual);
obj2DC8.setVariable("speed", 24.0);
obj2DC8.setVariable("accumType", 1.00);
obj2DC8.setVariable("stopSpaceSizeFactor", 0.00);
obj2DC8.setVariable("moveSpaceSizeFactor", 0.00);
obj2DC8.setVariable("entrySpaceSizeFactor", 0.00);
obj2DC8.setVariable("stopSpacePadding", 0.762);
obj2DC8.setVariable("moveSpacePadding", 0.762);
obj2DC8.setVariable("entrySpacePadding", 0.762);
function_s(obj2DC8, "finalizeSpatialChanges"); 


FlexSim 21.1.2
bug reportflexsim 21.1.2
legsbugscript.png (78.4 KiB)
legsbug1.png (448.3 KiB)
legsbug2.png (215.0 KiB)
legsbugscript.png (79.8 KiB)
· 1
5 |100000

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

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @Sean Webster, was Logan Gold's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Logan Gold avatar image
0 Likes"
Logan Gold answered

@Sean Webster, a few of us were able to use the script in your screenshot (added as text to your post) without issue. The added Conveyors came in without any visual glitches.

I know you marked the question as 21.1.2, but I just want to double check that that is the version you are using, because I was able to test it in 21.1.2. So in the FlexSim software, if you go through the Help menu and choose "About FlexSim", does it show 21.1.2 in the Engine/Content Version lines?

If so, then it might be worthwhile if you can upload a copy of the model that is showing this issue for you. We could then check to see if the issue carries over with the model to a different computer (you can also test this out if you have access to another computer that can run FlexSim). In which case we should be able to troubleshoot it more with the model.

Or if the issue doesn't appear in the snippet we have tested, but does appear in a longer snippet of FlexScript that you are using in the model, we should be able to help track down the issue. You could also try uploading the longer snippet of code in a text file (so it doesn't take up too much room on this post) and we could test it as well.

If the issue doesn't appear when the same model is run on a different computer, then the issue might be related to something with your installation of FlexSim, in which case we can try some other things.

5 |100000

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