Jump to content

need help with simple record and database


Recommended Posts

Can anyone point me in the right direction to solve this simple problem ..... I have a 230 acre park, and I want to design paved pathways throughout the park. I intend to use hardscape paths, and for each path, the area is listed in the OIP. What I want to do is set up a record/database so that all the pathways can be collected and the total area can be calculated (so I can do an estimate of const costs for the paths). I need to be able to change the pathways after I know what the total area is ... so I figure I need to set up a database to collect the hardscape areas ... but I tried to do it but I get stuck. Is there a good tutorial on this?

Link to comment
Guest Wes Gardner

If you use the Hardscape Tool, try a simple test in a new document by just drawing a simple shape then just go to Tools >> Report >> Create Reports and create a report... one of the many fields is "Main Area" which will give you what you need....

It might also be helpful if you'd post up what system you use, etc. in your sig.

Edited by Wes Gardner
Link to comment

thanks alot .. it worked as you described .. just what I needed. I'm puzzled, though .... the hardscapes don't show up in the OIP under the data tab as having a record ... but yet they still are computed in the worksheet. Why ? doesn't something have to have a record to be part of a data-base?

VW 08 Windows XP

Link to comment
Why ? doesn't something have to have a record to be part of a data-base?

All Objects are tracked via ID# and publish their coordinate & dimensional information which includes area & perimeter.

The Worksheet Container uses criteria "Type" to subscribe to the data and present it for manipulation.

Link to comment

I thought I would share this Menu Command that I found.

It is called "PIO worksheet cheat sheat"

You can add it to your workspace using the Workspace Editor.

What it does:

In your drawing, select a PIO, such as a hardscape object, door, window, etc.

Then hit the PIO Cheat Sheet command and it generates a little worksheet with all of the Parameter Fields.

This is a more direct way than going into your Plug-in Editor, finding the PIO, and searching for the Parameters there.

It is a quick way to get the formulas for building your schedule worksheets.

piocheatcheatworksheetni3.png

piocheatsheetwseditorvh2.png

piocheatsheetia5.png

Link to comment

Wierd.

I think this is something I must have downloaded a long time ago,

and forgot about. I just never added to my workspace until I found it a couple weeks ago.

Wouldn't you know it...Pat Stanford!

See copyright info.

I must have downloaded this from a public place, I just can't remember where (VectorDepot?but I am just posting the script here since I don't know how to attach the .vsm file to this board.

Maybe someone else can tell us where I got it!

Here it is:

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

{January 30, 2008}

{? 2008, Coviana, Inc - Pat Stanford pat@coviana.com}

{Licensed under the GNU Lesser General Public License}

Var H1 ,H2 :Handle;

S1,S2,S3,S4 :String;

N1,N2 :Integer;

WSH :Handle;

B1 :Boolean;

Begin

H1:=FSActLayer;

H2:=GetRecord(H1,1); {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+2,2);

SetWSPlacement(WSH,200,200,800,700);

SetWSColumnWidth(WSH,1,1,200);

SetWSColumnWidth(WSH,2,2,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');

While N2<=N1 Do

Begin {populate the worksheet with all the fields}

S2:=GetFldName(H2,N2);

S3:=Concat(Chr(39),S1,'.',S2,Chr(39));

SetWSCellFormula(WSH,N2+3,2,N2+3,2,S3);

B1:=GetLocalizedPluginParameter(S1,S2,S4);

SetWSCellFormula(WSH,N2+3,1,N2+3,1,S4);

N2:=N2+1;

end;

ShowWS(WSH,True);

SetTopVisibleWS(WSH);

end;

End;

Run(GetPIORecordFields);

Link to comment

This is new to me, gmm18, but potentially quite useful. I tried pasting different functions into a worksheet cell in order to extract a plugin parameter, but failed.

Would you give an example on how to extract a numeric value into a worksheet from one of the parameter fields generated from Pat Stanfords script?

=XXX(Hardscape.Slab Thick) for instance - what should replace the XXX?

Link to comment

If you just want the value of the field, the formula should just be ='Hardscape'.'Slab Thick'

The purpose of the "Cheat Sheet" worksheet is that the values in column B list exactly what you need to copy and paste into another worksheet to access both the regular and hidden fields in PIO records.

If either the record or field name have spaces, then you need to use single quotes around it. It was easier to just put quotes around everything as it won't hurt anything.

Pat

Link to comment
  • 1 month later...

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