Navisworks API

Navisworks API

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

Checking for available license via Automation API

286 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: 34
Registered: ‎01-07-2010
Message 2 of 3 (264 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 (255 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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.