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 > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 12-18-2013
andrecorreia andrecorreia is offline
Flexsim User
 
Join Date: Feb 2013
Location: Brisbane City
Posts: 12
Downloads: 12
Uploads: 0
Thanks: 11
Thanked 3 Times in 3 Posts
Rep Power: 89
andrecorreia is on a distinguished road
Default Access data from a coupling node

Hi All,

How do I access data from a coupling node?

I need to access data from an active traveller of a connection between two nodes (see attached screenshot). I've got a pointer to the "activeTravelers" node already, so I also have a pointer to the "networkrequest" node (when it exists). Just don't know how to access its data.

I've tried a few things without success.

Thanks,
Andre.
Attached Images
File Type: jpg Snap1.jpg (300.0 KB, 68 views)
  #2  
Old 12-18-2013
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

You get the data with: getnodenum( obj )
To get the othernode: tonode( getnodenum( obj ) )
to get to the object of the othernode: ownerobject( tonode( getnodenum( obj ) ) )

(Yes we all agree it is not pretty but it works!)
The Following 3 Users Say Thank You to Steven Hamoen For This Useful Post:
Jörg Vogel (12-18-2013)
  #3  
Old 12-18-2013
andrecorreia andrecorreia is offline
Flexsim User
 
Join Date: Feb 2013
Location: Brisbane City
Posts: 12
Downloads: 12
Uploads: 0
Thanks: 11
Thanked 3 Times in 3 Posts
Rep Power: 89
andrecorreia is on a distinguished road
Default

Thanks Steven.

I was mistaken...

The data type of the node is 7. So it's not a pointer (coupling), it's of the type "simple". When trying to getnodenum, it returns 0 (zero).

I used getdatatype to find out the type of the node. From the manual:
getdatatype(thing)
Description: Returns the datatype of a node (0=none,1=number,2=string,3=pointer,4=object,5=par ticle,6=bundle,7=simple)."

So do you know how to get data from a "simple" data type node?

Cheers,
Andre.


Thread Thread Starter Forum Replies Last Post
Bitbucket access Carsten Seehafer User Development 0 09-23-2013 12:03 AM
How to set dynamicaly closing node edge in a network node Preethi Sivaramakrishnan Tips and Tricks 8 06-27-2013 01:35 PM
NetworkNode Access Abdul Mirza Q&A 5 08-09-2012 04:42 PM
Access db.. how to?.. Pablo Concha Q&A 2 12-06-2011 07:15 AM
Modifying Access MDB files… without Access (and free) Jorge Toucet Tips and Tricks 1 11-21-2008 05:13 AM


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.