Skip to content

Instantly share code, notes, and snippets.

@rgm
Created March 31, 2011 20:48
Show Gist options
  • Save rgm/897224 to your computer and use it in GitHub Desktop.
Save rgm/897224 to your computer and use it in GitHub Desktop.
Boilerplate module entry point for Vectorworks SDK work
#include "Menu.h"
#include "Parametric.h"
#include "Tool.h"
#define REGISTER(x) REGISTER_Extension<x::Definition>(GROUPID_Extension##x, action, pInfo, ioData, cbp, reply)
extern "C" long GS_EXTERNAL_ENTRY plugin_main(long action,
void *pInfo,
long &ioData,
CallBackPtr cbp)
{
::GS_InitializeVCOM(cbp);
gCBP = cbp;
{
using namespace VectorWorks;
VCOMPtr<ISDK> localSDK(IID_SDK);
gSDK = localSDK;
}
long reply = 0L;
using namespace VWFC::PluginSupport;
REGISTER(Menu);
REGISTER(Tool);
REGISTER(Parametric);
return reply;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment