Grasshopper

algorithmic modeling for Rhino

Its probably super simple but I can't figure it out.

I need some help.

I have a piece of Vb script (see below)  that adds strings to a Dictionary.

I would like to have a counterpart one that removes the very same strings.

Dim dPack As Object = Pack.Duplicate()

For Each setting As String In Settings
Dim thisPointName As String = setting.Split(",")(1)
Dim thisPoint As point3d = dPack.Geometries.Item(setting.Split("\")(1))

dPack.Parameters.Add(thisPointName & "\X", thisPoint.X)
dPack.Parameters.Add(thisPointName & "\Y", thisPoint.Y)
dPack.Parameters.Add(thisPointName & "\Z", thisPoint.Z)
Next

PackOut = dPack

Thanks in advance for your help.

Views: 394

Replies to This Discussion

So where's the dictionary?

David,

I have inherited this code from an old colleague. I was under the impression that this code added the points coordinates to a dictionary which then gets exported later on.

Maybe I was mistaken.

If this is not the case, then its just a matter of deleting the parameter string? Am I correct?

I am sorry my vb skills are rather limited.

It may, but I can't tell. I do not know what type the Pack variable is and everything sort of hinges on that.

To elaborate, you need to post more code so I can see what types you're actually using.

David,

i did a bit of digging at the root of the code. 

It appears to be a custom Class....

I figured out how to make it work.

Thanks a lot for your prompt response, and (I am sure you heard this a million times) keep up with the great work GH is a game changer.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service