Try removing the quotation marks from the variable "#Tool_Length"
// assign tool length using the entered amount for the
#Tool_Length variable
JOS_FIELD_EDIT[FLDNAME="tl_len", EXPR=#Tool_Length]
==================================================
Fred Lauzus, CAM Programming Coordinator
High Steel Structures, Incorporated
mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.highsteel.com <http://www.highsteel.com/>
==================================================
-----Original Message-----
From: Michael Senack [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 11:39 AM
To: [EMAIL PROTECTED]
Subject: [mfg-smartcam] Bad tool information. Simulation halted error
I load a .SH2 file into V11.5 Production Mill and run the following macro
to enter a tool length so I can do a Show Cut with out getting the
"2854: Bad tool information. Simulation halted." error
// Production_Milling 11.5 Windows 10/16/98 16:52:40 Macro File
// w:\mcl\jsf.mcl
// CREATED: 01/03/01
//
// This mcl file changes the tool length and tool angle
// of all tools from 32000 to 1.0
// It also changes the cutter radius on face mills to 0 from the default of
.031
// Why? When a V4.5 .sh2 file is read into V11.5 Production Milling
// you cannot do a Shift+F6 for Show Cut with the tool length set to 32000
// because Dr. Watson appears and crashes your program completely.
//
VAR_REMOVE_ALL[]
GRAPHICS_Off[]
#Tool_Length=#Tool_Length
// set counter for 1st step in list
#Counter=1
// loop through step list
WHILE(#Counter<=OPNLIST(0))
// extract step number from step in list
#Step=OPNLIST(#Counter)
// open step
JOS_CONTEXT_OPEN[BASEITEM=1, USERNAME=#Step]
// check for invalid tool length
IF(jos(tl_len)=32000)
// assign tool length using the entered amount for the
#Tool_Length variable
JOS_FIELD_EDIT[FLDNAME="tl_len",
EXPR="#Tool_Length"]
// assign side angle of face mill to 0
JOS_FIELD_EDIT[FLDNAME="sideang", EXPR="0"]
// assign cutter raduis to 0
JOS_FIELD_EDIT[FLDNAME="cradius", EXPR="0"]
// apply changes made to step
JOS_CHANGES_PROMOTE[]
ENDIF
// close step
JOS_CONTEXT_CLOSE[]
// advance counter to next step in list
#Counter=#Counter+1
ENDW
GRAPHICS_ON[]
This all works fine...until
1) I laod an .SH2 file and run the above JSF.mcl
2) do my Show Cut
3) save the file as a .PM4 file
4) either start a new file, or load another file and do what ever with it,
or exit PMill and come back in
5) reload the previously saved .PM4 file from step 3
6) do a Show Cut and the "2854: Bad tool information. Simulation
halted." error reappears
I then check the process planner and find that the "Cut Length" is set to
#Tool_Length
instead of what I had entered using the JSF.mcl from step 1
If I execute the JSF.mcl again it does not change the "Cut Length" from
#Tool_Length to what I entered.
I have to manually change it in order for it to work.
Any ideas why this is occurring?
Regards,
Michael Senack
======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================