Jump to content
Sign in to follow this  
Pat Stanford

Clear All Issue Data.

Recommended Posts

Here is a script that is should clear all Issue data from avery drawing border in a document.

Procedure Clear_All_Issue_Data;

{This screipt will clear all of the issue data from every drawing border }
{(and any other object that has the Issue Data record attached) in a drawing.}

{This version has a slight limitation in that the Issue Data table on the}
{Border will show :iNo, :iDate, :iNote, etc. for the first issue line until}
{you edit the issue data for that border.}

{It will also cause some screen flashing as it sets through each layer with }
{a border and redraws everything to get the text sizes correct.}

{Use at your own risk. No warranty expressed or implied. Do not use while }
{operating heavy machinery. May cause drowsieness.}

{? 2009, Coviana, Inc - Pat Stanford pat@coviana.com}
{Licensed unde the GNU Lesser General Public License}




Var
H1, H2, H3			:Handle;
N1, N2, N3			:Integer;


Procedure DoIt(H4:Handle);

Var
H5							:Handle;
N4, N5					:Integer;
S4	, S5						:String;
B4							:Boolean;

Begin
N4 := 1;
B4:=False;

While Not B4 do
	Begin
		H5:=GetRecord(H4,N4);
		If H5 <> Nil then
			Begin
				S4:=GetName(H5);
				If S4 = 'Issue Data' then B4:=True else N4:=N4+1;
			end
		else
			Begin
				B4:=True;
			end;
	End;

If H5 <> Nil then
	Begin
		Layer(GetLName(GetLayer(H4)));
		N5:=1;
		While N5 <=50 do
			Begin
				S5:=Num2Str(0,N5);
				SetRField(H4,S4,Concat('Note-',S5),'');
				SetRField(H4,S4,Concat('Number-',S5),'');
				SetRField(H4,S4,Concat('Date-',S5),'');
				SetRField(H4,S4,Concat('Approved-',S5),'');
				N5:=N5+1;
			End;
		ResetObject(H4);
		RedrawAll;
	end;
End;


Begin
H1:=ActLayer;
N1:=GetLayerOptions;
SetLayerOptions(1);
RedrawAll;
ForEachObject(DoIt,((R IN ['Issue Data'])));
Layer(GetLName(H1));
SetLayerOptions(N1);
End;

Run(Clear_All_Issue_Data);





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.

Sign in to follow this  

 

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...