ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > User Development
Downloads

User Development User developed add-ons to Flexsim

  #1  
Old 12-21-2010
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default Named Connections

Having one object refer to another is usually done through (multiple) centerport connections. This requires you to know the port numbers you want (defines make this easier) and if you delete and replace objects you'll likely need to go back through and re-rank the ports.

Attached is a library and example model that uses a simple command to retrieve the object you want WITHOUT using port connections:
getconnected(current,"MyConnectionName")

There are commands to add connections too, and a GUI to manage them for the whole model (in the example model it's mapped to the Model Control GUI). The Named Connections page of that GUI can be added to the list of pages on an objects GUI/Properties tabcontrol.

Two types of connection are made:
1) A bidirectional link (coupling) that is destroyed when either of the two connected objects are destroyed. This link can have different connection names at each end, so the same link could be called 'child' on one and 'parent' on the other, Customer/Supplier, etc...
2) A single direction pointer to the other object. If that object is then destroyed, the pointer's value will be NULL.

In the example the names are UnLoadPosition, LoadPosition, UnloadingOperator, RepositioningTransporter, FRsToMove, FRsToUnload, FRsUsingForReference

I've not put it to extensive use yet, so any feedback/testing is welcome.

Thanks and happy holidays!
Attached Files
File Type: zip NamedConnections_stillageMoveableQueue.zip (89.4 KB, 201 views)
File Type: zip NamedConnections_0.1.zip (6.4 KB, 199 views)

Last edited by Jason Lightfoot; 02-14-2012 at 02:03 PM.
The Following 3 Users Say Thank You to Jason Lightfoot For This Useful Post:
Lars-Olof Leven (12-22-2010)


Thread Thread Starter Forum Replies Last Post
Global variable named "i" Bill Chan Gripes and Goodies 1 04-21-2009 06:40 AM
Automated creation of connections between ports Matthias Hofmann Q&A 3 06-25-2008 03:04 AM
improve Connections method qin tian Gripes and Goodies 7 03-26-2008 09:42 AM
Flickering yellow line during drag connections in Vista Dr. Eamonn Lavery Q&A 0 11-09-2007 10:48 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.