Skip to content

Getting a reference to the group created by SymbolToGroup #6

@PadraigK

Description

@PadraigK

SymbolToGroup() removes the symbol and adds a new object in its place, but the new object isn't reachable through vs.LNewObj() — that returns 0 here.

As a workaround, the remarks in the docs suggest that we get the vs.PrevObj() and then get the vs.NextObj() after running SymbolToGroup, which seems to be the created object. However, that approach fails if the symbol object we're working with is the 0th object, so there's no previous one — vs.PrevObj() returns 0 in that case.

In that case, getting vs.FSActLayer() appears to work, since VW automatically selects newly created objects.

Ideally, it would be great if the SymbolToGroup function returned a handle to the created object. Or if LNewObj() could be made to work in this case.

Could we add a note to the SymbolToGroup with the FSActLayer workaround in the interim?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions