Jump to content
Pat Stanford

Vectorscript Function Extension?

Recommended Posts

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

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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.

 

 

 

  • Like 1
  • Love 1

Share this post


Link to post

@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

  • Like 1

Share this post


Link to post

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

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...