Checking for license

Checking for license

hbc85
Enthusiast Enthusiast
1,028 Views
11 Replies
Message 1 of 12

Checking for license

hbc85
Enthusiast
Enthusiast

Hi.

 

I'm wondering. At work we have a routine that use Navisworks simulate. It opens simulate silent and runs an convert routine from a dwg to nwd. but. users sometimes have problems and the program does not give out an error when it happens. And often it is because Navis needs the user to login again to activate the license again.

 

Is it possible to make a lisp routine to check first if the license is active before the original routine runs?

0 Likes
1,029 Views
11 Replies
Replies (11)
Message 2 of 12

Kent1Cooper
Consultant
Consultant

[You're looking for AutoLisp to check whether a Navisworks license is activated?  Shouldn't you be in a Navisworks Forum instead?]

Kent Cooper, AIA
0 Likes
Message 3 of 12

hbc85
Enthusiast
Enthusiast

weeeeellll

i am using autocad to check. as it all starts when using autocad.

ssssooooooo thats why im starting with asking via the autocad forum.

0 Likes
Message 4 of 12

ec-cad
Collaborator
Collaborator

I think you would have to examine in Windows Registry (Regedit).

In Lisp, you (could) examine the Registry entry, if you can find it...

It (may) be a Security issue as well..

Or, check if Navisworks is 'running' at all ?

 

AND, it may be a mute issue, since if Navisworks wants user to 'logon' ... they will have to do that anyway.

 

 

 

ECCAD

 

0 Likes
Message 5 of 12

hbc85
Enthusiast
Enthusiast

The prosses goes like this:

an program uses a routine to split an AutoCAD model inn to parts.

then take the parts and make individual nwd files of them so we can upload them to a viewer.

 

as it runs Navis via api\silent\with no gui. the end user only see that the first program don't finish correctly.

 

i have a lisp routine that helps that program by making pre selection sett of names\tags that the program uses to make it easier for people. but because my program\routine goes first in this whole prosses. I get all the complaints. and all my routine does is make some text files. So i was asked if i on my end is able to make a check to see if navis at all wants to open or has a valid license. Yes the user needs to open navis to login. But they don't know they need to do that as it is right now. So just looing inn to the ide of making an error come up. So the user is informed that they need to open navis and login before running the program that makes the nwd files. And in turn makes my life so much easier. 

0 Likes
Message 6 of 12

ec-cad
Collaborator
Collaborator

Bit of a cludge, but you could try this approach.

User calls your Lisp.

Within that Lisp, you get input, and assign your outputs.

So, you (should) know the name of the file & location of the Navis output.

Do a (delay 5000) -  5 second delay.

Check for presence of the Navis output file.

If exists, just go on.

If (not exists) - Alert "Navis failed to output the xxx.xxx file, Please Logon to Navisworks and try again:"

(quit)

 

ECCAD

 

0 Likes
Message 7 of 12

hbc85
Enthusiast
Enthusiast

Not a bad thought at all.

 

The problem is that this prosses takes some time as the program it self takes a big model and splits it.

The navis part don't take that long time. But the splitting takes time.

And we had a situation where i opened this program via mine 

((command)) and the dcl dialog of my program was sett to quit right after lunching this other program.

 

What no one knew was that when opening that program. in this way was that windows was sett to ping my dcl dialog because the quit/close part don't get to start. After some time it quits AutoCAD. But no one knows that until this program was finished. And only during the times where you were generating many files at once. So when the user was finished with the program. AutoCAD was released and because in the background windows had quit AutoCAD. AutoCAD crashes. 

So now we open it via "startapp:program.exe" that don't open it via AutoCAD and therefor the dcl dialog can quit as it should.

 

thanks for brain storming with me 🙂 

0 Likes
Message 8 of 12

ec-cad
Collaborator
Collaborator

Does that mean you got it working ?

 

ECCAD

0 Likes
Message 9 of 12

hbc85
Enthusiast
Enthusiast

hi. 

 

No. i was trying to explain why that way wont work for our application.

But i will try to remember it for other things.

 

 

0 Likes
Message 10 of 12

ec-cad
Collaborator
Collaborator

OK,

Sorry we weren't able to get you a solid solution. Sometimes happens.

It's a bummer when one program won't communicate with another..

 

ECCAD

 

0 Likes
Message 11 of 12

john.uhden
Mentor
Mentor

@ec-cad ,

Yes, it's like trying to communicate with my wife. 😵

John F. Uhden

0 Likes
Message 12 of 12

hbc85
Enthusiast
Enthusiast

no stress.

 

Its all okey.

The owner of the second program is back from vacation. So he will add an error on his end instead.

Witch was the easiest way all the way. But i was curious if i could have a solution on my end.

 

Thank you for your help 🙂

0 Likes