Message 1 of 5
Issue with the addSelectionFilter Method of SelectionCommandInput in C++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
while trying out Selection Events API Sample, I came across a problem with the addSelectionInput method of SelectionCommandInput. In the python version of the sample in MyCommandCreatedHandler class:
selectInput = inputs.addSelectionInput('SelectionEventsSample', 'Edges', 'Please select edges')
selectInput.addSelectionFilter(adsk.core.SelectionCommandInput.Edges)
selectInput.setSelectionLimits(1)
Selection Filters, in this case adsk.core.SelectionCommandInput.Edges are used as argument of the addSelectionFilter().
This works fine, however while working with the c++ sample, I found out that the equivalent approach:
bool result = selectInput->addSelectionFilter(adsk::core::SelectionCommandInput::Edges);
returns false, hence no filter was set. Fortunately I can just use string instead and so avoid having to deal with this issue but I was curious if this is a bug or I'm missing something.
Thanks