ATTENTIONThis 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 |
#1
|
||||
|
||||
How to work with activedocumentnode
I try to use a few existing GUI items and encountered the command: "activedocumentnode()" But when I put it at the top of my code it always returns a NILL. What is the trick with using this command?
And what is a document? Is that a GUI? Last edited by Steven Hamoen; 09-23-2009 at 06:05 AM. |
#2
|
||||
|
||||
Hi Steven!
I've also tried activedocumentnode() without a result. With nodefromwindow(activeview()) it works for me. Maybe this might help you... |
The Following User Says Thank You to Carsten Seehafer For This Useful Post: | ||
Steven Hamoen (09-23-2009) |
#3
|
||||
|
||||
Hi Carsten,
Thanks for your answer, but it means that I have to go through 16 objects and change the code, so I wait a little till I have more information. |
#4
|
||||
|
||||
A document is a GUI with a documentwindow attribute.
activedocumentnode() only works in GUIs with a palettewindow attribute, such as the Modeling Utilities. It returns a reference to the currently active window that has a documentwindow attribute, such as the ortho, perspective, and tree views. If those windows are tabbed together, it returns a reference to the selected tab. Palette windows are designed as tool windows that affect the currently active document window. They are specially designed to allow document windows to remain active when the palette window is clicked. If your gui isn't a "palettewindow", then it will become the active window when clicked so there is no active document window. |
The Following 5 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Steven Hamoen (09-23-2009) |
Tags |
activedocumentnode |
Thread | Thread Starter | Forum | Replies | Last Post |
How does a Simulation Engine work ? | Vinay Mehendiratta | Q&A | 2 | 02-14-2008 01:01 PM |