Navisworks API

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

Checking for available license via Automation API

240 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
Posts: 28
Registered: ‎01-07-2010
Message 2 of 3 (218 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: 27
Registered: ‎07-13-2011
Message 3 of 3 (209 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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community