X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Ffirst_feature_help.doc;h=233e9fd3c323fd8488c9609a885ab26474bb2255;hb=c12120c706aa547ef9003f0499fb4465ed8df7bb;hp=c40f79d60385df593ee133385c53e9990e4c3aca;hpb=6e27727376faace9ceda340620950ede7513de42;p=modules%2Fshaper.git diff --git a/doc/first_feature_help.doc b/doc/first_feature_help.doc index c40f79d60..233e9fd3c 100644 --- a/doc/first_feature_help.doc +++ b/doc/first_feature_help.doc @@ -1,7 +1,7 @@ /*! \page first_feature_help How to create custom features or plugins -A NewGeom module consists of one or several plug-ins which provide implementation of Module features. To extend the application functionality, developers are able to add their own features into existent plugins. Also, it is possible to create a custom plugin, if necessary. +A SHAPER module consists of one or several plug-ins which provide implementation of Module features. To extend the application functionality, developers are able to add their own features into existent plugins. Also, it is possible to create a custom plugin, if necessary. \n This document describes the basic principles of plugin/feature system and shows how to use the API for writing a feature or plugin. Currently, the API is available for C++ and Python languages. Plugin, written in C++ is a shared object (dll); For Python, it is regular python module, with *.py extension. \n @@ -118,13 +118,13 @@ And like a plugin implements a functionality to create 'feature' objects by stri \code void ConstructionPlugin_Point::initAttributes() { - data()->addAttribute("DoubleCounterData", ModelAPI_AttributeDouble::type()); + data()->addAttribute("DoubleCounterData", ModelAPI_AttributeDouble::typeId()); } \endcode Python: \code def initAttributes(self): - self.data().addAttribute("DoubleCounterData", ModelAPI.ModelAPI_AttributeDouble.type()) + self.data().addAttribute("DoubleCounterData", ModelAPI.ModelAPI_AttributeDouble.typeId()) \endcode As you may notice, this method defines that feature has a widget with "DoubleCounterData" id, which has Double type. Therefore, if your feature uses, in example, three widgets, the `initAttributes()` method should 'init' three attributes. \n