Navisworks API

Navisworks API

Reply
Active Contributor
|flyte|
Posts: 28
Registered: ‎07-13-2011
Message 1 of 3 (276 Views)

Checking for available license via Automation API

276 Views, 2 Replies
07-13-2011 12:43 PM

Is there a way via the API to check for a valid license. I want to check for this before I attempt to create the NavisworksApplication() object.

 

If no license is available when trying to create the NavisworksApplication, then a dialog pops up. I would rather this dialog not appear, so before attempting any automation, I want to check for license availability first.

 

thanks,

 

Active Contributor
markusvikström
Posts: 32
Registered: ‎01-07-2010
Message 2 of 3 (254 Views)

Re: Checking for available license via Automation API

07-18-2011 03:39 AM in reply to: |flyte|

I solved this by querying the Flexlm server and browsing the returned string for the license and available licenses.

 

E.g. Using the System.Diagnostics.Process with necessary arguments:

 

lmutil lmstat -a -f [feature] -c [port]@[servername]

 

Capturing the Process.StandardOutput.ReadToEnd() you can use regular expressions or similar to very fast find the necessary availability of the licenses.

 

Hope this gave some ideas...

 

BR,

Markus

 

 

 

 

 

Active Contributor
|flyte|
Posts: 28
Registered: ‎07-13-2011
Message 3 of 3 (245 Views)

Re: Checking for available license via Automation API

07-18-2011 03:07 PM in reply to: markusvikström

Does anyone else consider this a serious ommision from the automation api? The whole point of it is so that we can perform tasks that don't require user interaction!! Checking for a license seems to be pretty integral in the process.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.