The Format class provides the interface to:
Public Member Functions | |
Construction | |
| Format (tag_t drawing) | |
| Format (NXOpen::Drawings::DrawingSheet *drawing) | |
Operations | |
| void | addBorder (const std::string &borderId, const std::string &sizeId) |
| void | setBorderSize (const std::string &sizeId) |
| void | deleteBorder () |
| void | updateBorder () |
| Updates the border definition to current one on disk. | |
| BlockPtr | insertBlock (const std::string &blockId, const std::string &styleId="", const std::string &locationId="") |
| void | deleteBlock (const std::string &blockId) |
| void | deleteBlock (const BlockPtr &block) |
Query | |
| std::string | borderId () const |
| std::string | sizeId () const |
| std::string | zone (const NXOpen::Point3d &point) const |
| BlockList | blocks () |
| BlockPtr | getBlock (const std::string &blockId) |
| bool | hasBlock (const std::string &blockId) |
| DphFormat::Format::Format | ( | tag_t | drawing | ) |
Create a Format object
| [in] | drawing | UG/Open API tag of drawing |
| DphFormat::Format::Format | ( | NXOpen::Drawings::DrawingSheet * | drawing | ) |
Create a Format object
| [in] | drawing | the drawing to work with |
| void DphFormat::Format::addBorder | ( | const std::string & | borderId, | |
| const std::string & | sizeId | |||
| ) |
Add border to drawing
| [in] | borderId | the ID of border to add |
| [in] | sizeId | the ID of the size to use |
| BlockList DphFormat::Format::blocks | ( | ) |
Get list of blocks on drawing
| std::string DphFormat::Format::borderId | ( | ) | const |
Get id of border on drawing
| void DphFormat::Format::deleteBlock | ( | const BlockPtr & | block | ) |
Delete a block
| [in] | block | the block to delete |
| void DphFormat::Format::deleteBlock | ( | const std::string & | blockId | ) |
Delete a block
| [in] | blockId | the ID of the block to delete |
| void DphFormat::Format::deleteBorder | ( | ) |
Delete the border from drawing
| BlockPtr DphFormat::Format::getBlock | ( | const std::string & | blockId | ) |
Get a specific block on the drawing
| [in] | blockId | the block ID of the block to retrieve |
| std::runtime_error | no block with ID on drawing |
| bool DphFormat::Format::hasBlock | ( | const std::string & | blockId | ) |
Query if block is on drawing
| [in] | blockId | the block ID of the block to query |
| BlockPtr DphFormat::Format::insertBlock | ( | const std::string & | blockId, | |
| const std::string & | styleId = "", |
|||
| const std::string & | locationId = "" | |||
| ) |
Insert a block on the drawing
| [in] | blockId | the ID of the block to insert |
| [in] | styleId | the ID of the style to use(empty string will use default) |
| [in] | locationId | the ID of the location to use(empty string will use first one found) |
| void DphFormat::Format::setBorderSize | ( | const std::string & | sizeId | ) |
Change the size of border
| [in] | sizeId | the ID of the size to use |
| std::string DphFormat::Format::sizeId | ( | ) | const |
Get id of the size of the border
| std::string DphFormat::Format::zone | ( | const NXOpen::Point3d & | point | ) | const |
Get the zone ID of a drawing location
| [in] | point | the point to get zone location of |
1.4.7