Getting script call behavior via API call

I’m just beginning with Rhino and plugin development, so this might be obvious but I can’t figure it out.

I can import a file by using RunScript and skip over the scaling prompt by passing the _Enter parameter.

var result = RhinoApp.RunScript($"_-import “{filePath}” _Enter", true);

However if I try to import using the API call on the document the prompt always shows up in the command area and requires keyboard input before the plugin will continue.

protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{

doc.Import(filePath);

I’m wondering if there is some property on the RhinoDoc that I need to set to avoid the prompt?

Thanks, Patrick

Hi @user882,

Can you provide a working sample, that we can run here, that isn’t working for you?

– Dale