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:

post to a directory


Surface
 Share

Recommended Posts

I use a special post when I plan on running DNC which strips the line numbers, comments, ect.

 

I then use a DNC program to feed the code to the machine.

 

My probem is that the DNC program will not allow me to set a defalt directory to get the file and it is nessesary to choose Mastercam's defalt location. ie d:/mill9/mill/nc/*.nc, which proves to be about 7 mouse clicks.

Its not a big deal for me, but when I have operators who don't fully understand the concept of "double click". It would be nice if it were easier for them.

 

My question is whether I can make this one post choose a different defalt path to save the .nc file.

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Try using the "setdirs.dll" C-Hook. You can specify NC code to always go to a certain location if you wish.

 

So, press Alt+C then select "Set selected directories to Project directory". Ckeck Programs and NOTHING else. You'll now post to that location. You can choose to have Setdirs run when Mastercam starts up. The path will stay the same until you change it to something else.

 

HTH

Link to comment
Share on other sites

James, how is this Chook different from the Screen/configure/files-tab defalts?

I could send all the nc files to the DNC program's directory, but I was hoping to only send the files which were generated with my DNC post.

Is it possible to startup the setdir.dll only when that post is active?

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Screen Configure sets "GLobals". Setdirs sets a session.

 

Well, to do as you ask, you could probably use this VB script because it sets the post and the NC destination at a single click if you have a button on your button bar.

 

code:

'////////////////////////////////////////////////////////////////////////////////

'//

'// Author: Mick George [email protected]

'// Modified: James Meyette

'// Date: 09/16/2003 12:58 PM

'// File Name: POST.VBS

'//

'// Description: Posts drawing to a defined post

'//

'// Comments: Save folder must exist.

'//

'////////////////////////////////////////////////////////////////////////////////

 

 

'///////////////// My Constants /////////////////

 

Public Const DEF_FIRST_POST = "D:MillPostsV9MPSH8000LPP.PST"

Public Const DEF_CNC_1 = "D:DNC"

 

'///////////////// My Global Variables //////////

 

 

' -- Start Script

Call Main()

 

' ////////////////////

' Sub Declaration

' ////////////////////

Sub Main()

 

 

Dim strCurrentPost

Dim FSO

 

Set FSO = CreateObject("Scripting.FileSystemObject")

 

If Not FSO.FolderExists(DEF_CNC_1) Then

ShowString DEF_CNC_1 & " <= Folder does not exist, unable to post"

Exit Sub

End If

 

' -- Check for drawing

If IsDrawing Then

 

' -- Store current post

strCurrentPost = GetPostName

 

' -- Set first post as current post

Call SetPostName(DEF_FIRST_POST)

 

' -- Post it

Call RunPostAll(DEF_CNC_1, False)

 

' -- Set mc back to original post

Call SetPostName(strCurrentPost)

 

End If

 

 

 

Set FSO =Nothing

 

 

 

End Sub

 

 

' ////////////////////

 

' Function Declaration

 

' ////////////////////

 

 

Function IsDrawing()

 

 

Dim Ret

 

 

Ret = StartDBSearch(mc_alive, -1)

 

 

IsDrawing = Ret

 

 

End Function

HTH

Link to comment
Share on other sites

Surface,

 

If it is a static NC folder destintation you are looking for, you can do this...

 

In each PST there is a number question that allows you to specify the NC output folder for the NC files that PST produces ->

 

90. Drive and subdirectory for NC files?

 

Setting a complete path as the answer for this line in the PST will overide the NC output path in the active system configuration.

 

code:

90. Drive and subdirectory for NC files? d:mill9millnc

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