V5 Wish List

 From:  Michael Gibson
10114.247 In reply to 10114.245 
Hi Mindset,

re:
> Additionally, I would be nice to have the option of importing only visible objects from a source file.
> Any hints on doing that, or about how to remove hidden objects added by an import?

For removing hidden objects that were just imported earlier in the same command, try this (warning untested code):

code:
var objs = moi.geometryDatabase.getObjects();
for ( var i = 0; i < objs.length; ++i )
{
    var obj = objs.item(i);
    if ( obj.hidden && obj.databaseRevision > moi.command.lastCommandRevisionEnd )
    {
        moi.geometryDatabase.removeObject( obj );
    }
}


> Separately, I'll try to get the current file-path by using the Save command as an example.

You can use moi.geometryDatabase.currentFileName to get the full path of the current file , and if you want to copy it to the clipboard pass it to moi.copyTextToClipboard();

- Michael