Reload STEP file on change; keep view position

Next
 From:  NaN
10437.1 
Hi,

considering to use MoI as a viewer for STEP files that I generate externally. Is it possible to set up MoI so that it automatically reloads a STEP file when it changes on harddrive? And optimally in a way that the perspective that I have set up in the views stays as is.

The best I could find up to now was to add this script to a shortcut: script:moi.geometryDatabase.fileNew(1);script:moi.geometryDatabase.fileImport("<path-to-my-stepfile>");
This reloads the step file at the press of a button (instead of on-change) and resets the views to default, so they have to be rearranged.

Is the behavior described above possible?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
10437.2 In reply to 10437.1 
Hi NaN, sorry no MoI does not currently have any mechanism in it to monitor a file for changes.

A shortcut key reload script like you were trying to do should be possible though, it's the fileNew part of it that will reset your viewports. The fileImport part should read in the file and not disturb any of the current views.

So instead of doing fileNew try deleteAll instead, like this:

script:moi.geometryDatabase.deleteAll(); moi.geometryDatabase.fileImport("<path-to-my-stepfile>");

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  NaN
10437.3 In reply to 10437.2 
Yay, that works! Pressing a button is ok :)
Thanks Michael!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All