| |
| Gut zu wissen: Hilfreiche Tipps und Tricks aus der Praxis prägnant, und auf den Punkt gebracht für Ansys |
Autor
|
Thema: Getting Design Point Number (1703 mal gelesen)
|
GotAQUESTION Mitglied
Beiträge: 5 Registriert: 06.01.2017
|
erstellt am: 06. Jan. 2017 16:41 <-- editieren / zitieren --> Unities abgeben:
Hi all, i hope someone can help me with this specific problem. I have written an APDL script witch I included in workbench via an ACT. All works fine and does give the results I want. The Problem: I want to save some specific results that I write into a text-file via the ACT for several design points I created. These files should be saved in a folder witch I created manually. But at the moment they will be overwritten for each design point because the text-file name is always the same. So what I want is a python-command to get the design point of the actual analysis so that I can generate a name corresponding to the design point. Does anybody know a command able giving me that integer Value or whatever indicating the actual design point? Thank you for your help! Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
arnd13 Mitglied Dipl. Ing.
Beiträge: 735 Registriert: 05.11.2008
|
erstellt am: 09. Jan. 2017 09:36 <-- editieren / zitieren --> Unities abgeben: Nur für GotAQUESTION
I am not yet familiar with ACT and Python I am afraid, but there should be something in the *get-family that gives you the necessary Information, e.g.: *get,designpoint_,active,,solu,ncmls ------------------ Gruß, A. Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
GotAQUESTION Mitglied
Beiträge: 5 Registriert: 06.01.2017
|
erstellt am: 09. Jan. 2017 10:10 <-- editieren / zitieren --> Unities abgeben:
Thank you for the tip! I searched in the Ansys Help but unfortunately I couldn't find any possibility to access the information I need via the "*get"-Command. Actually I couldn't find any APDL-Command... Any Other Ideas? Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
arnd13 Mitglied Dipl. Ing.
Beiträge: 735 Registriert: 05.11.2008
|
erstellt am: 09. Jan. 2017 10:16 <-- editieren / zitieren --> Unities abgeben: Nur für GotAQUESTION
Doesn't the "design Point" you are searching for correspondent with the solution set (or "time step") on the rst-file? If yes then the command *get,designpoint_,active,,solu,ncmls gives you the number which you can use in the file name. If I did not understand correctly, then please explain again what you are looking for... ------------------ Gruß, A. Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
PauleBeinlich Mitglied Simulant
Beiträge: 59 Registriert: 26.04.2011 Win 10 CPU + Ram ausreichend ANSYS WB 2020 R1
|
erstellt am: 09. Jan. 2017 11:15 <-- editieren / zitieren --> Unities abgeben: Nur für GotAQUESTION
Hi... as far as i understand the question you are interested in a Command to extract the current designpoint-number as highlighted in the picture, right? @arnd13: your command leads to column P5 because you get a rst-file for each dp... I'm afraid, I don't know how to get the number but I'm very interested in any solution (if there is any ) greetings PauleBeinlich ------------------ Rettet dem Dativ! Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
arnd13 Mitglied Dipl. Ing.
Beiträge: 735 Registriert: 05.11.2008
|
erstellt am: 09. Jan. 2017 11:24 <-- editieren / zitieren --> Unities abgeben: Nur für GotAQUESTION
Understand. I was not aware that there are different rst-files for every DP. I suggest to use the name of the rst (I assumes they are named file01.rst, file02.rst ...) or use the wall clock time for identification of the produced file. *get,time_,active,,time,wall ------------------ Gruß, A. Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
GotAQUESTION Mitglied
Beiträge: 5 Registriert: 06.01.2017
|
erstellt am: 09. Jan. 2017 12:44 <-- editieren / zitieren --> Unities abgeben:
@PauleBeinlich: That's exactly what I'm looking for. Im sure that there exists a command!... Just need to find it... Always the same But an alternative way to reach what I want would be also nice, so I will explain what I want more detailed. I want to save Pictures of the deformation and other Values and Results that I wright into a txt-file in a specified path. I extract this data via APDL-Commands. Those Commands are included in a ACT. The folder/path in witch the data is saved keeps for every designpoint the same. But to avoid overwriting the data in the specified folder for every designpoint I need to know the number of the actual designpoint that is solved so that I can give generic names for the data I want to save via the ACT. I hope u understand what I explained and that it's not confusing you... (can't imagine that there is no python command...Would be the smartest way I think) Thanks in advance! Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
GotAQUESTION Mitglied
Beiträge: 5 Registriert: 06.01.2017
|
erstellt am: 09. Jan. 2017 13:42 <-- editieren / zitieren --> Unities abgeben:
|
GotAQUESTION Mitglied
Beiträge: 5 Registriert: 06.01.2017
|
erstellt am: 10. Jan. 2017 10:05 <-- editieren / zitieren --> Unities abgeben:
That didn't work how I expected... But I have a new idea but I don't understand how to use the python-commands... I want to insert the following command: pathRoot = GetUserPathRoot() With this I expect to get the Directory of my project. And in this directory-"name" should appear something like "...\dp0\..." specifying the designpoint. What stands in the string of "pathRoot" I want to control via "pathRoot.find("\dp", 0)". But Ansys Workbench doesn't accept the "GetUserPathRoot()" at all... And I don't understand why... I found that command in the "Workbench Scripting Guide.pdf" by searching for directory. Can anybody help? Thank's for your engagement! [Diese Nachricht wurde von GotAQUESTION am 10. Jan. 2017 editiert.] Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |