How to add text to the specific layer? #1113
Unanswered
Hallo2World
asked this question in
Q&A
Replies: 1 comment
-
try this: Dwg_Object_Ref *layer_ref = dwg_find_tablehandle(dwg_data, "my_layer", "LAYER");
if (layer_ref == NULL) {
Dwg_Object_LAYER *layer = dwg_add_LAYER(dwg_data, "my_layer");
layer_ref = dwg_find_tablehandle(dwg_data, "my_layer", "LAYER");
}
if (layer_ref != NULL) {
text ->parent->layer = dwg_add_handleref(dwg_data, 5, layer_ref->absolute_ref, NULL);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dwg_Object_LAYER *layer = dwg_add_LAYER(dwg, "my_layer");
dwg_point_3d pt;
pt.x = 0;
pt.y = 0;
int height = 3.5;
Dwg_Entity_TEXT *text = dwg_add_TEXT("Hello World!", &pt, height);
Beta Was this translation helpful? Give feedback.
All reactions