Joshua Hale Posted February 8, 2009 Share Posted February 8, 2009 I have created a shapefile of 2d contours in ArcGIS 3D analyst from a National Elevation Data ArcGrid file and exported it to VW 2009. When I select the contours and click on the data tab I notice that there is number for contour elevation. Does anyone know of a vectorscript that will convert the 2d line or polygon to a 3D polygon with z value corresponding to the contour elevation embedded in the imported shapefile? I could do it manually, but there are too many contours. Quote Link to comment
panta rhei Posted February 8, 2009 Share Posted February 8, 2009 I've been planning to write a script for this, but it's not a top priority. Maybe I can do something, but won't promise anything. Quote Link to comment
Dexie Posted February 10, 2009 Share Posted February 10, 2009 I just spotted this on VECTORLAB which may do the job. "I wrote this procedure to process a layer of 2D polygons imported from a shapefile (.shp) . Each polygon had the polygon's elevation in an attached record. This procedure reads the elevation value to create a 3D polygon at the z height. This procedure could be made more useful; The procedure could ask for the record and field instead of constants. Also, the 3D polys are placed onto a new layer, but the 2D polys could be separated from the 3D polys more elegantly. By Frank Brault " http://www.vectorlab.info/index.php?title=3DPolys_from_2DPolys_with_elev_in_record Quote Link to comment
neworld Posted November 3, 2014 Share Posted November 3, 2014 Hi This is just what I'm looking for but I don't know how to apply it. I loaded the script as a tool but can't get to run it to convert my shapefiles. Bruce Quote Link to comment
neworld Posted November 4, 2014 Share Posted November 4, 2014 Managed to create the tool and run it - somehow! - but still trying, seemed there were no z values noted although they are there. All came through as zeros but it did make it 3D but flat. Quote Link to comment
Miguel Barrera Posted November 4, 2014 Share Posted November 4, 2014 It seems that the connection to the record is broken. The code assumes that the Z value is in a record named "1' contour" and field "CONTOUR". If you can post a sample file, I can update the code to make it work better. Quote Link to comment
Jonathan Pickup Posted November 5, 2014 Share Posted November 5, 2014 I think there might be a better way, and that is to use the Modify by Record command. This command allows you to do several things, like moving 3D plus, extruding objects, colouring objects, and so on based on records attached to the objects. Quote Link to comment
Vectorworks, Inc Employee MikeVW Posted December 1, 2014 Vectorworks, Inc Employee Share Posted December 1, 2014 It seems that the connection to the record is broken. The code assumes that the Z value is in a record named "1' contour" and field "CONTOUR". If you can post a sample file, I can update the code to make it work better. You're correct. There are two lines in the script that need to be updated: kRecordName = '1''contour'; kFieldName = 'CONTOUR'; For example, if in your file the record is named record1 and the record field with the elevation data is named, ELEVATION then the lines should look like this: kRecordName = 'record1'; kFieldName = 'ELEVATION'; Also, as Jonathan mentioned if you have Vectorworks 2014 or newer, you can use the Modify by Record command to perform this action. Using the Elevate 2D Polys option, you can convert the polygons to 3D polygons and choose the record and field used to set the elevation. You can also apply a multiplier to the field if you need to adjust for unit values. Quote Link to comment
Recommended Posts
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.