How to import 3dm file with c++

rhino5

#1

Hi;
I am sorry for the second time to ask this question, I try to import 3dm file into rhino sr9, but always failed.
the core:

ON_wString filename= "E:\\Test_Box.3dm";
filename.TrimLeftAndRight();
ON_wString script;
script.Format( L"_-Import \"%s\"", filename );
RhinoApp().RunScript( script, 1 );

And I copy the this sample : http://developer.rhino3d.com/guides/cpp/opening_a_3dm_file/ into c++ and run it, but failed too, now I do not kwon how to do it :sob:, cant somebody hepl me?.

Test_Box.3dm (46.4 KB)


(Dale Fugier) #2

Does this article help?

http://developer.rhino3d.com/guides/rhinocommon/run_rhino_command_from_plugin/


#3

Hi@dale:
Get it, think you:grin: