Grouping of shapes post import


Author
Message
Steven Simonton
Steven Simonton
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)
Group: Forum Members
Posts: 4, Visits: 11
I have implemented code that utilizes the NDataSourceImporter class.

I have a need to group some of the individual vertex based on their relationships to one another.

My questions are:

1. Where is the most appropriate place to so this? Inside the OnVertexImported callback? Or the OnImportSuccesful callback? Or neither?
2. I am thinking that Grouping is the approach that I want to take. Is this the right thing to do?
3. Can someone provide with with some sample code?

I have attached a drawing of one of the charts that I am producing with the diagram/importer.

I will try and explain what needs to be the final product.

Given the image attached, what I need to do is group all of the blue rectangles (represent out bound optical ports) within the white box (a fiber optical splitter) which are connected by the dashed blue lines. There is also a single green box (which is the in bound optical port of the splitter) that needs to be grouped as well.

I apologize for the poor verbal description but it makes perfect sense to me as I have been looking at this for quite some time.....

Any help or guidance would be greatly appreciated......

Thanks,
Steve
Attachments
pon_network.jpg (106 views, 64.00 KB)
Reply
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 Steve,

you are confusing the layers the layered graph layout places shapes on with drawing document's layers. Let me be more clear. The layered graph layout places the shapes on layers, you can think of these layers as of rectangles that host shapes with similar hierarchical position in the graph. By the way which layout algorithm are you using with the data importer, because the sample diagram images you have attached to your first post is not a result of simply applying a lared graph layout. Do you use any of the other layouts or you just place some shapes by yourself ?

There's no problem to group all the blue shapes, but as I've mentioned before the group is going to be overlapped by other shapes and links. If that's ok with you you can simply create a group when the import is completed and place all the blue shapes in it. Then you should call the UpdateModelBounds method of the group to make it large enough to hold all the shapes you have placed in it.



Best Regards,
Nevron Support Team


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