question

Stephane R avatar image
0 Likes"
Stephane R asked Stephane R commented

programmatically place input and output ports in a BasicFR ?

I have a single scripted BasicFR that represents a large (by square footage) portion of a building. The FR has many dozens of input and output ports. In order to minimize user mistakes, during the creation of the model; I'd like for the conveyors that are around the FR, and are placed according to CAD dimensions, to be 'aligned' with their corresponding logical input/output port in the FR.
Can I programmatically control the location of each port ?
Can I set a location 'inside' the footprint of the BasicFR, or am I limited to the edge ?

FlexSim 19.2.1
programmatic controlinput output port location
· 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.

tannerp avatar image tannerp commented ·

Hi @Stephane R,

I'm having a hard time visualizing what you want this to look like as a final product. Is there any chance you could upload a small sample/demo to show what you are looking for? Normally port locations are just assigned to a default area on an object, but I suppose you could manipulate that if you wanted.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel tannerp commented ·

@Tanner Poulton, I think it is adaption of a Virtual Instrument of the tool LabVIEW from National Instruments Corp.

0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
3 Likes"
Joerg Vogel answered Stephane R commented

The ports of objects can’t be located. There is only one module that supports a kind of locatable ports. That is the conveyor module. All other objects have defined locations for input and output ports. But that is only partly true, because those ports are added sub-objects in the scope of conveyor system. And it is absolutely unnecessary to place ports, because you can set the location of items OnEntry individually.

But You can still try to evaluate the location where the connector is dragged by the event “mouse button up” while you draw a connection. By this event you can execute code that build the logical connection in your code of your BasicFR. Visually the input or output port are located like at every other object then.

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

@Stephane R, you can enhance your model with queue objects as subnodes. The BasicFR is then a container for the queue. Please try it on your own, because I haven’t tested this. I don’t know if I can drag a connection to a queue into the container of a fixed resource. I think it works.

0 Likes 0 ·
Stephane R avatar image Stephane R Joerg Vogel commented ·

Thanks for the suggestion. This is also the direction I was leaning to.
I will create a group of objects, each of which I should have complete programmatic control over relative position and naming.

I'll post an update to the question when/if that works well for me.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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