This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at 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.

Go Back   FlexSim Community Forum > FlexSim Software > Tips and Tricks

Tips and Tricks Share helpful modeling ideas

Old 08-18-2015
Axel Kohonen
Posts: n/a
Downloads: 22
Uploads: 0
Default How to change view using code


I asked support how they do to change to a certain view in Flexsim as when you click the name of the view in the Flexsim interface. I needed it when I wanted to make a custom GUI. See the answer from support below as well as an example model on how to use it.

Note: The code in the OnPress trigger for the buttons in the GUI looks for a view with the same name as the button node in the GUI so remember this if you change the name of the button or the view.

Hope it helps someone.

Hi Axel,

There's an applicationcommand called "changeperspview" that should do the trick. It's called like this: applicationcommand("changeperspview", viewName, activedoc); where the viewName is the name of the saved view, and the activedoc is activedocumentnode().

If you right click on the Views menu in Quick Properties, go to View and then Explore Structure. The code I copied the above from is in the OnSelect eventfunction of SelectView. Since that's how we do it, it should work for you!
Attached Files
File Type: fsm changeViewDemo.fsm (17.6 KB, 652 views)
The Following 2 Users Say Thank You to Axel Kohonen For This Useful Post:
Jing Chen (08-18-2015)

gui, view

Thread Thread Starter Forum Replies Last Post
view far juan alberto Q&A 2 02-25-2011 10:52 AM
New Ortho View Brandon Peterson User Development 4 06-05-2008 08:13 AM
New view setting KelvinHo Q&A 2 05-29-2008 01:44 AM
Get view reference AlanZhang Q&A 3 03-13-2008 08:51 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.