- Wed Dec 04, 2019 1:18 pm
#304556
To describe a text paragraph, one must use the API structure of API_ParagraphType which would normally be wrapped as a APIObject() in Archicad's Python. The structure is:
Code: Select all
Note: that the first variable, a Int, is named "from" which is a keyword in Python and not usable for reference.Therefore,it's not possible to create a wrapped paragraph python object.The actual code would parallel the example for "rich text" shown in the Element_Test example Add On. BUT its not now possible to create a paragraph object because of this conflict. Any workarounds? (Other than breaking the document up into separate draw segment, which would be a PITA) It might be simpler if Graphisoft would implement HTML or the other inline web format such as "markdown"?typedef struct {
Int32 from;
Int32 range;
API_JustID just;
Int32 filler_1;
double firstIndent;
double indent;
double rightIndent;
double spacing;
API_TabType *tab;
API_RunType *run;
Int32 *eolPos;
Int32 filler_2;
double width;
double height;
double filler_3[2];
} API_ParagraphType;
Gerry
Windows 10 - Visual Studio 2017; ArchiCAD 23
Windows 10 - Visual Studio 2017; ArchiCAD 23