Pat Stanford Posted January 23, 2020 Share Posted January 23, 2020 Do any of you fine people have an example of a simple Vectorscript Function Extension implemented in the SDK that I could learn from? Thanks, Pat Quote Link to comment
JBenghiat Posted January 24, 2020 Share Posted January 24, 2020 In the SDK, look in Source/Samples/TesterModule ExtVSFunc gives an example. Quote Link to comment
Pat Stanford Posted January 24, 2020 Author Share Posted January 24, 2020 Yeah, I see there is an example, but I can't even tell that it is really an example. Does it actually do anything? Can it be compiled and installed and actually called? This is probably the 6th time I have looked at the SDK and I have never been able to figure out enough of it to even do a "Hello World" object. GRRRRR. The docs just don't work with my brain. Quote Link to comment
JBenghiat Posted January 24, 2020 Share Posted January 24, 2020 Short answer - yes. If you compile the project, you'll get a TesterModule.vwlibrary (assuming Mac), which if you install in your plug-ins, you have access to this function: FUNCTION Add( p1 :INTEGER; p2 :INTEGER) : INTEGER that takes two integers as input and returns their sum. It will show up in the VS editor in the Test Category section. As for the particulars of getting everything set up in Xcode or VisualStudio, that's a longer conversation. Also crucial is ModuleMain.cpp, which registers the function when Vectorworks loads. The developer wiki has some information on the universal name and UUID. Quote Link to comment
Hippocode Posted February 11, 2020 Share Posted February 11, 2020 I can provide you with some other samples if you need some. They come in handy sometimes, the benefit is that such a tiny script has access to your complete SDK. If you have SDK bases plug-ins you can use this to make certain data or functionality accessible through VS. I have made several of those for my plug-ins. e.g.: The ability to activate our license to use our software for the current session, bypassing our default activation method. It requires a custom hash to unlock the current specific day. 1 1 Quote Link to comment
Pat Stanford Posted February 11, 2020 Author Share Posted February 11, 2020 @Hippocode If you have a small project that I could use as a starting point I would be very appreciative. As I stated, I have not been able to make any sense out of Xcode or the VW provided sample code. I am hoping that a project with a few comments can get me headed in the right direction. Thanks, Pat 1 Quote Link to comment
MullinRJ Posted February 11, 2020 Share Posted February 11, 2020 And I am hoping you figure it out Pat, so I may ask you questions. If you want a another blind minion to walk with you through the maze, I'll offer my directionless services. I've often wanted to do the same. Raymond Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.