C++
Acad::ErrorStatus upgradeFromNotify( Adesk::Boolean& wasWritable );
Description
Upgrades the object from being at least open AcDb::kForNotify to being open both AcDb::kForNotify and AcDb::kForWrite. The wasWritable argument is set to Adesk::kTrue if the object was already open for write, otherwise it's set to Adesk::kFalse. The wasWritable value should be saved to be passed into the downgradeToNotify() call later.
This function must be followed at some point by a call to downgradeToNotify() with no open() (in any of its forms) or close() calls in between.
This method should only be called from within other methods of the same object it is being called from. In other words, this method is intended to be used by an object to change it's own open status so that it can safely modify itself.
upgradeFromNotify() and downgradeToNotify() call pairs are not nestable.
Returns Acad::eOk if successful. If the object is not currently open AcDb::kForNotify, then Acad::eNotApplicable is returned. If the object is currently in the process of actually sending notification (that is, isNotifying() returns Adesk::kTrue), then Acad::eWasNotifying is returned.
Parameters
Parameters | Description |
---|---|
wasWritable | Return with Boolean indicating if object was already open for write. This value should be saved and passed into the subsequent downgradeToNotify() call. |