SketchUcation Plugin Store

 

 

Getting Started with C++ and Sketchup

Getting Started with C++ and Sketchup

Postby sketchaholic » Thu Mar 31, 2011 8:21 pm

Hi, I'm a new user and I'd like to get started with the programming aspect of Sketchup. I'd just like to ask you all how to get started with the C++. I downloaded the package on the SDK kit, but now, what's the next step?

I'd prefer to use C++ since that's the language I'm most familiar with, but if necessary I'll use Ruby. The

When I go to the stuff downloaded from the SDK page, there's a folder with "Binaries" "Documentation" "Example" "Interfaces". So, where do I go from here? Any help would be appreciated.
sketchaholic
 
Posts: 2
Joined: Thu Mar 31, 2011 8:09 pm

Re: Getting Started with C++ and Sketchup

Postby Dan Rathbun » Fri Apr 01, 2011 5:51 am

The SDK you downloaded is mostly for 3rd Party applications to enable reading and writing SKP format files.

The language for scripting inside Sketchup is Ruby. So you need to learn Standard Ruby. Sketchup loads Ruby extensions (modules called the Sketchup API, and some additions to standard Ruby classes.)

There is no way for you to avoid learning Ruby.

However.. Ruby itself is written in C. Once you know how Ruby works, you can write plugins for Sketchup in C or C++ and wrap them to expose them to Ruby. (There are tools like SWIG that make this easier.) These kind of plugins are complied into a SO or DLL files. Many of the standard extented Ruby libraries are distro'd as compiled .so files. The global Ruby method require() can load text scripts (.rb) and also compiled binaries (.so,.o,.dll,.dylib, etc)

Click the link in my signature line.. it will lead you to a bunch of information, downloadable books, etc.
You can also search this forum.. as we've discussed writing plugins in C and C++ in the past.
User avatar
Dan Rathbun
Top SketchUcator
 
Posts: 4076
Joined: Tue Oct 06, 2009 3:06 am
Location: Florida, USA
Name: Dan Rathbun
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: education
Level of SketchUp: Advanced

Re: Getting Started with C++ and Sketchup

Postby sketchaholic » Sat Apr 02, 2011 6:21 am

Thanks.

Now I know where to start.
sketchaholic
 
Posts: 2
Joined: Thu Mar 31, 2011 8:09 pm

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Artisan Organic Toolset - a set of powerful organic modeling tools.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012


Return to Developers' Forum

Who is online

Users browsing this forum: arky09 and 5 guests