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 > Gripes and Goodies
FAQ Downloads Calendar Search Mark Forums Read

Gripes and Goodies Software problems and suggestions

Reply
 
Thread Tools Display Modes
  #1  
Old 11-20-2007
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 516
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default The nodes in active view tree don't have unique names.

Hi Guys,

I was not sure if I should put my issue right away into the development plan, so I opened this thread to discuss about it.

I have quite some problems with the active views in the view tree.

Sometimes I need to get access to a specific view (View window, Global Table, GUI, etc.) because I like to manipulate something.

But because on one hand all ortho views are called ‘ortho’ it is not easy to identify the right one. Same with persp by the way.
On the other hand a Global Table might have the name GlobalTable Parameters119356104, but if I open it the next time it might be GlobalTable Parameters119359096.
So how can I refer to the one I want?

I know, that I can search through the views to find the first or the last ortho, but still I do not know which one is the right one I was looking for.

I am not sure what might be a good solution for this and this is why I opened this thread.

My first idea would be that the ortho should be called by the windowtitle (Standard: Orthographic View - 1 - model). So the user can change the title and can refer by name, if this is possible during open the view.
For the GlobalTable I would use a name like GlobalTableTableName (GlobalTableMyParameters).

I am not sure what to do with things like User Commands (How much sense does it make to have it twice open?) or with other windows.

I hope you got the issue I have and I am pretty sure that you guys will find a good solution for this.

Or there is already one and I just did not know.

Take care
tom the (A)tom

P.S.: I also did not find a way how I could manipulate the column size of a Global Table if I like to have different width for each column. Does not matter if the Global Table is open (active) or closed (not active). Am I right, that the column width is just one main parameter for all columns of this table?
I know that if I put the table in a GUI I can manipulate the width with the node cellwidth, but what if I do not want to use a GUI?
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
Reply With Quote
  #2  
Old 11-20-2007
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 516
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Okay, my P.S. issue I can now answer by myself .

It the same way as it can be done in the GUI.
Just put under the node cellwidth some additional nodes, make the nodes number nodes and put a value into it. The value is the width of the cell. The first node is for the first column, the second for the second, and so on.

I have no idea why I have overseen this the first time, because I was searching for it. Maybe I confused myself by all the posts I posted today .
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
Reply With Quote
  #3  
Old 11-20-2007
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 408
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default

Tom,

A discussion regarding the management of active windows in Flexsim comes up a lot around here. We realize it can be a challenge to manage all the windows available to you in Flexsim. In the next major release we hope to redesign the windowing interface to be more windows-like, more like a tabbed interface similar to Visual Studio. Anthony has did some experimenting with this a couple months back and had some real success. I just added a request item (ID# 413) to the Flexsim future development list regarding this point. Please feel free to add comments to the item regarding specific interface improvements you desire as part of this initiative.
Reply With Quote
  #4  
Old 11-22-2007
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 447
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

I recently desired to obtain a reference to the highlighted object in the most active view window FROM another object's GUI. In the end I made an assumption that the user was working in the last model view window that was open previous to the object GUI itself. (not the greatest assumption to make)

Because the orthographic and perspective views are renamed, I used a comparetext for "ortho" or "persp". However, I understand that that this would not work if I had of needed a reference to a different type of window like Tom.

This is the code in the OnPress of the button in the object's GUI. Is there a better way?

setcurrent(prev(ownerview(c)));
while(objectexists(current) && comparetext(getname(current),"Main Panel")==0)
{
if(comparetext(getname(current),"ortho") || comparetext(getname(current),"persp"))
{
setitem(selectedobject(current)); //hopefully another flowitem in the model
setcurrent(rank(node("@>objectfocus+",c),2)); //target item
if(objectexists(item) && comparetext(getname(node(">1",item)),"itemtype") && item!=current) //only if it is a flowitem
{
nodefunction(node("@>objectfocus+>labels/targeton/matchobjects",c), current, item); //my secret node function
}
repaintall();
return 0;
}
setcurrent(prev(current));
}
Reply With Quote
  #5  
Old 11-22-2007
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 221
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Hi Tom and Kris,

If you want to get a specific view under the active view, I can think of two ways.

The first way is to comprare the window title with your specific window title. The code would be something like this:
Code:
treenode activeViews = node("/active",views());
for(int i=1;i<=content(activeViews);i++){
    string winTitle=getviewtext(rank(activeViews,i));
    if(stringsearch(winTitle,"Orthographic View - 1")!=-1){
        pt("Found window ");pt(winTitle);pr();
        // Do whatever you want here
    }
}
The second way would be when you create a view, using somecode to explicitly set the name of that view (for example, "ortho1"). Then later you can use
Code:
node("/active/ortho1",views())
to directly refer that node.

Best wishes,
Alan
Reply With Quote
The Following User Says Thank You to AlanZhang For This Useful Post:
Efrain Marchena (06-05-2012)
  #6  
Old 01-18-2013
KvThiel KvThiel is offline
Flexsim User
 
Join Date: Jan 2013
Posts: 12
Downloads: 3
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 85
KvThiel is on a distinguished road
Default How can I reffer a command to a view in a active GUI?

Hi,

I created a videowall in the GUI with 5 views (called GUI 1) , respectively:
perspective 166
...
perspective 170


In the tree edit window: MAIN -> project-> events -> OnRunStart. I startup my created GUI 1, with this code:
string viewpath = "MAIN:/project/model/Tools/GUIs/GUI 1";
treenode viewnode = node(viewpath);
set(spatialx(viewnode),0);
set(spatialy(viewnode),100);
//set(spatialsx(viewnode),400);
//set(spatialsy(viewnode),400);
//set(viewpointx(viewnode),-15);
//set(viewpointy(viewnode),5);
//set(viewpointz(viewnode),0);
//set(viewpointrx(viewnode),315);
//set(viewpointry(viewnode),0);
//set(viewpointrz(viewnode),45);
//set(viewmagnification(viewnode),2);
//set(viewfield(viewnode),90);
//set(windowtitle(viewnode),2);
createview(viewpath, 0,0);

During the model run I want to change the views of the different perspectives on my GUI 1 (videowall).
What path do I have to use to get in control of these perspectives in the active GUI 1?

I tried everything that I could find on this forum, but nothing has worked. Please help me,...

kind regards,
Koen van Thiel
Reply With Quote
  #7  
Old 01-18-2013
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: 769
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

When you create the views, store pointers to them in global variables or a treenodearray global variable which can store all 5.

These days createview may return the pointer - if not just find the last gui in the list of active views each time you create one.
Reply With Quote
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Jörg Vogel (01-18-2013)
  #8  
Old 01-31-2013
KvThiel KvThiel is offline
Flexsim User
 
Join Date: Jan 2013
Posts: 12
Downloads: 3
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 85
KvThiel is on a distinguished road
Default

Hi Jason,

Could you explain a bit how it works with those pointers ?

maybe with an small example or code.

Kind regards,

Koen van Thiel
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access to the tree variables Iulian Marin Ion Q&A 2 02-06-2008 09:15 AM


All times are GMT -6. The time now is 11:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.