EASY-ROB™ Application Programming Interface  v8.008
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Static Public Member Functions | List of all members
ER_CAPI_USER_IO_FILE Class Reference

Method class to load and save work cells-, robots-, tool-files, etc. More...

#include <ER_CAPI.H>

Inheritance diagram for ER_CAPI_USER_IO_FILE:
ER_CAPI_USER_IO ER_CAPI

Static Public Member Functions

static ER_DllExport int LoadCell ()
 Opens Dialog to load a .cel Cel file. More...
 
static ER_DllExport int LoadRobot (void)
 Opens Dialog to load a .rob Robot or Device file. More...
 
static ER_DllExport int LoadRobotAsm (void)
 Opens Dialog to load a .ras Robot assembly file. More...
 
static ER_DllExport int LoadTool (void)
 Opens Dialog to load a .tol Tool file. More...
 
static ER_DllExport int LoadProgram (void)
 Opens Dialog to load a .prg Program file. More...
 
static ER_DllExport int LoadProgramFile (char *prg_fln)
 Sets program file name.
Sets program file for current device, will be executed when the simulation starts. More...
 
static ER_DllExport int LoadMimic (void)
 Opens Dialog to load a .mmc Mimic file. More...
 
static ER_DllExport int LoadMimicFile (char *mimic_file)
 Sets mimic file name.
Set mimic file for current device, will be used when the simulation starts. More...
 
static ER_DllExport int LoadCamera (void)
 Opens Dialog to load a .cam Camera file. More...
 
static ER_DllExport int LoadAuto (char *fln)
 Loads a file depending on file extension. More...
 
static ER_DllExport int SaveCell (void)
 Opens dialogto save a .cel Cell file. More...
 
static ER_DllExport int SaveCell_ext (char *new_cel_fln=NULL, int confirm_overwrite=1, int reset_pos=0, int save_pos=1)
 Saves a cell file by filename
If new_cel_fln is NULL, the user will be prompted to enter or select a cel file.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting cell file.
Set reset_pos = 1 and save_pos = 0, to reset complete work cell to start condition
Set reset_pos = 0 and save_pos = 1, to save work cell in current condition and to save start condition. More...
 
static ER_DllExport int SaveRobot (void)
 Opens a dialog to save a .rob Robot file. More...
 
static ER_DllExport int SaveRobot_ext (char *new_rob_fln=NULL, int confirm_overwrite=1)
 Saves a robot file by filename
If new_rob_fln is NULL, the name of the robot is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting robot file. More...
 
static ER_DllExport int SaveRobotAsm (void)
 Opens a dialog to save a .ras Robot Assembly file. More...
 
static ER_DllExport int SaveRobotAsm_ext (char *new_ras_fln=NULL, int confirm_overwrite=1)
 Saves a robot Assembly file by filename
If new_ras_fln is NULL, the name of the robot assembly is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting robot file. More...
 
static ER_DllExport int SaveTool (void)
 Opens a dialog to save a .tol Tool File. More...
 
static ER_DllExport int SaveTool_ext (char *new_tol_fln=NULL, int confirm_overwrite=1)
 Saves a tool file by filename
If new_tol_fln is NULL, the name of the tool is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting tool file. More...
 
static ER_DllExport int SavePath (void)
 Opens a dialog to save a .tag File with the current path. More...
 
static ER_DllExport int SavePath_ext (char *new_pth_fln=NULL, int confirm_overwrite=1)
 Saves a Tag or Path file by filename with the current path
If new_pth_fln is NULL, the name of the current path is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting tag file. More...
 
static ER_DllExport int SavePathes (void)
 Opens a dialog to save a .tag File containing all pathes. More...
 
static ER_DllExport int SavePathes_ext (char *new_pth_fln=NULL, int confirm_overwrite=1)
 Saves a Tag or Path file by filename containing all pathes
If new_pth_fln is NULL, the name of the current cell is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting tag file. More...
 
static ER_DllExport int CreateRobotTemplate (char *rob_path_fln, char *rob_name, int cad_type, char *cad_fln, char *cad_name, frame *refpos, frame *pos, float *xyz_scale, bool overwrite=true)
 Creates a robot template file with one geometry.
The geometry can be parameterized by cad_type which is one of IGP_CAD_TYPE, STL_CAD_TYPE or _3DS_CAD_TYPE,
the cad_fln cad_name , refpos, offsetpos and xyz_scaling
Remarks
White spaces in names are not allowed. More...
 
static ER_DllExport int CreateRobotTemplate_ext (char *rob_path_fln, char *rob_name, int cad_type, int n_cad_names, char **cad_fln_names, char **cad_names, frame *refpos, frame *pos, float *xyz_scale, bool overwrite=true)
 Creates a robot template file with multiple geometries.
The geometry can be parameterized by cad_type which is one of IGP_CAD_TYPE, STL_CAD_TYPE or _3DS_CAD_TYPE,
the cad_fln cad_name , refpos, offsetpos and xyz_scaling
Remarks
White spaces in names are not allowed. More...
 

Additional Inherited Members

- Static Public Attributes inherited from ER_CAPI_USER_IO
static ER_CAPI_USER_IO_FILE er_capi_user_io_file
 Method class to load and save work cells-, robots-, tool-files, etc. More...
 
static ER_CAPI_USER_IO_DIALOG er_capi_user_io_dialog
 Method class, supplies dialogs, i.e. to enter and show values. More...
 
static ER_CAPI_USER_IO_PICK er_capi_user_io_pick
 Method class to "pick" objects such as devices, tags, polygon, vertices, measure distances, ... More...
 
static ER_CAPI_USER_IO_CRUISE er_capi_user_io_cruise
 Method class to manipulate the 3D Scene. More...
 
static ER_CAPI_USER_IO_3DPDF er_capi_user_io_3dpdf
 Method class for 3D Pdf Export. More...
 
- Static Public Attributes inherited from ER_CAPI
static ER_CAPI_USER_IO er_capi_user_io
 Method class for interaction with EASY-ROB. More...
 
static ER_CAPI_DEVICES er_capi_devices
 Method class to create, attach, update devices, for kinematics calculations and for trajectory planning and -execution. More...
 
static ER_CAPI_SIM er_capi_sim
 Method class for simulation settings. More...
 
static ER_CAPI_TARGETS er_capi_targets
 Method class for paths and tags. More...
 
static ER_CAPI_CAD er_capi_cad
 Method class for for 3D CAD Data import and -export, changing attributes and positions. More...
 
static ER_CAPI_SYS er_capi_sys
 Method class for mathematical calculations, simulation status, units. More...
 

Detailed Description

Method class to load and save work cells-, robots-, tool-files, etc.

Member Function Documentation

static ER_DllExport int ER_CAPI_USER_IO_FILE::CreateRobotTemplate ( char *  rob_path_fln,
char *  rob_name,
int  cad_type,
char *  cad_fln,
char *  cad_name,
frame refpos,
frame pos,
float *  xyz_scale,
bool  overwrite = true 
)
static

Creates a robot template file with one geometry.
The geometry can be parameterized by cad_type which is one of IGP_CAD_TYPE, STL_CAD_TYPE or _3DS_CAD_TYPE,
the cad_fln cad_name , refpos, offsetpos and xyz_scaling
Remarks
White spaces in names are not allowed.

// Example:
char *path = {"..\\release\\"};
char fln[MAXSTR];
sprintf(fln,"%s%s",path,"User_IO_Template.rob");
char *rob_path_fln = fln; // absolute robot file name
char *rob_name = {"user_io"}; // name of robot
int cad_type = IGP_CAD_TYPE; // STL_CAD_TYPE, _3DS_CAD_TYPE;
char *cad_fln = {"user_io_cad_fln.igp"}; // geometry file name, without drive and path
char *cad_name = {"user_io_cad_name"}; // name of geometry, length
frame refpos; // refpos reference position of geometry, ::FRAME
er_sys_mathematics.rob_kin_frame_ident(&refpos);
frame pos; // offset position of geometry, :: FRAME
er_sys_mathematics.rob_kin_rot_xyz(&pos,0*fDEG,0*fDEG,0*fDEG);
er_sys_mathematics.rob_kin_trans(&pos,0,0,250*mm2m);
float xyz_scale[] = {2,1,0.5}; // xyz_scale geometry scaling in x,y and z direction, size ::DIM
bool overwrite = true; // overwrite if robot file exists
ret = er_user_io_file.CreateRobotTemplate(rob_path_fln, rob_name, cad_type, cad_fln, cad_name, &refpos, &pos, xyz_scale, overwrite);
er_user_io_dialog._info_line_msg(0,"1.1 CreateRobotTemplate() ret = %d",ret);
...
Parameters
[in]rob_path_flnabsolute robot file name, extension *.rob, length LS_MAXSTR
[in]rob_namename of robot, length MAXSTR
[in]cad_typetype of geometry, one of IGP_CAD_TYPE, STL_CAD_TYPE or _3DS_CAD_TYPE
[in]cad_flngeometry file name, without drive and path, length LS_MAXSTR
[in]cad_namename of geometry, length MAXSTR
[in]refposreference position of geometry, FRAME
[in]posoffset position of geometry, :: FRAME
[in]xyz_scalegeometry scaling in x,y and z direction, size DIM
[in]overwriteFALSE will prompt the user to overwrite, TRUE overwrites existing rob file without confirmation
Return values
0- ER_OK
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::CreateRobotTemplate_ext ( char *  rob_path_fln,
char *  rob_name,
int  cad_type,
int  n_cad_names,
char **  cad_fln_names,
char **  cad_names,
frame refpos,
frame pos,
float *  xyz_scale,
bool  overwrite = true 
)
static

Creates a robot template file with multiple geometries.
The geometry can be parameterized by cad_type which is one of IGP_CAD_TYPE, STL_CAD_TYPE or _3DS_CAD_TYPE,
the cad_fln cad_name , refpos, offsetpos and xyz_scaling
Remarks
White spaces in names are not allowed.

Parameters
[in]rob_path_flnabsolute robot file name, extension *.rob, length LS_MAXSTR
[in]rob_namename of robot, length MAXSTR
[in]cad_typetype of geometry, one of IGP_CAD_TYPE, STL_CAD_TYPE or _3DS_CAD_TYPE
[in]n_cad_namesnumber of geometries
[in]cad_fln_nameslist of geometry file names, without drive and path, length LS_MAXSTR
[in]cad_nameslist of geometry names, length MAXSTR
[in]refposreference position of geometry, FRAME
[in]posoffset position of geometry, :: FRAME
[in]xyz_scalegeometry scaling in x,y and z direction, size DIM
[in]overwriteFALSE will prompt the user to overwrite, TRUE overwrites existing rob file without confirmation
Return values
0- ER_OK
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadAuto ( char *  fln)
static

Loads a file depending on file extension.

Parameters
[in]flnfile name, maximum length HS_MAXSTR
Return values
0- ER_OK
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadCamera ( void  )
static

Opens Dialog to load a .cam Camera file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadCell ( )
static

Opens Dialog to load a .cel Cel file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadMimic ( void  )
static

Opens Dialog to load a .mmc Mimic file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadMimicFile ( char *  mimic_file)
static

Sets mimic file name.
Set mimic file for current device, will be used when the simulation starts.

Parameters
[in]mimic_filemimic file name, if NULL cFile will be unloaded, maximum length HS_MAXSTR
Return values
0- ER_OK
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadProgram ( void  )
static

Opens Dialog to load a .prg Program file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadProgramFile ( char *  prg_fln)
static

Sets program file name.
Sets program file for current device, will be executed when the simulation starts.

Parameters
[in]prg_flnprogram file name, if NULL cFile will be unloaded, maximum length HS_MAXSTR
Return values
0- ER_OK
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadRobot ( void  )
static

Opens Dialog to load a .rob Robot or Device file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadRobotAsm ( void  )
static

Opens Dialog to load a .ras Robot assembly file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::LoadTool ( void  )
static

Opens Dialog to load a .tol Tool file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SaveCell ( void  )
static

Opens dialogto save a .cel Cell file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SaveCell_ext ( char *  new_cel_fln = NULL,
int  confirm_overwrite = 1,
int  reset_pos = 0,
int  save_pos = 1 
)
static

Saves a cell file by filename
If new_cel_fln is NULL, the user will be prompted to enter or select a cel file.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting cell file.
Set reset_pos = 1 and save_pos = 0, to reset complete work cell to start condition
Set reset_pos = 0 and save_pos = 1, to save work cell in current condition and to save start condition.

Parameters
[in]new_cel_flnnew cel file name, maximum length HS_MAXSTR
[in]confirm_overwrite= 1 prompt the user to confirm overwriting if file exist, = 0 no confirmation required
[in]reset_pos= 1 resets all device condition to start condition before saving
[in]save_pos= 1 stores all current device condition to start condition after saving is done
Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SavePath ( void  )
static

Opens a dialog to save a .tag File with the current path.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SavePath_ext ( char *  new_pth_fln = NULL,
int  confirm_overwrite = 1 
)
static

Saves a Tag or Path file by filename with the current path
If new_pth_fln is NULL, the name of the current path is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting tag file.

Parameters
[in]new_pth_flnnew tag file name, maximum length HS_MAXSTR
[in]confirm_overwrite= 1 prompt the user to confirm overwriting if file exist, = 0 no confirmation required
Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SavePathes ( void  )
static

Opens a dialog to save a .tag File containing all pathes.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SavePathes_ext ( char *  new_pth_fln = NULL,
int  confirm_overwrite = 1 
)
static

Saves a Tag or Path file by filename containing all pathes
If new_pth_fln is NULL, the name of the current cell is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting tag file.

Parameters
[in]new_pth_flnnew tag file name, maximum length HS_MAXSTR
[in]confirm_overwrite= 1 prompt the user to confirm overwriting if file exist, = 0 no confirmation required
Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SaveRobot ( void  )
static

Opens a dialog to save a .rob Robot file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SaveRobot_ext ( char *  new_rob_fln = NULL,
int  confirm_overwrite = 1 
)
static

Saves a robot file by filename
If new_rob_fln is NULL, the name of the robot is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting robot file.

Parameters
[in]new_rob_flnnew robot file name, maximum length HS_MAXSTR
[in]confirm_overwrite= 1 prompt the user to confirm overwriting if file exist, = 0 no confirmation required
Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SaveRobotAsm ( void  )
static

Opens a dialog to save a .ras Robot Assembly file.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SaveRobotAsm_ext ( char *  new_ras_fln = NULL,
int  confirm_overwrite = 1 
)
static

Saves a robot Assembly file by filename
If new_ras_fln is NULL, the name of the robot assembly is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting robot file.

Parameters
[in]new_ras_flnnew robot file name, maximum length HS_MAXSTR
[in]confirm_overwrite= 1 prompt the user to confirm overwriting if file exist, = 0 no confirmation required
Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SaveTool ( void  )
static

Opens a dialog to save a .tol Tool File.

Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR
static ER_DllExport int ER_CAPI_USER_IO_FILE::SaveTool_ext ( char *  new_tol_fln = NULL,
int  confirm_overwrite = 1 
)
static

Saves a tool file by filename
If new_tol_fln is NULL, the name of the tool is used.
Set confirm_overwrite = 1, to prompt the user to confirm overwriting tool file.

Parameters
[in]new_tol_flnnew tool file name, maximum length HS_MAXSTR
[in]confirm_overwrite= 1 prompt the user to confirm overwriting if file exist, = 0 no confirmation required
Return values
0- ER_OK
-1- ER_CANCEL, dialog cancelled
1- ER_ERROR

The documentation for this class was generated from the following file: