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

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2016
Lucas Klein
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default Double Click Event

Dear all,

Where can I locate, in the tree, the command that an object executes when "double-clicked"?

Thanks in advance,
Lucas Klein.
Reply With Quote
  #2  
Old 04-15-2016
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 148
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

Hi Lucas,
It is the clickcode() command. It returns the type of click in a view.
DOUBLE_CLICK returns 1 LEFT_PRESS returns 2 LEFT_RELEASE returns 3 RIGHT_PRESS returns 4 RIGHT_RELEASE returns 5.
if (clickcode()==1)
{
pt("Clicked!!");pr();
}
Prints "Clicked!!" to the output console when double clicked.

If you want to execute some code when the object is double-clicked,then go the object’s attribute tree add a text attribute with the name OnClick,toggle it as Flexscript,then write code on that text node.When you click the object the engine checks if that object has an OnClick attribute and if it is, it executes that node.

Last edited by sagar bolisetti; 04-16-2016 at 03:30 AM.
Reply With Quote
The Following 2 Users Say Thank You to sagar bolisetti For This Useful Post:
Jing Chen (04-16-2016), Jörg Vogel (04-16-2016)
Reply

Tags
click, event, properties

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
Open code editor with a double-click on FS treenodes Vincent Bechard Tips and Tricks 1 03-04-2015 12:44 PM
Problem with left-click move Augusto Zamora Q&A 4 11-08-2012 01:21 PM
How to let the flowitem not disappear when click onreset button oliver xie Q&A 4 05-23-2011 01:18 AM
Open _TD models directly from the Windows Explorer with double click Tom David Q&A 0 11-18-2009 09:55 AM
Double click to execute the onpress function sophia yao Q&A 4 07-15-2008 08:53 PM


All times are GMT -6. The time now is 10:43 AM.


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