×
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

ABAQUS GUI PickHandler - AFXPickStep

ABAQUS GUI PickHandler - AFXPickStep

ABAQUS GUI PickHandler - AFXPickStep

(OP)
Hello.

I'm new to Abaqus GUI scripting. I'm trying to write a simple proof-of-concept Abaqus Plug-In that allows you to select an element, and then display that selected element in a textfield in the plugin. I'm using the RSG defined "PickHandler" function. I'm able to select elements in CAE. But once I click "Done" I'm not able to get those element values on the back end (within my Form.py AFXObjectKeyword). Or maybe I just don't know where to look.

Here's an image of my plugin:



Here's my PickHandler class:

class TestDBPickHandler(AFXProcedure):

count = 0

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def __init__(self, form, keyword, prompt, entitiesToPick, numberToPick, label):

self.form = form
self.keyword = keyword
self.prompt = prompt
self.entitiesToPick = entitiesToPick # Enum value
self.numberToPick = numberToPick # Enum value
self.label = label
self.labelText = label.getText()

AFXProcedure.__init__(self, form.getOwner())

TestDBPickHandler.count += 1
self.setModeName('TestDBPickHandler%d' % (TestDBPickHandler.count) )

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def getFirstStep(self):

return AFXPickStep(self, self.keyword, self.prompt,
self.entitiesToPick, self.numberToPick, sequenceStyle=TUPLE)

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def getNextStep(self, previousStep):

self.label.setText( self.labelText.replace('None', 'Picked') )
return None

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