Grasshopper

algorithmic modeling for Rhino

Hi,

What I mean is this method

     Public Sub RenumberPaths (mask As String)

 

What is the proper way to write a mask? I followed the examples in the sdk but it doesn't work.

 

I have a path like {A;B;C} and want to change it to {A;B}, just like what I can do using path mapper.

Thanks!

-Jerome

Views: 446

Replies to This Discussion

Hi Jerome,

 

RenumberPaths can only be used to convert an entire DataTree into something like this:

 

{0}

{1}

{2}

{3}

 

Or maybe:

 

{0;0}

{0;1}

{0;2}

{0;3}

 

You cannot use that method to modify the paths based on their current value. What you're looking for is a lexical replacement, which is a bit more involved. Basically you need to create two GH_Lexer instances, one describing the source and one the target. See attached.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Attachments:

It works! Thank you David! 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service