Jump to content
Developer Wiki and Function Reference Links ×

Number nodes along polyline


Dexie

Recommended Posts

I originally posted this in the Wish List but having watched the first Marionette tutorial this seems like an ideal project for marionette.

What I would like to achieve is outlined below.

 

Have you ever just finished a housing layout with say 300 houses plotted and numbered from Plot 1 to Plot 300 and the client comes back with can we turn Plot 6 into a pair of semi-detached houses.

That means renumbering from Plot 6 onward. Even with the number stamp this is tedious.

I would really like to select a polyline type tool that inserts a number at every click (with a prefix & trailer) so that if I insert another point (eg. between Plot 6 & Plot 7) it will shift all subsequent numbers on one digit.

Even better if it could be used to number on plot parking spaces (as different house have more or less spaces) and by holding down a modifier key you could insert 3 or 4 instances of the same number.

 

 

But where to start? Any tips would be appreciated.

Link to comment
  • Marionette Maven

Your first task of renumbering a housing layout could actually be quite simple. I'm attaching a simple script to show how you can number the vertices of polylines.

 

Currently, this network will select a poly by name and create text objects referring to the number of the vertex for each vertex on the poly. This network could easily be updated to use control geometry and become a Marionette Object which can be reshaped just like a regular polyline so that you may add, remove, or change the location of the vertices on the poly while automatically updating the numbering. It's easy to update this script to suit your needs with formatting, etc.

 

Your second task would be slightly more complicated for Marionette. I'm sure that with some thinking a process may be possible, but Marionette works differently than using a regular tool would.

NumberPolyVertices_MFarrell_2016.vwx

NumberPolyVertices_MFarrell_2017.vwx

  • Like 1
Link to comment
  • Marionette Maven

Of course!

 

Right click on the object and select 'Edit Script'

With the Marionette tool active, navigate to Defaults > Marionette > Marionette Default Library > Input and select the 'String' node

(At this point, sometimes the script editing window will close. If this happens, just right click and 'Edit Script' again.)

MarionetteStringLocation.PNG

Place the 'String' node in the same place as the below image and wire it to the prefix port of the 'Text' node, you can change the prefix in the OIP with the 'String' node selected. If you want to be able to access the Prefix from the object itself outside of editing, write something in the Name field on the OIP with the 'String' node selected.

 

polynumbering.PNG

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