![]() |
Junction Diagram Automation Suite 1.2.0
An AutoCAD 2024 plugin for the manipulation and generation of junction box wiring diagrams
|
Interface for helper functions related to database operations. More...
#include "dbents.h"
#include "dbapserv.h"
#include "dbdynblk.h"
#include "dbeval.h"
#include "acdb.h"
#include "rxregsvc.h"
Go to the source code of this file.
Functions | |
AcDbObjectId | acadInsertBlock (const wchar_t *blockName, const AcGePoint3d &origin) |
Insert a block into the database at a specified origin point. | |
Acad::ErrorStatus | acadSetDynBlockProperty (const AcDbObjectId &blockRefId, const wchar_t *propName, const AcDbEvalVariant &newValue) |
Set a dynamic block property to a new value. | |
Acad::ErrorStatus | acadGetDynBlockProperty (const AcDbObjectId &blockRefId, const wchar_t *propName, AcDbEvalVariant &outValue) |
Retrieve the value of a dynamic block property. | |
Acad::ErrorStatus | acadSetBlockAttribute (const AcDbObjectId &blockRefId, const wchar_t *tagName, const wchar_t *newValue) |
Set a block attribute to a new value. | |
Acad::ErrorStatus | acadGetBlockAttribute (const AcDbObjectId &blockRefId, const wchar_t *tagName, std::wstring &outValue) |
Retrieve the text value of a block attribute. | |
Acad::ErrorStatus | acadSetObjectProperty (const AcDbObjectId &objId, AcDb::DxfCode groupCode, const wchar_t *value) |
Set a general object property to a new value. | |
Acad::ErrorStatus | acadSetObjectPosition (const AcDbObjectId &objId, const AcGePoint3d &position) |
Set the position of a supported entity. | |
Acad::ErrorStatus | acadGetObjectPosition (const AcDbObjectId &objId, AcGePoint3d &outPosition) |
Get the position of a supported entity. | |
Acad::ErrorStatus | acadSetObjectScale (const AcDbObjectId &objId, const AcGeScale3d &scale) |
Set the scale of a supported entity. | |
Acad::ErrorStatus | acadGetObjectScale (const AcDbObjectId &objId, AcGeScale3d &outScale) |
Get the scale of a supported entity. | |
Acad::ErrorStatus | acadGetBlockName (const AcDbObjectId &objId, std::wstring &name) |
Get block name that an object references. |
Interface for helper functions related to database operations.
This module is part of the Junction Diagram Automation Suite. Unauthorized copying, distribution, or modification is prohibited.
Acad::ErrorStatus acadGetBlockAttribute | ( | const AcDbObjectId & | blockRefId, |
const wchar_t * | tagName, | ||
std::wstring & | outValue ) |
Retrieve the text value of a block attribute.
Searches the given block reference for an attribute whose tag matches tagName
(case‑insensitive). If found, the attribute’s text string is returned in outValue
.
blockRefId | The object ID of the block reference to inspect. |
tagName | The attribute tag to search for (case‑insensitive). |
outValue | Receives the attribute’s text string on success. |
Acad::ErrorStatus acadGetBlockName | ( | const AcDbObjectId & | objId, |
std::wstring & | name ) |
Get block name that an object references.
This function takes an objectId, checks to see if its a reference to a block, and returns the name of that block reference.
objId | The object ID of the entity whose block name we want.ABC |
name | A wide string reference where the name will be stored. Empty if the object is not a block reference. |
Acad::ErrorStatus acadGetDynBlockProperty | ( | const AcDbObjectId & | blockRefId, |
const wchar_t * | propName, | ||
AcDbEvalVariant & | outValue ) |
Retrieve the value of a dynamic block property.
This function reads the current value of a specified property from a dynamic block reference.
blockRefId | The object ID of the block reference whose property is being read. |
propName | The name of the property to retrieve. Must exist in the dynamic block definition. |
outValue | Output parameter that receives the current value of the property, encapsulated as an AcDbEvalVariant. |
Acad::ErrorStatus acadGetObjectPosition | ( | const AcDbObjectId & | objId, |
AcGePoint3d & | outPosition ) |
Get the position of a supported entity.
This function retrieves the position of a supported object type, such as a block reference, point, circle, or text. The result is stored in a 3D point.
objId | The object ID of the entity. |
outPosition | The position of the entity, if supported. |
Acad::ErrorStatus acadGetObjectScale | ( | const AcDbObjectId & | objId, |
AcGeScale3d & | outScale ) |
Get the scale of a supported entity.
Retrieves the scale factors (X, Y, Z) of a block reference or other scalable entity.
objId | The object ID of the entity. |
outScale | Receives the object's scale as an AcGeScale3d. |
AcDbObjectId acadInsertBlock | ( | const wchar_t * | blockName, |
const AcGePoint3d & | origin ) |
Insert a block into the database at a specified origin point.
This function inserts a block with the given name into the database at the provided origin point and returns the object ID of the inserted block.
blockName | The name of the block to be inserted. Must be a valid string representing an existing block definition. |
origin | The 3D point where the block should be placed in the database. |
Acad::ErrorStatus acadSetBlockAttribute | ( | const AcDbObjectId & | blockRefId, |
const wchar_t * | tagName, | ||
const wchar_t * | newValue ) |
Set a block attribute to a new value.
This function updates the specified attribute of a block reference with a new value.
blockRefId | The object ID of the block reference whose attribute is being set. |
tagName | The name of the tag associated with the attribute. Must exist in the block definition. |
newValue | A wide string pointer to the new value for the specified attribute. |
Acad::ErrorStatus acadSetDynBlockProperty | ( | const AcDbObjectId & | blockRefId, |
const wchar_t * | propName, | ||
const AcDbEvalVariant & | newValue ) |
Set a dynamic block property to a new value.
This function updates the specified property of a dynamic block reference with a new value.
blockRefId | The object ID of the block reference whose property is being set. |
propName | The name of the property to be updated. Must exist in the dynamic block definition. |
newValue | The new value for the specified property, encapsulated as an AcDbEvalVariant. |
Acad::ErrorStatus acadSetObjectPosition | ( | const AcDbObjectId & | objId, |
const AcGePoint3d & | position ) |
Set the position of a supported entity.
This function updates the position of a supported object type, such as a block reference, point, text, or circle. Entities not supporting a direct position cannot be modified using this function.
objId | The object ID of the entity to be updated. |
position | The new position to assign to the entity. |
Acad::ErrorStatus acadSetObjectProperty | ( | const AcDbObjectId & | objId, |
AcDb::DxfCode | groupCode, | ||
const wchar_t * | value ) |
Set a general object property to a new value.
This function updates the specified property of an object with a new value, identified by a DXF group code.
objId | The object ID of the entity whose property is being set. |
groupCode | The DXF group code representing the property type to be updated. For example, AcDb::kDxfLayerName for the layer name. |
value | A wide string pointer to the new value for the specified property. |
Acad::ErrorStatus acadSetObjectScale | ( | const AcDbObjectId & | objId, |
const AcGeScale3d & | scale ) |
Set the scale of a supported entity.
Updates the X/Y/Z scale factors of a block reference or similar entity.
objId | The object ID of the entity to scale. |
scale | The new scale as an AcGeScale3d. |