×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Writing Marcos
2

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

 

RE: Writing Marcos

Please let me know which part is gonna be dynamic?

RE: Writing Marcos

(OP)
I do not understand your question, it is not a dynamic simulation.
I do not know how to break the macro into separate lines without causing any problems.

RE: Writing Marcos

Staryash,

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

(OP)
HI Msha

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

I use notepad++ as my py editor, and it has all the entries on separate lines already. I forget which, either notepad or wordpad, but one of them has a problem reading carriage returns and line breaks for me, replacing them with little rectangles. Try Notepad++. It rocks.

RE: Writing Marcos

Staryash,

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources