#pragma once #include #include #include "DbBlockElement.h" #include "DbBlockParameter.h" /** \details Base class for the block elements defining dynamic block actions. */ class DYNBLOCKS_EXPORT OdDbBlockAction : public OdDbBlockElement { public: /** \details * Enumeration describing restrictions on the parameter point offsets (where applicable) */ enum OdDbBlockActionXYType { XY, //< Offset is unrestricted (default) X, //< Offset is projected on X axis Y //< Offset is projected on Y axis }; ODDB_EVAL_DECLARE_MEMBERS(OdDbBlockAction); /** \details * Returns the action display location (in the block editor) */ virtual OdGePoint3d displayLocation() const; /** \details * Sets the action display location (in the block editor) */ virtual void setDisplayLocation(const OdGePoint3d&); /** \details * Returns the action element selection set (contains evaluation graph element ids) */ OdDbObjectIdArray elementSelectionSet() const; /** \details * Returns the action entity selection set (contains original block entity ids) */ virtual OdDbObjectIdArray selectionSet() const; /** \details Sets the action entity selection set \remarks Returns false if setting this selection set will produce cycles in the evaluation graph Block elements selection is also taken from that set */ virtual bool setSelectionSet(const OdDbObjectIdArray&); /** \details * Returns the action driving parameter id */ virtual OdDbEvalNodeId drivingParameterNodeId() const; /** \details * By default returns the driving parameter opened in the given mode */ virtual OdDbBlockParameterPtr getAssociatedParameter(OdDb::OpenMode mode = OdDb::kForRead) const; }; typedef OdSmartPtr OdDbBlockActionPtr;