Cannot scope Named selections for a Path Construction Geometry

Kev
Kev Member Posts: 41
10 Comments First Anniversary 5 Likes Name Dropper
**
edited June 2023 in Structures

Hi guys.

An easy one for you. I am trying to scope a named selection to a path. I am using :

pth.Location = ExtAPI.DataModel.GetObjectById(WeaverEdge_NS.ObjectId)

This changes the Scoping method to Namedselection but does not populate the Named selection field.

and the pth.location remains [] when I audit during debug.

I manually created the path and inspected the properties, Next I tried populating all the properties similarly to the one I created but no success. I feel like there is more involved when named selections are involved.

Any help is appreciated.

Cheers

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 457
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭

    Hi @Kev, you need to create a selection manager object with geometric entities and then scope that to path.

    tempSel = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities)
    tempSel.Ids = WeaverEdge_NS.Ids
    path.PathType = PathScopingType.Edge
    path.Location = tempSel
    


  • Kev
    Kev Member Posts: 41
    10 Comments First Anniversary 5 Likes Name Dropper
    **

    Thanks @Ayush Kumar :) The method you are proposing uses geometry selection as the scoping method. I wanted to have the scoping method as named selection. I managed to find the issue. my code was picking up the wrong named selection object due to a typo and the wrong named selection item had the wrong object type in it (body as oppose to edge).

    But all good now :)

    Thanks for all the great work