CADDIT CAD CAM CNC Software - download AutoCAD compatible design software progeCAD Alibre T-FLEX and more
CADDIT Website Knowledge Base Search:
CL

progeCAD Help

CR
Welcome to progeCAD
Working with progeCAD
Command Reference
CAD System Variables
Programming progeCAD
Full Index (caution - 400kb)

Further Links:

Download progeCAD
Register progeCAD

Learning

T-FLEX PLM tutorial (PDF)
progeCAD IntelliCAD and AutoCAD training 
CATIA 2D 3D design tutorial
Alibre CAD/CAM basic tutorial

Resources

Educational CAD Software Solutions
Python scripting for DOS and Windows
Other free software downloads
CADDIT CAD CAM Forum Australia
__

sds_getfiled

int sds_getfiled (const char *title, const char *path, const char *fileext, int options, struct sds_resbuf *filename);


Bring up the file dialog box.


This function displays the standard Windows file dialog box so that the user can save, open, or find a file, as appropriate. However, this function includes arguments that allow you to somewhat customize the dialog box's wording.

The argument title represents the label of the dialog box. This is the text that appears across the top, such as "Open Drawing."

The path argument represents the default pathname and filename, if applicable. This is where the dialog box first looks for the file. This can be NULL. If so, the default is the current working directory.

The fileext argument is the default file extension. This can be overridden by the user only if bit 2 ( = 4) is set in options.

The argument options represents the sum of the appropriate bits for each of the following options:

Option Meaning
1 Warns when the user types an existing filename; use this option to create a new file, not open an existing one.
2 Grays out the "Type it" button.
4 Allows the user to type a filename other than that specified by fileext.
8 Only the filename is stored in the result buffer, filename. When not set, the entire pathname is stored in filename. When option 1 is set (for creating a new file), this has no effect.
16 Path is assumed to be a pathname only. This is also true when path ends with a slash.

The argument filename is a result buffer containing either a string with the path and file name for the selected file or, if the user selected the Type It button, a short with a resval of 1.

This function returns RTNORM or RTERROR.

NOTE  While normally you would release the resbuf using sds_relrb, you do not want to when using this function because it will cause your program to crash.

Example

struct sds_resbuf filename;

sds_getfiled("sds_getfiled Test Dialog",NULL,"DWG",4,&filename);

if (filename.restype==RTSTR)

sds_printf("\nThe name of the file is %s. ",filename.resval.rstring);

else if (filename.restype==RTINT)

sds_printf("\nThe user selected the \"Type it\" button. ");

else

sds_printf("\nAn error occurred.");

Programming Overview of SDS (Solutions Development System)

CADDIT® is a registered trademark in Australia. All Rights Reserved. Comments concerning the content of this site should be addressed to our webmaster. progeCAD is a trademark of ProgeCAD srl. Autodesk® and AutoCAD® are both registered trademarks or trademarks of a third party, and used only for comparison purposes. All other trademarks, trade names or company names referenced herein are used for identification only and are the property of their respective owners. Legal and Terms of Use. Google. Find us on Google+.