question

Sebastian Hemmann avatar image
0 Likes"
Sebastian Hemmann asked Joerg Vogel edited

Where to find Quick Propertie Functions in the tree?

Hi,

lets say I have the coordinates of a way. That means the start- and the endpoint.

If I want to use Conveyors or AGV Paths to implement this, I can manually set the start- and endpoint in the Quick Properties or I can set variables in Tree under spatial (which means my data has to be translated first). Because I have the choice to do it in the Quick Properties I´m quiet sure the Translation already exists in FlexSim anywhere!? But I can´t find it, because as soon as I click anything else than the object the Quickproperties also change.

Does anybody have a hint for me, what I´ve missed?

Greetings from Germany

Sebastian

FlexSim 17.2.1
conveyoragv pathquick propertiesexplore structure
· 2
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

Hi, Sebastian, you can start with a search for the keyword "function_s".

Look for all answers where you can find this command. There are already direct answers for the different modules you want to adjust by code. It isn't exactly a method to get an access to the nodes of the quick properties in its maintree or view tree.

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·
0 Likes 0 ·

1 Answer

Phil BoBo avatar image
3 Likes"
Phil BoBo answered Sebastian Hemmann commented

"But I can´t find it, because as soon as I click anything else than the object the Quickproperties also change."

You can explore the structure of a Quick Properties panel:

Even if the visible panels in Quick Properties change, you can still view the structure of the panel you explored:

"I´m quiet sure the Translation already exists in FlexSim anywhere!?"

I don't understand what this question is asking. What "Translation" are you talking about?

By exploring the structure of the GUI, you can see what code it is calling. For example, a conveyor's Start position calls this code to apply it:

function_s(up(up(up(c))), "applyDragStart", focus, x, y, z, activedocumentview());

Then you can look at the applyDragStart event function on the node 3 nodes up from that object to see what it does:

int undoId = beginaggregatedundo(c, "Change Conveyor End Spatials");
createundorecord(c, c, UNDO_CUSTOM);
createundorecord(c, param(1), UNDO_CUSTOM);
treenode focus = param(1);
double x = param(2);
double y = param(3);
double z = param(4);
if (up(focus) != model()) {
	double oldX = x; double oldY = y; double oldZ = z;
	x = vectorprojectx(up(focus), oldX, oldY, oldZ, model());
	y = vectorprojecty(up(focus), oldX, oldY, oldZ, model());
	z = vectorprojectz(up(focus), oldX, oldY, oldZ, model());
}
function_s(focus, "dragStart", x, y, z, param(5));
createundorecord(c, c, UNDO_CUSTOM);
createundorecord(c, param(1), UNDO_CUSTOM);
endaggregatedundo(c, undoId);


function_s(param(1), "clearNonLockedPoints");
function_s(param(1), "notifyEdgePointsOnEdgeMoved");
function_s(param(1), "finalizeSpatialChanges");

You can see what function_s() calls are being called on the conveyor to set its start location:

function_s(conveyor, "dragStart", x, y, z, view);
function_s(conveyor, "clearNonLockedPoints");
function_s(conveyor, "notifyEdgePointsOnEdgeMoved");
function_s(conveyor, "finalizeSpatialChanges");

· 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.

Sebastian Hemmann avatar image Sebastian Hemmann commented ·

Thanks, I just didn´t click on a field but in the empty part of the Quick Properties. So I didn´t get the same Tree as you.

The "Translation" I was looking for, is the way "Start-/Endpoint data" changes to "Startpoint with Spatial Data". I´m sure with your help I will figure this out.

1 Like 1 ·