Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Read Hasp info with .net


Recommended Posts

Is there a way to query the hasp and or the NetHasp to determine what options are available

 

No, not "directly" via any current NET-Hook API method.

You can get these data items, but not individual "product" options.

 

Mastercam.Support.RegistryManager class methods ->

GetSerialNumber()

GetCurrentProduct()

GetUserType()

 

But... 

if you email me -> SDK <at> mastercam <dot> com, I can show you a simple way to do so in your NET-Hook. :secret:

Link to comment
Share on other sites

I haven't tried to do anything like that so I am not sure,  I looked but couldn't find anything that let you check ahead of time for hasp info, although maybe someone else will chime in on if that's possible.

 

One thing I did find that I would look into is the SolidNotAllowedException

 

You could use a try / catch block .. something like this.. that way it should allow you to trap the exception and handle it however you want to.  If you need to use it over and over .. you could probably even make an ugly method / sub from it that would attempt something with solids and return success or failure to your code.. I say ugly because this IMO would be really bad coding practice.. but sometimes you do what works..

Try
    ' attempt to do whatever you need with solids here.. 
    [ tryStatements ] 

Catch ex As Mastercam.App.Exceptions.SolidsNotAllowedException 
    ' do whatever you need to if it does not work here.. 
    ' ie. explain to the user no solids.. 
    [ catchStatements ]

 End Try
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...