@menno You’ve talked about an import plugin last week. I’m trying to import a STL file with 1 geometry in it. I’ve tried the same as the 3DM but I always get a popup where it asks rotation/scale etc. Is there a way to supress that?
Code:
Public Sub ImportSTL(ByVal Location As String)
Dim O As New Rhino.FileIO.FileReadOptions
O.ImportMode = True
Rhino.RhinoDoc.ReadFile(Location, O)
End Sub
I´ve tried to set ScaleGeometry too False and BatchImport but then the dialog will be suppressed but I still need too press enter, because it´s in the command bar.
I’ve got a plugin where I scripted 90% of what I made. On some points it bugs on undo and redo because scripts are withing scripts etc.
So when I program it it looks better and scripts wont run within scripts and i think if somethings going to change with a command it will be with a scripted command and not with a programmed one :). programmed ones will work but with scripted you have to find the problem. No debugg options.
I know it’s a quite old topic but where can I find documentation how to make a file import plugin to import PDF into Rhino remotely? I’ve found the class but Rhinocommin doesn’t tell much how to use it.
@menno By ‘remotely’ I mean that Rhino is controlled by another software via a COM Interface :I created a general plugin which sits inside Rhino, which is accessible via COM and which can call Rhinocommon methods, as exposed here : https://github.com/mcneel/rhinocommon/tree/master/examples/AutomationSample. Problem is that I cannot find any method inside Rhinocommon to import non 3dm files.
@dale ok I understand how to create a File Import Plug In, but what about using existing one (like ***Import.rhp)? Is that doable and allowed by the license agreement?
You don’t need a special plug-in to do this. Just use the Command method on the Rhino application object to script the Import command. There is no API for doing this in any other way.
Ok, then I’ll try to find a workaround. Would you have by any chance a hint on how to figure out that Rhino has triggered an error while attempting to load the file (as per screenshot below)?
At least, it will provide me with a basic feedback loop (success/failed.
Sure, please find it below. But any non vectorial PDF will lead to that alert being displayed. And that’s expected, from my understanding of Rhino, it cannot import images that way.
Problem is that I have no control over the input file flow and actually no idea on how I could detect a non vectorial PDF before attempting to import it.