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 change for manual entry


Gary Woody
 Share

Recommended Posts

Hello , would like to do somethings with manual entry but don't know to start. Got the manual entry to work in frt part of sub 1, but want the info in the txt file to be used thru out the psot like for part info,file#,etc

Would like to take that info in the manual entry file and put in a subout pgm.Info in txt file would like to use something like spart,sfileinfo,spartdesp,thankz for all the help

Link to comment
Share on other sites

The file option in the Manual Entry doesn't really keep the link to the external file once the NCI file is created. It just reads the associated file to create 1005 entries in your NCI file. I'm not sure you can even suck out the name of the file.

 

Having said that, I have used external buffer files to accomplish what you are looking for. For instance in a customized HTML setup sheet, we can prompt for header info if none has been entered in a previous post run. Once the information is entered, an external buffer file tied to the NCI filename can be saved off. The next time the same file is posted, the information from the external buffer can be read in and assigned to variables for use during posting, without prompting again for redundant info. Or the user can be prompted again, but using the previous info as default values. The post reference guide should cover buffers in detail.

Link to comment
Share on other sites

I've only done this in chargeable work that I won't give out. I'll illustrate the general steps for all who are interested. The main trick (this may not be needed in the current Mp - haven't checked) is opening a single external buffer file both as an EXT file, and a regular buffer. This way the file can be created the first time if it doesn't already exist. This example stores header info in an external NCI file, named the same as your NCI, and in the NCI directory.

 

code:

#------------------------------------------

# Custom header var/strings

#------------------------------------------

sextnfo .NFO

header : 0

 

sjobno ""

spartno ""

sprogrev ""

scustomer ""

sdescr ""

sprog ""

 

sbuf6_opn "OPEN"

sfiletest ""

 

#------------------------------------------

# Question format statements

#------------------------------------------

fq 1 header Prompt for Header Info? [0=No,1=Yes]

fq 2 sjobno Job Number?

fq 3 spartno Part Number?

fq 4 sprogrev Revision Level?

fq 5 scustomer Customer Name?

fq 6 sdescr Program Description?

fq 7 sprog Programmer Name?

 

#------------------------------------------

# Buffer 6 - holds cust header info

#------------------------------------------

size6 : 0

wc6 : 1

fbuf 6 1 80 1 #holds cust header info

 

#------------------------------------------

# POSTLINES

#------------------------------------------

pq #Setup post based on switch settings

extprg = 2 # 2 open or create

 

sbufname6 = spathnci + snamenci + sextnfo

spathext = spathnci

snameext = snamenci

sextext = sextnfo

 

sfiletest = spathnci + snamenci + sextnfo

 

result = fexist (sfiletest)

subout = 3

if result = 0, *sbuf6_opn # Writes open string

subout = 0

 

pheader # File header

q1

size6 = rbuf(6,0)

if header = 1,

[

if size6 = 7, # Number of questions

[

sjobno = rbuf(6,2)

spartno = rbuf(6,3)

sprogrev = rbuf(6,4)

scustomer = rbuf(6,5)

sdescr = rbuf(6,6)

sprog= rbuf(6,7)

]

q2

q3

q4

q5

q6

q7

pwriteinfo

]

 

pwriteinfo #Write header info to buf 6

sjobno = wbuf(6,2)

spartno = wbuf(6,3)

sprogrev = wbuf(6,4)

scustomer = wbuf(6,5)

sdescr = wbuf(6,6)

sprog = wbuf(6,7)

 

[ 11-06-2002, 02:37 PM: Message edited by: Dave Thomson ]

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