Writing Marcos
Writing Marcos
(OP)
I have marco recording as attached, and I would like to improve the style, so that I can write the macros without running one and editing them.
Regards
Regards
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: Writing Marcos
RE: Writing Marcos
I do not know how to break the macro into separate lines without causing any problems.
RE: Writing Marcos
You can run a macro using execfile('marcofile.py') as well as "File>Run script" menu. I though you wanna make the script more changeable (dynamic). In the case, you could use x=getInput('x=','default value for x').
Regards,
RE: Writing Marcos
I created this macro by recording the procedure in ABAQUS, and when I want to use it I have to edit the filenames.
And, all the commands are in one straight line.
I want to know, where the appropriate breaks are, or a suitable (free) editor of the macro. So for example..
123 4567 890 1234567890 ...
can be written as
123 4567
890
1234567890...
as appropriate for ABAQUS.
I can run the script, by using macro manager.
Regards
RE: Writing Marcos
RE: Writing Marcos
Abaqus 6.7 and later has a Python editor and debugger as well. you can find it in "File>ABAQUS PDE" menu.
Notepad++ is a free editor.
I myself use PyScripter. It is free and very powerful for professional scripting.