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 06-04-2011
shashanktrivedi shashanktrivedi is offline
Flexsim User
 
Join Date: Apr 2011
Posts: 59
Downloads: 26
Uploads: 0
Thanks: 26
Thanked 16 Times in 3 Posts
Rep Power: 122
shashanktrivedi will become famous soon enough
Default Dynamic Script Untraceable

Hi,

I was using clearcontent(model()); in delete button over model gui, it cleared model completely and i have lost one week of work because of this, strange thing model gui button command still working with some of the mistakes but its script is untraceable.

If somebody know how to retrieve it model gui script will be great help to us.

Attaching model for reference.

This could be one of the way of protecting script from novice user
Attached Files
File Type: zip Automatic Warehouse Layout.zip (59.7 KB, 128 views)
  #2  
Old 06-04-2011
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: 773
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

If you really think you've lost a week's work, it sounds like you're saving with the same name each time and not saving a new version of your model. This is not a good idea, and unless you're extremely short on space not necessary - especially with version 5 which automatically compresses the model (I know you don't have it, but along with the debugger, it's a good reason to move to 5.1.2)

So assuming you deleted your model and saved it over your single file, you should know that Flexsim creates a backup model when you save with the extension ".fsm!" . Just give that a new name with the extension ".fsm" and load it into Flexsim. With any luck you only saved once, and so this file should contain the previous save.

The actions that your code adds to Flexsim isn't "activity tracked". Things you do with a mouse and keyboard in the 3D and tree views and most GUIs are tracked and so you can use the undo function. If you want to undo your own code actions then you have to log the appropriate undo records yourself.
  #3  
Old 06-04-2011
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: 773
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

Okay, so now I've looked at your model and it's not empty, so again I think I misunderstood your question/statement. The Tools folder isn't at rank 1, which isn't good - you should change that using the setrank() command in a script.

Lars-Olof explained how to view the GUI code in your thread here.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
shashanktrivedi (06-06-2011)

Tags
dynamicscript


Thread Thread Starter Forum Replies Last Post
Dynamic Script String Issue shashanktrivedi Q&A 1 05-29-2011 03:52 AM
Dynamic Script shashanktrivedi Q&A 2 05-26-2011 11:36 PM
Dynamic script generation: Good Example with a User Command Naresh Yamani Tips and Tricks 2 05-16-2008 06:54 PM


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.