! ! TITLE: getiges.mac (MANAGEMENT) ! !--------------------------------------------------------------------------- ! Rev - 02/28/2001 D. Edwards ! ! Rev A 01/04/2002 D. Edwards ! Ansys 5.7 changed "IOPTN,IGES,ALTERNATE" ! to "IOPTN,IGES,NODEFEAT" ! ! Rev B 05/13/2005 D. Edwards ! Call perl via DOS batch file for path handling ! !--------------------------------------------------------------------------- ! ! Read an IGES file and parameterize its points and lines. ! ! NOTE: This macro requires perl to be installed on the computer. ! See ansys/tools/README.perl for more information. ! !------------------------------ COMMAND SYNTAX ----------------------------- ! ! USAGE: getiges,'fname_iges' ! getiges (All prompted input) ! ! where fname_iges = base file name (w/o extension) of the IGES file ! to be read in. Single quotes must surround the name. ! !------------------------------ Examples ----------------------------------- ! ! Read in "flange.igs" and prompt for needed information to fill into ! flange.mac (a copy of macro_template.mac renamed to flange.mac). All the ! prompted information is stored in a file named flange.inf. ! ! getiges 'flange' ! ! Running the command again will use the contents of flange.inf rather than ! prompt for all the same information again. Any changes to the information ! is accomplished by editing flange.inf before rerunning the getiges macro. ! ! !---------------------- List of Dependencies ------------------------------ ! ! getiges.mac ! tools/macro_template.mac ! tools/parameter_file_template.mac ! !--------------------------------------------------------------------------- *get,prkey_,active,0,prkey /nopr fini /clear,start ! ! Prompt for IGES base file name if not given on command line ! figes_=arg1 *get,ptype_,parm,figes_,type *if,ptype_,ne,3,then *ask,figes_,Enter the base name of the .igs file:,'figes' *endif ! ! Enter the IGES file translator ! /aux15 IOPTN,IGES,NODEFEAT ! In 5.6 use: IOPTN,IGES,ALTERNATE IOPTN,MERGE,YES IOPTN,SOLID,NO IOPTN,SMALL,NO IOPTN,GTOLER, DEFA igesin,%figes_%,igs fini /prep7 ! Renumbering is needed since merged KP's may leave gaps in numbering numcmp,all /PNUM,KP,1 /PNUM,LINE,1 lplot ! ! Generate output listings for mkmac.sh ! /out,kp_def,lis klist,all,,,coord /out /out,l_def,lis llist,,,,radius /out ksll,u /out,kp_cent,lis klist,all,,,coord /out alls ! ! Generate an Ansys macro from the KP and line information ! /syp,runperl.bat getinfo.perl,figes_ /syp,runperl.bat mkmac.perl,figes_ *if,prkey_,eq,1,then /go *endif