-
Hi, I have been trying to import my model from creo_parametric using mapdl.proein and mapdl.igesin command from pyansys working directory. I am getting errors and I would like to use most efficient way to import my model. Glad to hear solutions from you guys First way: command---> mapdl.proein(name='motor_blok',extension='prt')
error:
---------------------------------------------------------------------------
MapdlCommandIgnoredError Traceback (most recent call last)
Cell In[25], line 4
1 #cwd=os.getcwd()
2 #print(cwd)
3 #igs_file_path="C\\Users\\bahadirmurat\\Desktop\\PYANSYS\\engine_block\\motor_blok"
----> 4 mapdl.proein(name='motor_blok',extension='prt')
File ~\anaconda_last\lib\site-packages\ansys\mapdl\core\_commands\conn.py:211, in Conn.proein(self, name, extension, path, proecomm, **kwargs)
178 """APDL Command: ~PROEIN
179
180 Transfers a Creo Parametric part into the ANSYS program.
(...)
208 Creo Parametric (formerly Pro/ENGINEER) in the Connection User's Guide.
209 """
210 command = f"~PROEIN,{name},{extension},{path},{proecomm}"
--> 211 return self.run(command, **kwargs)
File ~\anaconda_last\lib\site-packages\ansys\mapdl\core\mapdl.py:3004, in _MapdlCore.run(self, command, write_to_log, mute, **kwargs)
3001 return self._response
3003 if not self.ignore_errors:
-> 3004 self._raise_errors(text)
3006 # special returns for certain geometry commands
3007 short_cmd = parse_to_short_cmd(command)
File ~\anaconda_last\lib\site-packages\ansys\mapdl\core\mapdl.py:4015, in _MapdlCore._raise_errors(self, text)
4013 if "command is ignored" in flat_text:
4014 text += "\n\nIgnore these messages by setting 'ignore_errors'=True"
-> 4015 raise MapdlCommandIgnoredError(text)
4017 # flag errors
4018 if "*** ERROR ***" in flat_text:
MapdlCommandIgnoredError: ANSYS Connection for Pro/ENGINEER
Pro Part: motor_blok.prt
Pro/E Command: parametric1
File Type: ANF
QUERY = COMMON,,IGES_TOL,,INT,5
*** Warning: ANSYS installation directory not set
ANSYS221_SYSDIR=
*** WARNING *** CP = 0.188 TIME= 09:17:32
File motor_blok.anf does not exist.
The /INPUT command is ignored.
***** ROUTINE COMPLETED ***** CP = 0.188
*** ANSYS - ENGINEERING ANALYSIS SYSTEM RELEASE 2022 R1 22.1 ***
DISTRIBUTED Ansys Mechanical Premium
00000000 VERSION=WINDOWS x64 09:17:32 SEP 26, 2023 CP= 0.188
***** ANSYS ANALYSIS DEFINITION (PREP7) *****
Ignore these messages by setting 'ignore_errors'=True Second Way commands----> mapdl.igesin('motor_blok.igs') or mapdl.igesin(fname='motor_blok',ext='igs')
error:
---------------------------------------------------------------------------
MapdlInvalidRoutineError Traceback (most recent call last)
Cell In[46], line 5
1 #cwd=os.getcwd()
2 #print(cwd)
3 #igs_file_path="C\\Users\\bahadirmurat\\Desktop\\PYANSYS\\engine_block\\motor_blok"
4 #mapdl.proein(name='motor_blok',extension='prt')
----> 5 mapdl.igesin('motor_blok.igs')
File ~\anaconda_last\lib\site-packages\ansys\mapdl\core\mapdl_grpc.py:2733, in MapdlGrpc.igesin(self, fname, ext, **kwargs)
2731 return out
2732 else:
-> 2733 return super().igesin(fname=filename, **kwargs)
File ~\anaconda_last\lib\site-packages\ansys\mapdl\core\_commands\aux15_.py:57, in Aux15.igesin(self, fname, ext, **kwargs)
2 def igesin(self, fname="", ext="", **kwargs):
3 """Transfers IGES data from a file into MAPDL.
4
5 APDL Command: IGESIN
(...)
55
56 """
---> 57 return self.run(f"IGESIN,{fname},{ext}", **kwargs)
File ~\anaconda_last\lib\site-packages\ansys\mapdl\core\mapdl.py:3004, in _MapdlCore.run(self, command, write_to_log, mute, **kwargs)
3001 return self._response
3003 if not self.ignore_errors:
-> 3004 self._raise_errors(text)
3006 # special returns for certain geometry commands
3007 short_cmd = parse_to_short_cmd(command)
File ~\anaconda_last\lib\site-packages\ansys\mapdl\core\mapdl.py:4011, in _MapdlCore._raise_errors(self, text)
4009 text = text.replace("This command will be ignored.", "")
4010 text += "\n\nIgnore these messages by setting 'ignore_errors'=True"
-> 4011 raise MapdlInvalidRoutineError(text)
4013 if "command is ignored" in flat_text:
4014 text += "\n\nIgnore these messages by setting 'ignore_errors'=True"
MapdlInvalidRoutineError: *** WARNING *** CP = 0.156 TIME= 09:27:24
IGESIN is not a recognized BEGIN command, abbreviation, or macro.
Ignore these messages by setting 'ignore_errors'=True |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @bahadir14 The IGESIN command is a AUX15 command - meaning you have to be in the AUX15 level (and not the Begin level) in order to use the command. Similar to how we have to be in the Solution level to issue a Solve command. So be sure to issue a: mapdl.aux15() Prior to the IGESIN command. |
Beta Was this translation helpful? Give feedback.
Hi @bahadir14
Are you using a Student version installation? Check the system environment variables as it seems that ANSYS221_SYSDIR is not defined.
The IGESIN command is a AUX15 command - meaning you have to be in the AUX15 level (and not the Begin level) in order to use the command. Similar to how we have to be in the Solution level to issue a Solve command. So be sure to issue a:
Prior to the IGESIN command.
Mike