How to set text alignment using ent_make()?
Posted: Wed Nov 17, 2004 4:07 pm
Hello,
I am trying to insert text using sds_entmake(). If I change the horizontal alignment setting to "Center", as shown below, then the text is inserted at 0,0 instead of the insertion coordinates in "point1". If no horizontal alignment is specified then it seems to work fine.
The function below reproduces the problem. Any help you can give me is greatly appreciated.
Dale
/////////////////////////////
void Command_Test()
{
int returni;
sds_point point1;
char string1[512];
struct resbuf *entlist = NULL;
strcpy(string1, "This is a test.");
sds_getpoint(NULL, "\nSelect insertion point for text: ", point1);
entlist = sds_buildlist(
RTDXF0, "TEXT",
10, point1,
72, 1, // TAKE THIS LINE OUT AND IT WORKS!!!!!
1, string1,
RTNONE);
returni = sds_entmake(entlist);
if (entlist != NULL){
sds_relrb(entlist);
entlist = NULL;
}
sds_printf("\nsds_entmake returned %i", returni);
}//end void
I am trying to insert text using sds_entmake(). If I change the horizontal alignment setting to "Center", as shown below, then the text is inserted at 0,0 instead of the insertion coordinates in "point1". If no horizontal alignment is specified then it seems to work fine.
The function below reproduces the problem. Any help you can give me is greatly appreciated.
Dale
/////////////////////////////
void Command_Test()
{
int returni;
sds_point point1;
char string1[512];
struct resbuf *entlist = NULL;
strcpy(string1, "This is a test.");
sds_getpoint(NULL, "\nSelect insertion point for text: ", point1);
entlist = sds_buildlist(
RTDXF0, "TEXT",
10, point1,
72, 1, // TAKE THIS LINE OUT AND IT WORKS!!!!!
1, string1,
RTNONE);
returni = sds_entmake(entlist);
if (entlist != NULL){
sds_relrb(entlist);
entlist = NULL;
}
sds_printf("\nsds_entmake returned %i", returni);
}//end void