nevio64
Verified Members-
Posts
15 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
nevio64's Achievements
Newbie (1/14)
0
Reputation
-
function create_TurnProfile()
nevio64 replied to nevio64's topic in Mastercam C-Hook, NET-Hook and VBScript Development
thanks for your answer! I' ve tried it and it works! -
Hi all, First of all excuse me for my English... I have a problem with a vb.net program which worked on version X8 but doesn't work anymore with version X9. In order to use the function create_TurnProfile() I used the dll "SilhouetteBoundary.DLL" in this way: Public Const CHookDLL As String = "SilhouetteBoundary.DLL" <DllImport(CHookDLL, EntryPoint:="create_TurnProfile", CharSet:=CharSet.Auto)> _ Public Shared Function RunTurnProfile(not_used As Integer) As Integer End Function Dim rv As Integer = CHookInterop.RunTurnProfile(0) Now, with version 9,when I start the program the following error shows up: HRESULT:0X8007007F From the data I found the function was put in another location: Do you know where it is and how I can use it? Thanks, Nevio Bassi - Metal World S.p.A.
-
Hi On version 6 with this code I set the views to TOP (thanks Roger!). ‘find VIEWS Dim views As Mastercam.Database.MCView() = Mastercam.Support.SearchManager.GetViews() 'set VIEW Mastercam.IO.ViewManager.CPlane = views(0) '/TOP Mastercam.IO.ViewManager.TPlane = views(0) '/TOP Mastercam.IO.ViewManager.GraphicsView = views(0) '/TOP Mastercam.IO.ViewManager.GraphicsView.Commit() Mastercam.IO.ViewManager.TPlane.Commit() Mastercam.IO.ViewManager.CPlane.Commit() Me.Close() I installed mastercam7. In my program I added the nethook3_0.dll and I rebuilding all, but then result is: Gview: TOP WCS: TOP T/C/ plane= gview How do I set the T/C plane to TOP? Any help would be greatly appreciated. Best regards. Nevio
-
Draw a Line
nevio64 replied to nevio64's topic in Mastercam C-Hook, NET-Hook and VBScript Development
Hello Roger, thanks for the answer. I use visual studio 2010. In C# works fine. In Vb.net this is the error(look the attachment) Is there any problem in vb.net --> nethook2? -
Draw a Line
nevio64 replied to nevio64's topic in Mastercam C-Hook, NET-Hook and VBScript Development
Thanks Roger, but when i insert Line1.Commit() the program says that "Commit" is not supported ... -
Hi I use Mastercam X6, Het-hook, Vb.net I will draw a line, i write this code: MsgBox("Draw a line") Dim MathLine As Mastercam.Math.Line3D = New Mastercam.Math.Line3D(New Mastercam.Math.Point3D(0.0, 0.0, 0.0), New Mastercam.Math.Point3D(100.0, 0.0, 0.0)) Dim Line1 = New Mastercam.Curves.LineGeometry(MathLine) Line1.Validate() 'ridisegno Mastercam.IO.GraphicsManager.Repaint(True) But the system don't draw a line. It's an error in my code, o it's a problem in Net-hook? Thanks for the answer
-
SETTING CPLANE AND TPLANE IN C-HOOK
nevio64 replied to nevio64's topic in Mastercam C-Hook, NET-Hook and VBScript Development
Thanks Roger I send the e-mail immediately. -
SETTING CPLANE AND TPLANE IN C-HOOK
nevio64 replied to nevio64's topic in Mastercam C-Hook, NET-Hook and VBScript Development
Setting TPLANE and CPLANE do not work neither in C-HOOK? -
SETTING CPLANE AND TPLANE
nevio64 replied to nevio64's topic in Mastercam C-Hook, NET-Hook and VBScript Development
Thanks Roger! -
Hi I have a question regarding setting a CPLANE with the nethook. I cannot find the right method to set the CPLANE (or the TPLANE) to Mastercam predefined graphic views (like TOP, ISO, FRONT,....). I tried these: Dim views As Mastercam.Database.MCView() = Mastercam.Support.SearchManager.GetViews() ' settting the Graphics View to 'IS0' (View#6 of the std views) Call DialogManager.OK("SETTING GVIEW", "Main.Run") Mastercam.IO.ViewManager.GraphicsView = views(6) 'SETTING THE CPLANE TO ISO Call DialogManager.OK("SETTING CPLANE", "Main.Run") Mastercam.IO.ViewManager.CPlane = views(6) The gview is OK, but the CPLANE is always 1(TOP). Is there an option to set the CPLANE (or the TPLANE) by using a method in .net? Any help would be greatly appreciated. Best regards. Nevio
-
Run external dll inside my program
nevio64 replied to nevio64's topic in Mastercam C-Hook, NET-Hook and VBScript Development
Roger, thanks a lot! -
Hello I would run the DLL "SilhouetteBoundary.dll" from my program VB.NET. I tried to add the dll in "Add Reference " using the tab "Browse" with which you can 'select a file outside, but when I click on the dll I get a sign that says: "A reference to 'c:\programmi\mcamx5\chooks\silhouetteboundary.ddl" could not be added. Please make sure that the file is accessible, and that is a valid assembly or COM component. Is there another way to load it on my program? Thanks for the answer!
-
Hi With the first nethook to change the color of arcs, lines and points I was usually to follow this procedure: ' -- Mask on all alive arcs, lines and points Do While DataBase.DBSearch(search_idx, found_idx, MC_SELBIT.Alive, MC_ENTMASK.Solid_ID) ' -- Set flag, gets set for each iteration but who cares bFound = True ' -- Get the current ent from its id Dim Obj As Object = DataBase.GetEnt(found_idx) Dim ThisEntRef As New CEntRef(found_idx) 'Mastercam.GUI.SetCPlaneNumber(2) ' piano di costruzione obbligatorio metterlo 'setto il colore 10 - verde - DataBase.SetEntColor(found_idx, 8) 'ruota ' Mastercam.XForm.Rotate(ThisEntRef, True, punto, ruota, 2) ' -- clean up, not really needed but it makes me feel better 'ThisPoint = Nothing ThisEntRef = Nothing Loop With the new version (nethook 2 X5) as I can make a loop on all the entities 'to change the properties'? Do you have any example? Thank you for the cooperation. Nevio
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.