Hi Len,
re:
> How can I access object user text?
From the UI it's under Details... > Object user text.
From script:
.setUserText( Key, Value ); - Set text value for given key.
.getUserText( Key ); - Returns text value for given key, or undefined if not present.
.removeUserText( Key ); - Remove user text value for given key.
.getAllUserText(); - Return list of all user text, each object has .key and .value properties.
.clearAllUserText(); - Clear all object user text.
> Can it be set for individual segments?
No, not really. You can set it on a segment but it won't show up in the UI and it won't get persisted. It's meant to go on the curve.
> Is there a moi.filesystem.setSavePath to choose directory to save files in if I want to have
> the user enter the file name in a text dialog?
There's moi.filesystem.getSaveFileName() if you want to get a file name from the user, like this:
var filename = moi.filesystem.getSaveFileName( 'Text file name', 'Text files (*.txt)|*.txt' );
If you want to get a directory name from the user instead of a file name, in v5 there is moi.filesystem.getDirName(),like this:
var dir = moi.filesystem.getDirName( 'Dialog caption', 'c:\\initpath' );
returns empty string if canceled.
- Michael
|