To create a dialog step, you must supply the procedure, a dialog box, and, optionally, a prompt for the prompt line. If you do not supply a prompt, Abaqus uses a default prompt of Fill out the dialog box title dialog. The following is an example of a dialog step in a single step procedure: def getFirstStep(self): db = PlateDB(self) prompt = 'Enter plate dimensions in the dialog box' return AFXDialogStep(self, db, prompt) In most cases a procedure will have more than one step. Since a procedure has the ability to back up to previous steps, you must write procedures that do not construct dialog boxes more than once during the procedure. You can prevent a procedure from constructing dialog boxes more than once by initializing procedure members and then checking the members during getNextStep, as shown in the following example: def getFirstStep(self): self.plateWidthDB = None self.plateHeightDB = None db = PlateNameDB(self) self.step1 = AFXDialogStep(self, db) return self.step1 def getNextStep(self, previousStep): if previousStep == self.step1: if not self.plateWidthDB: self.plateWidthDB = PlateWidthDB(self) self.step2 = AFXDialogStep(self, self.plateWidthDB) return self.step2 elif previousStep == self.step2: if not self.plateHeightDB: self.plateHeightDB = PlateHeightDB(self) self.step3 = AFXDialogStep(self, self.plateHeightDB) return self.step3 else: return None |