Jump to content
Developer Wiki and Function Reference Links ×

Call Script in vwx file remote.


Ryota

Recommended Posts

This can be done with the ActiveX interface.

I have problems to get it work but you could give it a try since it only takes some minutes.

 

First start VW as Admin once to register the ActiveX interface.

 

Then you can create a JavaScript that uses the COM-Objects for Example.

var fVWCore = new ActiveXObject("VectorWorks.Core");
var fVWScript = new ActiveXObject("VectorWorks.Script");

var fullFilePath = "C:\\Users\\????\\Desktop\\Sample VWX Files_2016\\";
var fileName = "sample_A.vwx";

fVWCore.OpenDocument(fullFilePath + fileName, false);
fVWScript.DoScript("AlrtDialog('hello from the java script');");

Use the 'Windows Based Script Host ' to execute the script.

Tell us if it works.

 

regards

Edited by Patrick Winkler
  • Like 2
Link to comment

Hi, Patrick Winkler.

 

It Worked out using ActiveX.
Thank you very match for your advice.

 

May I ask additional question.
Are there any available ActiveX Methods to pass PythonScript to VectorWorks.
I tried DoScript of ActiveX but it didn't work.

Link to comment

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.

×
×
  • Create New...