Jump to content
tismacfan2

text in script

Recommended Posts

I am creating a plug-in where certain text should appear in an arrow, and in which I can adjust certain text elements via the info palette. Only I can't manage to get the text parts that I have to fill in one after the other via the info palette. Now everything is written under each other. someone an idea how to change my script please?

 

This is my script

 

Procedure Ventilatiepijl;

VAR

eventID,

eventMessage :

LONGINT;

pl,pb,a,b:REAL;

t1,t2,t3,t123:STRING;

ts:INTEGER;

 

h:HANDLE;  

BEGIN BEGIN h:=FSActLayer;

ts:=PSize; PushAttrs;

t1:=Pnummer; t2:=plengte;

t3:=pdebiet;

pl:=ppl;

pb:=ppb;

 

TextFont(GetFontID('Consolas'));

TextFace([]); TextSize(ts); TextFlip(0);

TextRotate(0); TextSpace(0); TextJust(1);

TextVerticalAlign(5);

TextOrigin(0,0);

t123:=Concat('Invisivent Air Basic 62m3/u.lm,',t1,'=',Chr(13),'=',t2,Chr(13),'',t3,Chr(13));

BeginText;  t123  EndText;

begin; Poly (0,0, pl,0, pl,-8, pl+20,12, pl,32, pl,pb, 0,pb );

end;

PopAttrs; END;

End;

Run (Ventilatiepijl);

Thanks for the help

Share this post


Link to post

The CHR(13) are Carriage Returns (CR) and move the text down to the next line. If you want it all on one line, take out the CRs.

Share this post


Link to post

I think the problem is with TextSpace(0). This sets the line spacing to 0, so all the lines will lay on top of each other. 

  • Like 1

Share this post


Link to post

Thank you Josh. I read the question backwards, thinking that tismacfan2 was getting multiple lines of text when only one was desired, rather than the intended meaning of the multiple lines of text are overwriting ("on top of") each other.

Share this post


Link to post

Hallo Pat

 

That was indeed my problem and by removing the cr I  get what I wanted to achieve. Learned something new again. I can also use Jbenghiat's tip in the future. Thanks for the quick reply.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...