Jump to content
  • 0
Hans-Olav

3d poly to 3d loci script?

Question

I have a file with 99 3d polys (circles) with right z height and are planning to do a DTM.

Anyone who can make a script to replace the 3d polys with a 3d loci in the centre of each?

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0

You could use the Replace with Symbol command. Replace it with a symbol that contains just a 3D locus. If you set it to convert to group on insertion then it will give you 99 loci which you just need to select and ungroup. Just tried it and it works fine

test done.vwx

  • Like 2

Share this post


Link to post
  • 0

In addition to Mark's suggestion - here's a Python script that will find all of the 3D polys on the active layer and replace their center point with a 3D locus.

 

My limited testing leads me to believe it works fine 😛 

 

lName = vs.GetLName(vs.ActLayer())
def createLoci(h):
	(p, zValue) = vs.Get3DCntr(h)
	vs.Locus3D(p, zValue)
	vs.DelObject(h)
vs.ForEachObject(createLoci, "((L='"+lName+"') & (T=POLY3D))")

 

  • Love 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×