PDA

View Full Version : Query first_tool / last_tool



Banditman
08-01-2009, 11:27 AM
Query first_tool / last_tool

Hi guys

I wanted to create a file with def_tool – and I made it.

But I’d like to add a header before the first tool and a footer after the last one.

But I can’t make it!

If I enter the number of the first and the last tool as a query, it works:

@def_tool


{nl,'!!open file='program_number'.TXT!!'}



if tool_number eq 1 ; T1 ist first_tool -

{nl}
{'---------- Kopfzeile ---------- '}

{nl}
{nl}



{nl,'!!close file='program_number'.TXT!!'}

endif


{nl,'!!open file='program_number'.TXT!!'}


{nl}
{'P', tool_number}
{' T', tool_number }
{' L','400'}
{' R'(tool_offset)}
{' ('}
{''upper(tool_user_type)}
{' '(tool_offset*2)}
{')'}



{nl,'!!close file='program_number'.TXT!!'}





{nl,'!!open file='program_number'.TXT!!'}

if tool_number eq 4 ; T1 ist last_tool

{nl}
{nl}

{nl,'---------- Fusszeile ---------- '}

endif

{nl,'!!close file='program_number'.TXT!!'}


endp

;-------------------


What does the query have to look like if I want to have a header before “first_tool” and a footer after “last_tool”?

Help!

Thanks in advance

Banditman

nebbe
08-02-2009, 03:31 AM
Hello
Are there variables first_tool and last_tool for def_tool?

If there are:

If first_tool eq true then header

If last_tool eq true then footer

Otherwise you can also write all def_tool cycles into an array and input somewhere, e.g. in end_program.

t.

Banditman
08-03-2009, 10:23 AM
Hello
Are there variables first_tool and last_tool for def_tool?

If there are:

If first_tool eq true then header

If last_tool eq true then footer

Otherwise you can also write all def_tool cycles into an array and input somewhere, e.g. in end_program.

t.

Hello!
Thanks for your help!

Yoe were right. There’re no variables first_/last_tool in the def_tool.

I created the file udr@ex and call it at the @start_tool. It works!

Thanks for your advice

Greetings

nebbe
08-03-2009, 10:30 AM
Hello

Show it! Or is it too confidential?

Greetings

t.