Jump to content
Developer Wiki and Function Reference Links ×

Set POI Field From Object Z value (REAL)


M5d

Recommended Posts

Hi

I'm trying to write my first script & want to write a script that will take a -Z value from a Column PIO and write it to the 'OA Height' Field as a Positive Z Value. It's for sloping sites where the columns will be exposed on the underside of a house. I set the layer that the columns are on to the underside of the bearers and then use the send to surface command which leaves the Column sitting on the ground with their heights all over the place.

What's needed is something like the SetRField Function that can use the REAL data type.

I have a skeleton of the script which doesn't work but it should show what I'm trying to achieve:

Thanks

PROCEDURE Level_Columns;

CONST

PObj = 86;

VAR

h : HANDLE;

Valx, Valy, Valz, Colz : REAL;

BEGIN

h := FSActLayer;

WHILE h <> NIL DO

BEGIN

IF GetType(h) = PObj THEN

BEGIN

Move3DObj(h,0,0,-100);

GetSymLoc3d(h, Valx, Valy, Valz);

Colz := Valz*(-1);

SetRField(h, 'Column', 'OA Height', Colz);

ResetObject(h);

END;

BEGIN

SetDSelect(h);

h := NextSObj(h)

END;

END;

END;

RUN (Level_Columns);

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