Page Index Toggle Pages: 1 2 3 [4] 5 6 ... 21 Send TopicPrint
Locked Topic Link between two nodes (Read 175936 times)
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #45 - May 30th, 2014 at 4:17am
 
The pdf generated by you is correct, my PDF version is 10.1.10

I am using following code to draw links.

sStartNodeID = htIDWithStatementNumber[alIFstartNode[iCounter].ToString()].ToString();
                sEndNodeID = htIDWithStatementNumber[alIFEndNode[iCounter].ToString()].ToString();
                ShapeNode SourceNode = DiagramView1.Diagram.FindNodeById(sStartNodeID) as ShapeNode;
                ShapeNode DestNode = DiagramView1.Diagram.FindNodeById(sEndNodeID) as ShapeNode;
                DiagramLink d1 = factory.CreateDiagramLink(SourceNode, DestNode);
                d1.Text = "NO";
                d1.HeadShape = ArrowHeads.Triangle;
                d1.HeadBrush = new MindFusion.Drawing.SolidBrush(System.Drawing.Color.Black);
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #46 - May 30th, 2014 at 7:04am
 
Please attach your PDF exported from same diagram for our developer to investigate the differences. What OS, IIS, .NET CLR and NetDiagram versions are you using? Also are you doing any additional processing on the exported file, like appending pages using a third-party PDF library?
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #47 - May 30th, 2014 at 9:42am
 
I have attached PDF file,
OS=Windows7
IIS=7.5.7600.16385
.NET CLR=2012
Diagram version = 5.0.5

No I am not doing any processing on the exported file.
  

Test.zip (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #48 - May 30th, 2014 at 10:39am
 
What does this code show in the Visual Studio console if you call it just before exporting the diagram?

Code
Select All
var measureBmp = new Bitmap(32, 32);
var measureGraphics = Graphics.FromImage(measureBmp);
measureGraphics.PageUnit = GraphicsUnit.Millimeter;
var size = measureGraphics.MeasureString(
	"Yes :Next Iteration", diagram.Font);
Debug.WriteLine(size); 

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #49 - May 30th, 2014 at 11:23am
 
Nevermind, we managed to reproduce that. Call this to reset some cached text layout information of links before exporting and the texts should look ok:

Code
Select All
foreach (var link in diagram.Links)
{
	link.TextStyle = LinkTextStyle.Follow;
	link.TextStyle = LinkTextStyle.Center;
}
PdfExporter ...  



We'll release a fix next week.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #50 - May 30th, 2014 at 11:50am
 
It will display this : Width=29.01918, Height=4.34771
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #51 - Jun 2nd, 2014 at 3:06pm
 
The version here will export link texts at correct locations without having to reset their layout:
https://mindfusion.eu/_temp/netdiag_labelexport.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #52 - Jun 6th, 2014 at 8:44am
 
I have generated XML, Not able to load using object of diagram.

Code :
DiagramView1.LoadFromXml(Server.MapPath(@"~\PDF\") + "Vidp4x-processCustomerReturn.xml");
PFA
and let me know Issue.
  

Vidp4x-processCustomerReturn.txt (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #53 - Jun 6th, 2014 at 9:34am
 
If you are generating it manually via the XML API, you must also add <resources><brushes .../>... section to the file in order to load values such as <HeadBrush Id="31" />. Better create it through a Diagram instance and call its SaveToXml method to make sure there's nothing missing.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #54 - Jun 6th, 2014 at 9:39am
 
If I dont know ID of breshes and all in that case what i can do?

can I keep blank tags, Is it works?

  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #55 - Jun 6th, 2014 at 9:43am
 
I have following data, is it enough?

Node ID, shape, color.
for Link -- source ID and target ID.

just I want to draw diagram using XML.

Please send appropriate format of XML for above data.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #56 - Jun 6th, 2014 at 9:49am
 
The ID attribute in a Node/Brush element must have a corresponding Resources/Brushes/Brush definition with same Index attribute, e.g.:

Code
Select All
<Brushes>
      <Brush Index="31" Type="Solid">
        <Color>#FF7CFC00</Color>
      </Brush>
      ...
 



You can skip the Brush element in node to use default colors.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #57 - Jun 6th, 2014 at 9:52am
 
You can load diagram objects from arbitrary XML format using code as in this tutorial:
http://www.mindfusion.eu/onlinehelp/flowchartnet/index.htm?CC_Tutorial_1__Loadin...
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #58 - Jun 6th, 2014 at 9:53am
 
U mean Brushes block is compulsory,

But i have another XML in which I have removed Brushes block still its loading properly just tell me mandatory tags so that i can change XML.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #59 - Jun 6th, 2014 at 10:07am
 
I don't want to use arbitrary XML format again, Just tell me Is it possible to load XML directly?

I guess Yes, right then tell me proper format of XML so that I can build XML in that format and can load directly.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 3 [4] 5 6 ... 21
Send TopicPrint