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:

Ken McCall The Boeing Co

Verified Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

881 profile views

Ken McCall The Boeing Co's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. I have a VBScript that creates a group of lines and arcs that are aligned with an existing line. I am in the process of converting that script into a VB NETHook. My problem is after I create that group of lines and arcs I need to align them with the existing line that was selected to position the group. I have created the code that creates the group of lines and arcs: '*************************************************************************************************************************************** '///////////////////////////// create a new group of lines & arcs //////////////////////////////////////////////////////////////////// '************************************************************************************************************ Create_line(0.0 + entity.Data.Point1.x, 0.0 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.0 + entity.Data.Point1.x, 0.2622 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, intLevel) Create_Arc(-0.2 + entity.Data.Point1.x, 0.2622 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.2, 360, 484.2289, intLevel) Create_Arc(-0.425 + entity.Data.Point1.x, 0.5929 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.2, 180, 304.2289, intLevel Create_line(-0.625 + entity.Data.Point1.x, 0.5929 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, -0.625 + entity.Data.Point1.x, 0.9071 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, intLevel) Create_Arc(-0.425 + entity.Data.Point1.x, 0.9071 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.2, 55.7711, 180, intLevel) Create_Arc(-0.2 + entity.Data.Point1.x, 1.2378 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.2, 235.7711, 360, intLevel) Create_line(-0.0 + entity.Data.Point1.x, 1.2378 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.0 + entity.Data.Point1.x, 1.4622 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, intLevel) Create_Arc(-0.2 + entity.Data.Point1.x, 1.4622 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.2, 360, 484.2289, intLevel) Create_Arc(-0.425 + entity.Data.Point1.x, 1.7929 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.2, 180, 304.2289, intLevel) Create_line(-0.625 + entity.Data.Point1.x, 1.7929 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, -0.625 + entity.Data.Point1.x, 2.1071 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, intLevel) Create_Arc(-0.425 + entity.Data.Point1.x, 2.1071 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.2, 55.7711, 180, intLevel Create_Arc(-0.2 + entity.Data.Point1.x, 2.4378 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.2, 235.7711, 360, intLevel) Create_line(0.0 + entity.Data.Point1.x, 2.4378 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, 0.0 + entity.Data.Point1.x, 2.7 + entity.Data.Point1.y, 0.0 + entity.Data.Point1.z, intLevel) '*************************************************************************************************************************************** '///////////////////////////// create a new line //////////////////////////////////////////////////////////////////// '************************************************************************************************************ ' sub to create a line (start x1,start y1,start z1,end x2,end y2,end z2) ' sub to create a line (start x1,start y1,start z1,end x2,end y2,end z2) Public Sub Create_line(X1point As Double, Y1point As Double, Z1point As Double, X2point As Double, Y2point As Double, Z2point As Double, intLevel As Integer) Dim newLine = New LineGeometry With newLine .Data.Point1 = New Point3D(X1point, Y1point, Z1point) .Data.Point2 = New Point3D(X2point, Y2point, Z2point) .Level = intLevel '.Color = RGB(1, 1, 240) .LineStyle = LineStyleType.Solid '.PointStyle = PointStyleType.Square .Commit() End With GraphicsManager.Repaint(True) End Sub '------------------------------------------------------------------------------------------------------------------------------- '///////////////////////////// create a new arc ///////////////////////////////////////////////////////////////////// '************************************************************************************************************************* ' sub to create an arc (center x, center y, center z, radius, startangle, endangle, level) Public Sub Create_Arc(Center_x As Double, Center_y As Double, Center_z As Double, Rad As Double, Start_angle As Double, End_Angle As Double, intlevel As Integer) Dim newArc = New ArcGeometry With newArc .Data.CenterPoint.x = Center_x .Data.CenterPoint.y = Center_y .Data.CenterPoint.z = Center_z .Data.Radius = Rad .Data.StartAngleDegrees = Start_angle .Data.EndAngleDegrees = End_Angle .Level = intlevel '.Color = RGB(100, 255, 255) .LineStyle = LineStyleType.Solid .Commit() End With GraphicsManager.Repaint(True) End Sub I also have the code to get the angle of the selected positional line: Dim angle = VectorManager.AngleDegrees(New Point2D(entity.Data.Point2.x - entity.Data.Point1.x, entity.Data.Point2.y - entity.Data.Point1.y)) What I need help with is what Mastercam API object can I use to align the group of lines and arcs to the same angle as the line the user selected to position that group of lines and arcs. Thank you
  2. Hi Mick: Your code works great, I was able to take parts of it and add them to my nethook and get it to work. Thank You
  3. Need to extract the angle of an existing line and load it to a variable in my VB.Net Nethook. Thank You
  4. The problem has been resolved. Ryan "Yoda" Butt from CNC Software QC suggested that I look at the HKEY_CURRENT_USER\CNC Software, Inc key and verify that all of the required entries were present. When I looked I found that the NetHASP mode and NetHASP state string values were missing. So per Jedi Master Ryan's instructions I created a new Nethasp mode string value with the value of Network and with that both X5 and X6 are operational in Win7. Thank you all for your help.
  5. I have looked at the server and the version of Hasp License Manager that I have running on my Windows XP service PC. It is version 8.32.1.1 and the version I just downloaded is 8.32.5.40. Could this small change in the License Manager installed on a 32bit Windows XP computer have an impact on a Windows 7 Mastercam workstation?
  6. The first thing I did when the problem showed up was to add the IP address to the nethasp.ini file but no luck. This morning I install X5 MU1 just to see and it failed with a no sim found error. I think the problem is in Windows 7 but I have clue as to where to look. We do not use Windows firewall, we use McAfee firewall and I can see the rule created for NhaspX.exe but not one for Mastercam.exe.
  7. Has anyone seen the problem where NhaspX.exe ver 6.0 will run in Win7 and find a NetHasp but Mastercam X6 comes up with Sim Not Found when you try to start it?
  8. Hi Roger: Thanks for the hard work and info. it works like a charm.
  9. I have tried creating the DLLs on my local drive and then moving them to the network drive and changing the path in the FT file but it does not work. when I point the FT file to the network all I get is the Mastercam X on the buttons and when I click on any button I get a can not find file error. When I move all of the DLLs back to my local drive and repoint the FT files back to the local drive everything works. This only happens on Mastercam X6, not on Mastercam X5.
  10. Roger: I have tried having only the VB script file on the network drive but it seems that the controlling factor in ScriptLinker on where the DLL file is created is the location of the VB script file so every time I try to link a script I get the same error as above. Do you think that some changes in some Windows settings can help? Thanks
  11. Good Afternoon: I have checked and rechecked my process to see if I can find a problem with the way I am using the ScriptLinker application and have always come up with the same results. If I use the X5 version of ScriptLinker through Mastercam X5 I can pick VB script and Bitmap files from a folder located on a network resource and the DLL files is created in that same folder located on the network resource and the FT file is cerated on my local C: drive (in the mcamx5/chook folder). Then when I open the toolbar customize window and select the VB Script category all of my VB scripts buttons show up and can be used to run our VB scripts from that network folder. When I use the X6 version of ScriptLinker through Mastercam X6 and select a VB script and Bitmap file located on the same network resource the ScriptLinker application generates the error message seen above(the two blocks of information I typed out above are in one error message). By the time the error occurs the DLL file has been created in the folder on the network resource but the FT file never gets created on my local drive. Now if I move all of my resource files (VB script and bitmap files) on to my local hard drive the ScriptLinker application work in the way it was designed to. It creates a DLL in my shared/mcamx6/vb folder and a FT file in my program files\mcamx6\chooks folder. The reason this process is a problem is for the process to work it would require all 28 of my workstations to have the VB script and bitmap files loaded on to the local hard drives instead of having those resource files housed in a central library. I have also attempted to create the DLL on my local drive and then move them to the network folder and then change the path in the FT file but this results in buttons that display the genetic Mastercam X and when selected generating an error message saying that the DLL can not be found. This application has served us well for the previous versions of Mastercam and so I am hoping that it can be fixed so it will work in X6. Thank You
  12. I have Mastercam X6 loaded on both a 64 bit Windows 7 PC and a 32 bit Windows XP PC. I have installed the 64 bit version of ScriptLinker on my Win7 machine and the 32 bit version on my XP machine and in both cases I get the following error when I attempt to run ScpiptLinker: Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue. Could not load file or assembly 'file:///T:Mastercam_X6_Development\vb\1-AutoPt2Arc.DLL' or one of its dependencies. Operation is not supported. [Exception from HRESULT: 0x80131515] I am getting the DLL file created but not the FT file. Does anyone have any insight into why I am getting this error. Thank You
  13. I am attempting to create a new 3 axis router with a fixed bed, a X axis bridge, two Y axis units with a Z axis plus tool spindle on each Y axis all riding on the X axis bridge. All goes fine until I attempt to run a simulation. The image I see is of a very small machine and very large stock and all of the parts of the machine in the right place in reference to the stock but very far away from each other. Do I have scaling off or am I running metric in one place and english in the other or what. Thank You
  14. I have 17 Router Pro (level 3) licenses on a NetHasp but when I attempt to create a flowline tool path on three curved surfaces Mastercam SP1 responds that only one drive surface can be selected for level 2 license. I have 2 HardHasps that have Router Pro (level 3) and when I use them the flowline tool path function works fine. Can anyone tell me why Mastercam SP1 will not pull the correct license from a NetHasp even though the splash screen displays the message that it is in Router level 3 mode.

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...