Retrieving a points name and translate that value into a vector

I am new to VBScript and am attempting to make my first GH component and am in need of some direction. The initial goal of the script is to retrieve the name of a given geometry, in this case a point and then move that point to the elevation specified by the name. I am attempting to retrive the name from here:

Below is an image of the gh file I’m using as reference:

What I’ve written so far:

Private Sub RunScript(ByVal Point As Point3d, ByRef Output As Object) 

    Dim strName As String
    Dim go As New rhino.DocObjects.ObjectAttributes

    go = Point
    StrName = go.Name
    Output = StrName
End Sub

It is clear that Rhino.Geometry.Point3D cannot be converted to Rhino.DocObjects.ObjectAttributes and I am unsure how to make that conversion happen or if I am even going in the right direction.

Thanks for the help,

just FYI that I edited your post to have the code enclosed in tripple backticks for proper rendering

Hi @brycefai,

A Point3d struct just contains x, y, and z coordinate values. This, it cannot be cast as an ObjectAttributes object.

I cannot tell from your image where you are getting the point object (PointObject) from. We might need more information on what you are trying to do, and perhaps even a sample .gh file.

– Dale

Hi @dale, thanks for the reply.

The script attempts to take any geometry, in this case points that are already drawn in model space and moves them in the Z direction by the number that is written in the optional text name. I basically want to know how to recreate the object attributes component that is in the gh file below.

Bryce (10.3 KB)