My fault, it is ISkpDocument*, not ISketchUpDocument*.
Now it works!
Thank you very much!
Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Z
Offline
Posts
-
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)?