Use TextGen in Generator


Does anybody know can I get textgen of certain concept in Generator?

I want to get it in StringBuilder in generator root template and later manipulate with that string.

Comment actions Permalink

It's not an intended use of TextGen, therefore there's no legitimate mechanism to call textgen from a generator. If you could tell us more about your scenario, perhaps we could come up with an alternative.

If you utterly need to use TextGen, you could opt to use low-level Java APIs to invoke TextGen from within you code.

Comment actions Permalink

As Tikhomirov Artem said, I use the following code,

RegularTextUnit rtu = new RegularTextUnit(mySnode, "dummy");
byte[] bytes = rtu.getBytes();
string outCome = new String(bytes);


Please sign in to leave a comment.