.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to create linked objects (for network diagramm)?

22 REPLIES 22
Reply
Message 1 of 23
pva75
1550 Views, 22 Replies

How to create linked objects (for network diagramm)?

Hello!

 

Can you help me to find way to create linked objects in AutoCad from C#?

 

I mean - for example, circle and some lines lined to this circle:

 

- If I move line it should be possible to move only one end point of line - second endpoint should be linked to the circle and not moved.

- If I move circle it should be move all endpoints of all lines linked to this circle.

 

In general I want to create network diagramm ("graph" in mathematical terms) from C# code.

 

Is it possible? May be anybody has code exapmle?

 

Thanks again,

Pavel.

Tags (2)
22 REPLIES 22
Message 21 of 23
pva75
in reply to: Selevkos

Hi Selevkos

 

Please check my answer before - I linked objects in ExtendedDictionary and allpy new position to all lined objects during move events.

 

Don't forget to handle copy/paste/delete for your objects it you want to store linked object list for copies objects for example.

 

Editor is easy - I have 2 promt dialogs - choose first object/point and choose linked object. And then I store this new link - I add new key/value in ExtendedDictionary as handle=linked_handle1, linked_handle2,... So I can easy parse it during any event.

 

Pavel.

Message 22 of 23
Selevkos
in reply to: pva75

Thanks for your fast reply.

 

I will try to do as you suggest.

 

But, also I  want to create a network topology in which users will search for shortest or longest path between the  nodes. 

 

Do you have any suggestion for this?

 

 

 

 

Message 23 of 23
pva75
in reply to: Selevkos

Your task can be separated to 2 items: find path and show it.

 

If about second you can do it with OverruledDraw. Add special flag to ExtendedDictionary and it this flag is 1 - draw special line else standard. It allows you to draw path.

 

Second item has many ways. For example you can use additional library (for example C# libraries as GraphSharp or anythink else) or you can use graph theory for it.

 

Pavel.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost