Jump to content

Exporting 3d loci Vectorworks data points to a text file


Mbuck

Recommended Posts

There is a way, obviously, to import a text file containing 3d survey data points into Vectworks and this 3d data is then converted automatically to stake objects, which is great. However, if 3d loci where created in Vectorworks is there a way to export 3d loci/data to a text file so that it can be then re-imported to automatically create the stake objects. Obviously placing stake objects manually is a laborious and time-consuming task and should not be necessary. Is there a simple way to do this?

Link to comment

No, that we've been able to determine there is no way to export a data file in the new program. The only way we've been able to accomplish this is to do a "select all" and open a new drawing in VW8, set the units and paste in place. They likely won't land on your drawing, mine never do but none the less now you have your points in a place where they can be exported as a point file using the export vectorscript. Then you should be able to reimport them into Landmark. This is absolutely unacceptable, perhaps Vectorworks would be willing to provide an extra version8 disk for new customers. Anyway, here is a copy of the vectorscript. Be warned, we've only been able to get this to work in the old version.

{The script begins below, this is a comment line} procedure coord; var x,y,z,ox,oy:real; i:integer; obj:handle; ofile:string; begin getorigin(ox,oy); obj:=factlayer; PutFile('Output file', ' ', ofile); write('X'); tab(1); write('Y'); tab(1); writeln('Z'); while obj<>NIL do begin i:=GetType(obj); if (i=9) then begin GetLocus3D(obj,x,y,z); x:=x-ox; y:=y-oy; write(x); tab(1); write(y); tab(1); writeln(z); end; obj:=nextobj(obj); end; close(ofile); end; run(coord); {This comment line ends the script}

Good luckValerie

Link to comment
  • Vectorworks, Inc Employee

Here's a simple script that converts 3D loci to stakes in place. Even easier than exporting/importing. Cut and paste this into your document as a document script, or just save this script as a text file, and use Import VectorScript to run it:

{==========BEGIN VECTORSCRIPT=========}PROCEDURE ConvertLoci2Stakes;VAR DeleteLoci:BOOLEAN; LName:STRING;

PROCEDURE DrawStakeAt3dLocus(h:HANDLE);VAR x,y,z:REAL; Hstake:HANDLE; BEGIN Get3DCntr(h,x,y,z); Hstake:= createcustomobject('Stake Object',x,y,0.0); Move3DObj(Hstake,0.0,0.0,z); END;

BEGINLName := GetLName(actlayer);DeleteLoci :=YNDialog('Do you wish to delete the source loci?');ForEachObject(DrawStakeAt3dLocus,((L = LName) AND (t = Locus3D)));IF DeleteLoci THEN ForEachObject(DelObject,((L = LName) AND (t = Locus3D)));END;RUN(ConvertLoci2Stakes);

{===========END VECTORSCRIPT==========}

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