Jump to content
Developer Wiki and Function Reference Links ×

Accessing stake object data


IanH

Recommended Posts

My first bit of Vectorscript so please be patient. But I do have 25 years commercial Pascal behind me so I hope I will pick it up quickly :)

Basically, I want to manipulate stake object in Z direction. Two questions.

1. I can get Z data from a stake object handle using Get3dCntr but how do I change Z value? Do I have to move the object and if so, will this work in all orientations or just when I am in plan view.

2. I wish to get the style of the stake object. I have an object handle (there are multiple stake objects selected at this point and I am traversing them) and I know its probably very simple, but how do I access the style parameter when all I have is an handle to the stake object.

SelectObj((INSYMBOL & INVIEWPORT & (PON='Stake Object') & (SEL=TRUE)));

datumObj := FSActLayer;

{ ... Various error checking omitted for clarity }

datumLayer := GetLayer( datumObj );

datumClass := GetClass( datumObj );

Get3dCntr( datumObj, dx, dy, dz );

{ ??? datumStyle := id#3, 'style', type popup ???; }

{ ??? Set3dCntr( datumObj, dx, dy, dz + offset ); }

Thanks

Link to comment

I'm pleased with my first attempt. Its certainly given me the urge to try more.

Is it general etiquette for people to post their initial attempts for critique?

My script normalises stake objects around a selected datum. So if you take a survey and have an initial datum of 0 then decide that you want to shift the datum to say 10M or 50M, then the script will move/normalise the other similar stake objects. It also works vice versa, if you have a survey with datum at a particular value, you could if you wish shift the datum back to 0.

This is really aimed at garden designers who take their own surveys rather than importing from professional surveys where spot heights are recorded in a different way.

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