Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces not allowed in strings in MAPDL #3718

Open
germa89 opened this issue Jan 29, 2025 · 1 comment
Open

Spaces not allowed in strings in MAPDL #3718

germa89 opened this issue Jan 29, 2025 · 1 comment
Labels
bug Issue, problem or error in PyMAPDL

Comments

@germa89
Copy link
Collaborator

germa89 commented Jan 29, 2025

Currently, this fail:

mapdl.parameters['mypar'] = "hi there"

I think it was due to parsing issues on the client.

Suggestions:

Use this:

mapdl.input_strings("""
STR_ARRAY=
*DIM, STR_ARRAY, STRING, 80, 3
STR_ARRAY(1,1) = '1---------2---------3---------4---------5---------6---------7---------8---------9---------10--------11--------12--------'
STR_ARRAY(1,2) = 'x1---------2---------3---------4---------5---------6---------7---------8---------9---------10--------11--------12--------'
STR_ARRAY(1,3) = 'x1         2         3         4         5         6         7         8         9         10        11        12        '
*cfopen,'file.txt'
*VWRITE,STR_ARRAY(1,1)
%C
*cfclose
""")
mapdl.download("file.txt")
@germa89
Copy link
Collaborator Author

germa89 commented Jan 29, 2025

Surprisingly, this does not work either:

>>> mapdl.parameters['adf'] = "32_chars_leng".center(32, 's')
>>> mapdl.parameters['adf']
''

Edit Nevermind: It does not work on the debugger.. not sure why

@germa89 germa89 added the bug Issue, problem or error in PyMAPDL label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue, problem or error in PyMAPDL
Projects
None yet
Development

No branches or pull requests

1 participant