My fault, it is ISkpDocument*, not ISketchUpDocument*.
Now it works!
Thank you very much!
📷 GIF Exporter 1.1 | create animated GIFs from SketchUp models with customizable settings
Download
Z
Latest posts made by zsacul
-
RE: How to pass ISketchUpDocument from SU into c++
-
RE: How to pass ISketchUpDocument from SU into c++
Thanks for answer.
Reading only would be fine.When I execute:
UI.messagebox IleD.call Sketchup.active_model.skpdoc extern "C" int GetNum2(sketchup;;ISketchUpDocument*pDoc) { return pDoc->IsValid(); }
it crashes, so I assume pDoc pointer is wrong.
when I change it for
return 2;it shows 2.
Any ideas, what may be wrong?
-
How to pass ISketchUpDocument from SU into c++
Hi,
I am working with SU sample plugin from TBD (many thanks for that).
I have c++ dll with function:extern "C" int GetNum2(void * spApp)
{
sketchup::ISketchUpDocument* pDoc = (sketchup::ISketchUpDocument*)spApp;return pDoc->IsValid();
}
suddl.def:
EXPORTS
GetNum2In .rb file I have:
mydll = path + "/SUDLL.dll"
IleD = Win32API.new(mydll,"GetNum2",["P"],"I");
UI.messagebox IleD.call(Sketchup.???)Is it possible to pass ISketchUpDocument pointer from Sketchup, to manipulate current view by c++ plugin?
For example to write a c++ function that will move all points by Vector(10,0,0)?