Selecting All "Parent" Shapes


Author
Message
Eric Sweet
Eric Sweet
Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)
Group: Forum Members
Posts: 14, Visits: 1
Hi,

Thanks for the offer, but in the end I worked it out. The problem was just that I was using an MDI form, so I had to change the way I interacted with the document and view.

Thanks again,
Eric
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Ok, please, send you sample project to our support email support@nevron.com, and we'll be able to assist you better.



Best Regards,
Nevron Support Team


Eric Sweet
Eric Sweet
Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)
Group: Forum Members
Posts: 14, Visits: 1
They are. I've used your sample code to add a button to the interface, so I'm calling the sub as the handler for the button click.


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Eric,

are the shapes already added to the document when you call your method ?



Best Regards,
Nevron Support Team


Eric Sweet
Eric Sweet
Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)
Group: Forum Members
Posts: 14, Visits: 1
Hi,

I'm working on enabling users to select all shapes that have child shapes, in an organization chart. So basically, all the manager shapes. I need to be able to iterate through the shapes and select only the parents.

I tried the code below but for some reason the doc.ActiveLayer.Children(NFilters.Shape2D) never returns any shapes. I use similar code (from your example app) to add expand/collapse decorators and it works fine. That code is not in a sub being called from a button however, it's in the load event. Would that matter?

Public Sub SelectSumTasks(ByVal doc As NDrawingDocument, ByVal view As NDrawingView)
Dim selection As NSelection = View.Selection
' select all summary task shapes so user can edit as a group
For Each shape As NShape In doc.ActiveLayer.Children(NFilters.Shape2D)
If shape.GetOutgoingShapes().Count = 0 Then
Continue For
End If

' create the decorators collection
'shape.CreateShapeElements(ShapeElementsMask.Decorators)
selection.MultiSelect(shape)

Next shape
End Sub

Thanks for any help,
Eric
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search