Greg,

I know of no "snap" function or single macro command to do what you desire.
I have used the following commands to find different ini file entries.

You must assign the full path and name of the desired ini file to access to
the variable #IniFile.

You must also identify the name of label used for the desired value in the
ini file and assign it to the variable #Entry. Do not use the equal sign and
make sure the characters are the same case.

The value for the identified name is then assigned to the string variable
#Entry.

The following sample should work for a default installation of Production
Milling on Windows 95. You may need to edit the code as explained above. The
example has a pause command at the end to display the value for testing.


STRING:#IniFile
STRING:#Label
STRING:#Entry

// Identify full path and name of ini file to access
#IniFile="C:\Sm9cfg\Home\Pmill.ini"

// Identify name of label in ini file.
// Do not add the equal ( = ) sign.
// The macro is case sensitive, so match the case.
#Label="import"



F_OPEN [FN=#IniFile, TY=R]

#Entry=""
#End = 0
WHILE (#End <> 1)

        F_READ[FN=#IniFile, FMT="%S", VR="Entry"]
        #End=F_EOF(#IniFile)

        IF(#End=1) 

                GOTO(END)

        ENDIF

        IF(STREQUAL(STRSUB(#Entry,1,STRLEN(#Label)),#Label))

                #Entry=STRSUB(#Entry,STRLEN(#LABEL)+2,STRLEN(#Entry))
                GOTO(END)

        ENDIF

ENDW

@END

F_CLOSE [FN=#IniFile]

PAUSE[TX=STRTMP("The entry for %Label is %Entry")]


=============================================
 Fred Lauzus, CAM Programming Coordinator
 High Steel Structures, Incorporated
 mailto:[EMAIL PROTECTED] http://www.highsteel.com
=============================================


> -----Original Message-----
> From: Greg King [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 30, 2000 12:11 PM
> To:   SmartCam User Group
> Subject:      Snap functions
> 
> Under the Snap functions you have JOBFILE and SHPFILE.... Does anyone know
> if you can capture the last file name that was imported via IGS or DXF?
> 
> String Manipulation Functions
> JOBFILE() Job file path plus job #DESCfile name
> SHPFILE() Process model file path plus process model file name
> 
> Greg King
> Group Leader
> Manufacturing Services
> Rittal Corporation
> 937-399-0500 Ext. 3371
> [EMAIL PROTECTED]
> 
======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================

Reply via email to