Jump to content

Callouts - Pull data into a report


Recommended Posts

Try using ='Callout'.'Text'

 

@Pat Stanford 's great GetPIORecordFields script is really useful for finding those records that don't show in the create report dialogue.

 

Procedure GetPIORecordFields;
{Creates a worksheet showing the display and field names}
{for the first selected object on the active layer}
{Useful for determining the record.field names required}
{for use in a worksheet.}

{Updated May 2017}
{Fixed bug with table not having enought cells in VW2017}

{Corrected December 11, 2008}
{Now shows correct field types}

{Updated October 29, 2008}
{Now includes the field type for each field}

{January 30, 2008}
{© 2008, Coviana, Inc - Pat Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{Modified 8/19/08  Pat Stanford}
{Now puts quotes around both record and field instead of both combined}

{Modified 8/19/08 Pat Stanford}
{Now displays non-localized field names if no localization}

Var	H1	,H2					:Handle;
		S1,S2,S3,S4,S5,S6		:String;
		N1,N2, N3				:Integer;
		WSH						:Handle;
		B1							:Boolean;

Begin
	H1:=FSActLayer;
	H2:=GetRecord(H1,NumRecords(H1));  {get a handle to the first record}
	If H2 <> Nil then
		Begin								{If a record exists then create worksheet}
			S1:=GetName(H2);
			N1:=NumFields(H2);
			N2:=1;
			S3:='';
			WSH:=CreateWS(Concat(S1,' ',Date(2,1)),N1+3,3);
			SetWSPlacement(WSH,200,200,800,850);

			SetWSColumnWidth(WSH,1,1,200);
			SetWSColumnWidth(WSH,2,2,200);
			SetWSCOlumnWidth(WSH,3,3,200);
			SetWSCellFormula(WSH,1,1,1,1,Concat('Parameter Fields for PIO: ',S1));
			SetWSCellFormula(WSH,3,1,3,1,'Display Name');
			SetWSCellFormula(WSH,3,2,3,2,'Cell Formula');
			SetWSCellFormula(WSH,3,2,3,2,'Field Type');

			While N2<=N1 Do
				Begin								{populate the worksheet with all the fields}
					S2:=GetFldName(H2,N2);
					S3:=Concat(Chr(39),S1,CHR(39),'.',CHR(39),S2,Chr(39));
					SetWSCellFormula(WSH,N2+3,2,N2+3,2,S3);

					B1:=GetLocalizedPluginParameter(S1,S2,S4);
					if S4='' then S5:=S2 else S5:=S4;
					SetWSCellFormula(WSH,N2+3,1,N2+3,1,S5);

					N3:=GetFldType(H2,N2);
					
					Case N3 of
						1:	S6:='Integer';
						2: S6:='Boolean';
						3: S6:='Real';
						4:	S6:='Text';


						7: S6:='Real - Coordinate Displacement';
						8: S6:='Text - Popup Menu Item';
						9: S6:='Text - Radio Button';
						10: S6:='Real - Coodinate X Location';
						11: S6:='Real - Coordinate Y Location';


						14: S6:='Static Text';

						Otherwise S6:='Some Numeric Format';
					End;
		
					SetWSCellFormula(WSH,N2+3,3,N2+3,3,S6);

					N2:=N2+1;
				end;

			ShowWS(WSH,True);
			SetTopVisibleWS(WSH);
			
		end;
End;

Run(GetPIORecordFields);

 

  • Like 3
Link to comment

I would say it's not an option because callout text formatting is slightly different to worksheet text formatting. E.g. worksheet cells don't support linebreaks whereas callout text does. i.e. be careful editing callout text in a worksheet...

  • Like 2
Link to comment

I'm curious as to why you want to create a callout worksheet? As it happens I'm just working up a system to use worksheets to keep all my keynote callouts consistent right across a file. I'm working on a project where I'm turning all my standard notes into keynotes and each sheet will have it's own keynote legend.

 

A keynote can only be allocated to one keynote legend however if I duplicate a note to put on another sheet (with a different Legend) I can use a "Keynote Editor" worksheet to keep the multiple copies consistent.

 

I really like it how with this system every sheet has it's own legend of just the keynotes on that sheet - and I'm sure it will make the drawings much more user friendly for the builder. I'll see how I go with it...

Link to comment

I’d be interested to hear how you get on. I really like the idea of callouts / keynotes coming from a central database. I’ve tried using the database within vectorworks but it didn’t work out for me. Hadn’t thought of using a worksheet. May give that a try. 

 

As for my initial post - what I am doing is rather unconventional and pretty much a one off. 

 

I have a 20 page PDF plan which I have no control of and gets updated weekly.  Rather long winded I know, but I import it to a design layer, then have created a sheet layer for each page. In the annotation layer I add callouts with a unique identifier for each power location - which relates to a large google spreadsheet. 

 

As each label is unique, I wanted a way if creating a list of all the callouts in the file so I can check they are all present. 

 

All a bit long winded I know but the best way I could think of doing it 

 

Thanks again for your help

 

Link to comment
  • 1 year later...
On 8/29/2019 at 6:20 PM, Andrew Davies said:

I’d be interested to hear how you get on. I really like the idea of callouts / keynotes coming from a central database. I’ve tried using the database within vectorworks but it didn’t work out for me. Hadn’t thought of using a worksheet. May give that a try. 

Update on this. With the new data manager it is now possible to update notes in a project file from the data base. If you change a callout which is linked to the database vw will ask you if you want to update the database with the changes but also all the other callouts linked to the same note.'

 

I'm still playing with it but it worked well on the first project I tried using the data base manager. One question I have is if multiple files have notes linked to the same database will notes in the other files also be updated if the notes database is updated. That could be problematic as you might not want those notes changed in different files.

 

I'm still using worksheets to globally edit callouts however. Particularly keynote callouts. I use a lot of keynotes on different legends and the worksheet really help check if the keynotes are going to the correct legend.

 

Link to comment

This was my silly mistake in the test file, and I got that working in the file I uploaded, but, it did not work in my imported-from-older-versions worksheets that live in template files.  Something looks to be broken there, with is unfortunate for me.  I made a new worksheet that queries the callout text, and that worked, but older/imported worksheets are broken.  Imported from VW2012 😞

Link to comment

If

1 hour ago, toobiloo said:

I made a new worksheet that queries the callout text, and that worked, but older/imported worksheets are broken.

I think sometimes if a record name or field changes then older files opened in newer version get a "Legacy" formula  inserted. I think it is usually just a matter of updating the record.field names in the worksheet database row.

 

The script I posted in this thread back in August 2019 still works and if you run it on an object it will give you all the available record fields/parameters for an object that can then be used in worksheet formulas. perhaps try running that script then editing the worksheets that don't work with the formulas listed by the script.

 

E.g. Running the script on a callout gives:

 

image.png.916ec36360567ec456aeaf27fc7d1198.png

Edited by Boh
  • Like 3
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...