ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
421 stars 119 forks source link

mapdl.cdwrite(options = 'DB', fname = saveName, ext = 'cdb') #2273

Closed mcMunich closed 12 months ago

mcMunich commented 1 year ago

🤓 Before submitting the issue

🔍 Description of the bug

mapdl.cdwrite(options = 'DB', fname = saveName, ext = 'cdb') will write the cdb but also the .iges which is not required. The standard apdl command only writes the .cdb. Not a huge issue, but it is time/memory.

Run the script below and a .cdb and a .iges will be created.

🕵️ Steps To Reproduce

from ansys.mapdl.core import launch_mapdl
import os
myDir = 'D:\\temp'

version = 'C:\\Program Files\\ANSYS Inc\\v232\\ansys\\bin\\winx64\\ansys232.exe'
mapdl = launch_mapdl(run_location = myDir, exec_file = version)
mapdl.prep7()
mapdl.blc4(0, 0, 1, 1, 1)

mapdl.cdwrite(options = 'DB', fname = 'test1', ext = 'cdb')
mapdl.exit()

💻 Which Operating System are you using?

Windows

🐍 Which Python version are you using?

3.11

📝 PyMAPDL Report

xxx

📝 Installed packages

xxx

📝 Logger output file

xxx

mikerife commented 1 year ago

Hi @mcMunich & @germa89 This is not a bug - sorry it's a typo. The command field is "option" not "options" on the CDWRITE command. Since "option" is not defined it uses the default 'all' i.e. cdb and iges creation.

Mike

germa89 commented 1 year ago

Nice catch @mikerife ... I will see if we can do something about this.... I am not closing the issue for the moment.

mcMunich commented 1 year ago

works for me. thanks for the clarification. Resolved from my side.