Jump to content

copying text (numbers) with increments


Recommended Posts

Some advice please. In Vwx architect (2014 or 2017) - can one copy numerical text in  a way that the number increases in value each time you copy it? Say, for example you are numbering grid lines or stair risers or windows.... surely one does not have to copy the text and then go back to edit each one.... so I mean, how does one copy "1", so that each time you copy it, it becomes 2,3,4..... etc.

 

Microstation had this function and it saves a load of time! Thanks All!
!

Link to comment

I needed this function in the past and made a little script for it. It works as follows:

Double clicking the symbol opens this window:

59d714a629e0d_2017-10-0607_26_38-VectorworksArchitect2017-1200_FEDE-001-001_vwx.png.1892a3bb4b5cf98933dcc80ddbe46ca0.png

 

You can change the prefix to your liking. The number ("Nr") field is the start value of the counter. The "materiaal" field adds a material or some other subtext.

So when you select the tool with these preferences and just start clicking, you'll get the following result: 

59d714a670e05_2017-10-0607_26_59-VectorworksArchitect2017-1200_FEDE-001-001_vwx.png.45109677965bd48f4a4ab7d4e32c1dfa.png

The script places normal text boxes which can be edited later on.

You can also press delete at this stage to delete the placed labels and when you continue clicking, the counter continues. (for when you quickly need to start at a higher number)

59d714a6be11d_2017-10-0607_27_31-VectorworksArchitect2017-1200_FEDE-001-001_vwx.png.170bd0d3c88f3f00c008c6de0b7510a8.png

Or you can just change the startnumber in the settingsmenu:

59d714a75ed7c_2017-10-0607_28_22-VectorworksArchitect2017-1200_FEDE-001-001_vwx.png.9a7f73c16debb54facec79ef347b1e93.png

And get this result:

59d714a7a111a_2017-10-0607_28_31-VectorworksArchitect2017-1200_FEDE-001-001_vwx.png.8f4635793333592cb26d7717c9738691.png

 

 

This is the code:

VAR
x1,y1: REAL;
Prefix: STRING;
Nr: STRING;
Material: STRING;
Text: STRING;
h: HANDLE;
cmdHd: HANDLE;
Length: INTEGER;
PosEnter: INTEGER;
BEGIN
	Prefix:= PPrefix;
	Nr:= PNr;
	Material:= PMateriaal;
	
	WHILE (true) DO BEGIN
		GetPt(x1,y1);
		TextOrigin(x1+10, y1-10);
		Text:= Concat(Prefix, Nr, Chr(13), Material);	
	
		Length := Len(Text);
		PosEnter := Pos(Chr(13), Text);
	
		CreateText(Text);
		h:= LNewObj;	
		SetTextFont(h, 0, Length, GetFontID('Arial'));
		SetTextSize(h, 0, PosEnter, 10);
		SetTextStyle(h, 0, PosEnter, 1);		
		SetTextSize(h, PosEnter, Length-PosEnter, 7);
		SetZoom(GetZoom);
		Nr:= Num2Str(0, Str2Num(Nr)+1);		
	END;		
END;
Run(LabelVS);

 

I've added the tool to the attachment. You can just drop it in your plug-ins folder and add it with the Workspace editor. (I think it will be in the Fplus folder)

 

 59d71c542cd4f_2017-10-0608_01_42-WorkspaceEditor.png.e858fa5f3d29ad158dcb2348013082e2.png

 

Maybe Vectorworks will create a Pro tool, but I hope this helps in the meantime. :)

 

 

Label VS.vst

KastLabel.png

Edited by Bertf
Link to comment

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.

×
×
  • Create New...