parameters: (self, name="Line", icon="Draft_Line")
docstring: Execute when the command is called.
docstring_summary: Execute when the command is called.
docstring_tokens: Execute when the command is called .
function: def Activated(self, name="Line", icon="Draft_Line"):
          """Execute when the command is called."""
          super(Line, self).Activated(name)
  
          if not self.doc:
              return
          self.obj = None  # stores the temp shape
          self.oldWP = None  # stores the WP if we modify it
          if self.isWire:
              self.ui.wireUi(title=translate("draft", self.featureName), icon=icon)
          else:
              self.ui.lineUi(title=translate("draft", self.featureName), icon=icon)
          if sys.version_info.major < 3:
              if isinstance(self.featureName, unicode):
                  self.featureName = self.featureName.encode("utf8")
  
          self.obj = self.doc.addObject("Part::Feature", self.featureName)
          gui_utils.format_object(self.obj)
  
          self.call = self.view.addEventCallback("SoEvent", self.action)
          _msg(translate("draft", "Pick first point"))
function_tokens: def Activated ( self , name = "Line" , icon = "Draft_Line" ) : super ( Line , self ) . Activated ( name ) if not self . doc : return self . obj = None # stores the temp shape self . oldWP = None # stores the WP if we modify it if self . isWire : self . ui . wireUi ( title = translate ( "draft" , self . featureName ) , icon = icon ) else : self . ui . lineUi ( title = translate ( "draft" , self . featureName ) , icon = icon ) if sys . version_info . major < 3 : if isinstance ( self . featureName , unicode ) : self . featureName = self . featureName . encode ( "utf8" ) self . obj = self . doc . addObject ( "Part::Feature" , self . featureName ) gui_utils . format_object ( self . obj ) self . call = self . view . addEventCallback ( "SoEvent" , self . action ) _msg ( translate ( "draft" , "Pick first point" ) )