AnsweredAssumed Answered

How to connect to the NEW ConstraintsAuto API from Windows OLE

Question asked by brianeldridge on Aug 19, 2019
Latest reply on Aug 29, 2019 by brianeldridge

Does anyone know how to connect to the new ConstraintsAuto API from Windows OLE (Windows COM model), ideally in a PERL example.  For example, the OLD CES Automation API could be accessed via:

 

use Win32::OLE;

$app = Win32::OLE->GetActiveObject("Ces.Application")

$ces = $app->Tools("CES");

 

From this $ces object, one could readily follow all of Mentor's example scripts, however, I have been unable so far to get an answer on how to do this with the NEW "ConstraintsAuto" API.  None of the below works:

 

$app = Win32::OLE->GetActiveObject("ConstraintsAuto");   # This returns an UNDEFINED
$ces = $app->Validate('0');  # This returns an ERROR, so I'm unable to get a "license" for this free interface

$ces = $app->ActiveDocument;  # This was also just a wild guess but also returns an ERROR

 

$app = Win32::OLE->CreateObject("ConstraintsAuto");   # This returns a pointer but the subsequent calls do not work

$ces = $app->Validate('0');  # This still returns an ERROR

 

So, does anyone know how to get at the "Validate('0') method via the Win32::OLE com interface so as to be able to follow along all the VBScript examples that start with "Scripting.Validate('0')".  So far SupportNet has been unable to answer this.

 

Thanks

Brian Eldridge

Outcomes