-
Posts
341 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Store
eMastercam Wiki
Blogs
Gallery
Events
Everything posted by rocheey1
-
One other thing - once you stop using .ShowDialog, your form can get sent to the back, behind Mastercam. To keep this from happening, set your form to .topmost
- 9 replies
-
- VisualBasic
- Form
-
(and 1 more)
Tagged with:
-
Well, if your Form is shown as non-modal (not ShowDialog), you should be able to click on the entities, just tried it, and it works ...... however ... you have to click on the graphics screen first to set the focus, so your first click is wasted. There is another way to set the focus to the graphics window beforehand, using Interop API calls. This type of coding is not guaranteed to work between major versions, tho. Lemme know if you are interested ...
- 9 replies
-
- 1
-
- VisualBasic
- Form
-
(and 1 more)
Tagged with:
-
AFAIK, you gotta edit 'em the same way you created them. If you had made them using "Combine Operations" on your extrude cuts, it woulda been easier.
-
Looks like a healed STL to me ... which could be a product of the software that was used
-
same problem here. except i was able to create something close using just parameters, and no geometry, as a workaround.
-
Traking MC, users, dates, times etc.
rocheey1 replied to Thee Rickster ™'s topic in Industrial Forum
The MasterCam .net API allows a program to be notified just before, and just after a save is done. I'm running my own little macro on myself, partially to keep track of what, and when, things were done. It pops up a little box letting me add a description before it saves, then logs the date/time/description of the save. You might also wish to check out these post parameters (I have never used these, myself) 15087 Selected for editing, deleting and reordering (True/False) 15095 Binary NCI of operation has been edited (True/False) 15326 Number of times the operation has been edited 15338 Toolpath edited (True/False) -
X7 MU2 ANYONE DO THE INSTALL AUTOMATICALLY ?
rocheey1 replied to CADCAM3D5AXIS's topic in Industrial Forum
wrote my first gcode program on papyrus -
Adding comments, command blocks
rocheey1 replied to rocheey1's topic in Mastercam C-Hook, NET-Hook and VBScript Development
Not robustly. And definitely not pretty enough code to post here :/ -
sounds like deleting the op, and then recreating/re-importing will be faster
-
User stop app
rocheey1 replied to Sebcloutier's topic in Mastercam C-Hook, NET-Hook and VBScript Development
TY Roger, again ... I did a lousy job of explaining in the duplicate post -
User stop app
rocheey1 replied to Sebcloutier's topic in Mastercam C-Hook, NET-Hook and VBScript Development
Check out: Mastercam.App.Types.MCamReturn = 1 (escape key hit) -
that's a rather vague question. Outline? Not sure how that pertains to Active Reports. User defined menu? In Mastercam, or ActiveReports?
-
do you have any manual ops in there? I seem to remember having to workaround something very similar to this when I parsed the results of the mill.set file.
-
drop to a dos box, and type in the word "SET". There should be a listing there that says "TEMP=" (and then a path). That is the path to your windows Temp dir. (%TEMP%). Its a hidden (system) folder; make sure you enable viewing of those files. Cheers.
-
Function Table
rocheey1 replied to sebast1985's topic in Mastercam C-Hook, NET-Hook and VBScript Development
If you used the embedded generic .FT file with the wizard, AND the resources are in the "Resources" folder of your .Net project, then add the line in RED to your .ft file: FUNC_DLL "chooks\Drill_auto.dll" RES_DLL "chooks\Drill_auto.dll" dnRES_NAME "Drill_auto.Resource" CATEGORY "NeTHook" -
or run the .exe, and before you close it, look in your %TEMP% dir. The source files will be there, and it runs a little faster.
-
if they are also cutting the exact same geometry, the colors shouldn't change
-
Any time I try to create a new tool in MasterCam X7, the Tool Manager just freezes. I end up having to kill Mcx thru Ctrl-Alt-Del. Im working around this by coping a random tool from a random library, then re-editing the tool to make a 'new' tool. I was previously running 32 bit ver of X7, 4 gigs Ram, and did not have this problem. I recently wiped my hdd clean, installed 64 bit, using 10 gigs ram, Quadro FX1800, and have installed the latest OEM network / Gfx drivers. I have disabled the antivirus, ensured no extraneous programs are running, and have no other apps installed on this box except for MsOffice. Any ideas ?
-
Haa haa, I had to reinstall when I tried that. But one CAN disable the service
-
and those are awesome examples. I'd bet those two snippets, along with my fav, "Toolpath Door CHook.vbs", are plagiarized more than any other code except the very first "Hello World" program. (at least after I was done with them) If you want a little more functionality than they give, its a LOT more work, and less speedy code (CHooks excluded, natch) and as you can see from my Last Post , me and my old friend VBScript still spend some quality time
-
Are there different types of "selected" states for entities? I ask because, other than using "SelectionManager.SelectAllGeometry()", which highlights the selected Geometry like manual selection, any other type of selection thru code does not highlight the entities. It seems that only the highlighted entities will get erased by hitting the "delete" key. Selecting entities thru code, and verifying that they are selected, will not be erased when hitting the 'delete' key. And it is also the same for code requiring preselected geometry. Im bringing this up because I need to preselect geometry thru code. Manually selecting beforehand, or using "SelectAllGeometry", works. Ive tried 'SelectAllGeometryOnLevel', and SearchManager.GetGeometry. Ive then run a loop to debug.writeline geometry.selected, and it comes back TRUE. I can also rerun the loop and use Geometry.selected=False, and debug,writeline tells me the geometry is not selected. Im trying to translate, and scale, a large amount of entities. The .net version is prohibitively slow, and Ive found that outputting some on-the-fly vbs works well. However, it only works on geometry that is preselected manually, or preselected using SelectAllGeometry, which highlights the geometry. The selection thru VBS "Chaining" fails the same way .... I either have to manually preselect, or use "SelectAll" Is there another way ?
-
Well, first,, there are two ways I know of to access the tool info - 1) from the tool library inside the MCam document, which would be all tools, regardless if they are used or not 2) by parsing thru all the (selected) operations, and getting only the tools used, but you have to filter out the duplicates. Second, you didnt specify what version of MasterCam you are coding for. The code below works in MCam X6, but SHOULD work as legacy in X7. (using the supplied Nethook 2 lib) Third, if you have the choice, GO WITH X7. The nethook library has been drastically updated, and you can access all Tool Params, where in X6, it is limited. The first sub below will run just by calling it. It gives you all the tools in the MCam document. The second requires you to select some operations before you call it. It will give you a list of only the tools used, with duplicates filtered out. This list is not sorted (because your head may explode) but when you are ready for sorting, gimme a whistle. The MCam Excel lib is very stable; however, if you need more functionality, you'll need to roll your own, and Late Binding has proved for me to be the most stable between Office versions. Cheers. Sub GetLibraryTools() Dim AllTools() As Mastercam.Database.Tool = Mastercam.Support.SearchManager.GetTools() 'GC.Collect() ' uncomment this line if you are getting strange crashes in X6 Dim ToolNumber As Integer = 0 Dim ToolDia As Double = 0.0 Dim FluteLength As Double = 0.0 Dim Msg As String = String.Empty For Each SingleTool As Mastercam.Database.Tool In AllTools ToolNumber = SingleTool.Number ToolDia = SingleTool.Diameter FluteLength = SingleTool.FluteLength Msg = Msg & ToolNumber.ToString & vbTab & Format(ToolDia, "0.000") & vbTab & Format(FluteLength, "0.000") & vbCrLf Next MsgBox(Msg, MsgBoxStyle.Information, "Complete Tool List") End Sub Sub GetOperationTools() ' parse down selected ops and get tools associated with those SELECTED ops Dim op As Mastercam.Database.Operation Dim OpList() As Mastercam.Database.Operation = Mastercam.Support.SearchManager.GetOperations(True) Dim intOuterLoop As Integer = -1, intInnerLoop As Integer = -1 Dim ToolIsDuplicate As Boolean = False Dim ToolList() As Mastercam.Database.Tool = {} Dim ToolListCount As Long = -1 Dim ToolNumber As Integer = 0 Dim ToolDia As Double = 0.0 Dim FluteLength As Double = 0.0 Dim Msg As String = String.Empty For Each op In OpList Select Case op.Type Case 17, 4, -1 ' MANUAL, tRANSORM, OR UNKNOWN - no tool or cant extract tool Case Else Dim SingleTool As Mastercam.Database.Tool = op.OperationTool ToolNumber = SingleTool.Number ToolDia = SingleTool.Diameter FluteLength = SingleTool.FluteLength ToolIsDuplicate = False If ToolListCount = -1 Then ToolIsDuplicate = False Else ' check the list For intInnerLoop = 0 To ToolListCount If ToolNumber = ToolList(intInnerLoop).Number Then ToolIsDuplicate = True Exit For End If Next End If ' If our Tool is not flagged as a duplicate, add it to the array If ToolIsDuplicate = False Then ToolListCount = ToolListCount + 1 ReDim Preserve ToolList(ToolListCount) ToolList(ToolListCount) = SingleTool Msg = Msg & ToolNumber.ToString & vbTab & Format(ToolDia, "0.000") & vbTab & Format(FluteLength, "0.000") & vbCrLf End If End Select Next op MsgBox(Msg, MsgBoxStyle.Information, "Operation Tool List") End Sub FYI: check out this link: http://www.emastercam.com/board/index.php?showtopic=65946
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.