DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Multiline text from Basiccad

Started by dcadRob, October 16, 2019, 11:56:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dcadRob

Is there a way to use Basiccad to read Multiline text?

bdeck

#1
Quote from: dcadRob on October 16, 2019, 11:56:43 AM
Is there a way to use Basiccad to read Multiline text?

Hi Rob,

Select the multiline text entity

ne=sys(9) 'archive number of entities

>Explode
{
}

Result will be (sys(9)-ne+1) text enities of type 13, beginning at ne.

Simplest way to deal with these is to edit them individually and then do a GroupDefine to create a TextBlock that matchs the original Multiline Text entity format identically.

But if you want to open the editor using the same text lines, you can use:

>MultilineTextEditor
{
}

This commnd appears to be undocumented, but syntax and most parameters can be found by executing "macro record")

The only important parameter that cannot be calculated from a simple examination of the exploded text is ">linespacing", without which it is impossible to duplicate the original Multiline Text enitiy as if using the editor in the infobox.

If you can derive  an algorithm for this, please let us know.

bd

PS: Hint to IMSI: A query parameter, or a sys() variable to allow user to find the line spacing in an existing multiine text entity would be helpful.



Lar


Evaluate sys(9), duplicate the m-text, explode, each line and each change of font/style will be a separate text entity but the new entity id's will be in the order the m-text is written so use the entity count over the starting sys(9) to select and pass the text string to string variables... something like that.


Lar

dcadRob

Thanks for the responses.

I was hoping that by now they would have developed some way of reading it directly or writing it into a text file. I will stick with Text Blocks for now.