cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

How to output CUTTER command to the CL-file

nazar_ko
5-Regular Member

How to output CUTTER command to the CL-file

Hi,

I need to get the cutter diameter in the g-post. I see the CUTTER command in CL-file but it is commented like  $$-> CUTTER / 10.000000.

There is an Article CS212554, but I have no access to eSupport yet.

  

Document Details

Title How to output CUTTER command to the CL-file in Creo Parametric, without the comment marking ($$) in front of it
Description
  • Is there a setting that allows to output the cutter diameter to the *.ncl file as a command instead of a comment
  • How to get a real CUTTER command in the CL-file, i.e. without the comment marking ($$) in front of it?
  • The line $$-> CUTTER / 10.000000 follows the LOADTL command in CLDATA
Applies To
  • Creo Parametric all versions
  • Pro/MANUFACTURING
Cause

Where is the rest of the document?

This is a partial view of the Article. Click for full details on Article CS212554.

Resolution

Is anybody able tell me solution?

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions

When G-Post processes the NCL file it converts all lines that start with $$ into REMARK commands.  So the $$ -> CUTTER / 10.00000,  etc.  gets changed to REMARK-> CUTTER / 10.00000.  You can capture the REMARK statements in the FIL file and identify the CUTTER data, then extract the cutter diameter.  It will be text so if you need it as a real number (scalar) you can convert it.  Here is some sample FIL code you can add to your existing FIL file that will do this: 

CIMFIL/ON,REMARK

  REMTXT=TEXT/CLW        $$ GET THE REMARK TEXT STRING

  REMTXT=TEXT/OMIT,REMTXT,1      $$ REMOVE THE TRAILING BLANK SPACES

  CUTF=INDXF(REMTXT,(TEXT/'CUTTER / '))       $$ LOOK FOR THE "CUTTER / " STRING

  IF(CUTF .GT. 0)THEN

    NCH=CANF(REMTXT,1)       $$ GET THE NUMBER OF CHARACTERS LEFT IN THE STRING

    CDTXT=TEXT/RANGE,REMTXT,14,NCH       $$ PARSE OUT THE CUTTER DIAMETER VALUE

    CD=SCALF(CDTXT)        $$ CONVERT THE TEXT INTO A SCALAR

  ENDIF

CIMFIL/OFF

Fred Nemecek

View solution in original post

3 REPLIES 3

When G-Post processes the NCL file it converts all lines that start with $$ into REMARK commands.  So the $$ -> CUTTER / 10.00000,  etc.  gets changed to REMARK-> CUTTER / 10.00000.  You can capture the REMARK statements in the FIL file and identify the CUTTER data, then extract the cutter diameter.  It will be text so if you need it as a real number (scalar) you can convert it.  Here is some sample FIL code you can add to your existing FIL file that will do this: 

CIMFIL/ON,REMARK

  REMTXT=TEXT/CLW        $$ GET THE REMARK TEXT STRING

  REMTXT=TEXT/OMIT,REMTXT,1      $$ REMOVE THE TRAILING BLANK SPACES

  CUTF=INDXF(REMTXT,(TEXT/'CUTTER / '))       $$ LOOK FOR THE "CUTTER / " STRING

  IF(CUTF .GT. 0)THEN

    NCH=CANF(REMTXT,1)       $$ GET THE NUMBER OF CHARACTERS LEFT IN THE STRING

    CDTXT=TEXT/RANGE,REMTXT,14,NCH       $$ PARSE OUT THE CUTTER DIAMETER VALUE

    CD=SCALF(CDTXT)        $$ CONVERT THE TEXT INTO A SCALAR

  ENDIF

CIMFIL/OFF

Fred Nemecek

nazar_ko
5-Regular Member
(To:AustinN.C.,Inc.)

Thank you. It works for me.

I had an inquiry back in 2013 that may be related. Here's a link:

Tool comments - can I extract them from the .ncl File

I kinda ended up answering my own question, but it wasn't a quick answer. I also included my code snippets if you're looking for them.

Top Tags