Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Mon Jul 27, 2020 7:51 am

Hi Team,

Hope you are doing well.

We have too many nodes in a SmartArt chart and we have a requirement that we need to change formatting of few nodes out of all nodes in a SmartArt. Please see details below:
1. change border outline type i.e. dotted border line type,
2. color of node border outline
3. The weight of node outline:-Make this a heavier weight than the other nodes.

Also need to change formatting of few Connector Lines out of all connector lines. Please see details below:
1. Line Type: Change to a dotted line.
2. Color of connector.

I have also attached a PNG file for your reference.Please see the image which having different type of nodes and connector in same Smartart chart.we want like this.

Looking for a positive response. Thanks in Advance.

Thanks & Regards,
Anil Kumar

anilbits001
 
Posts: 41
Joined: Thu Sep 05, 2019 12:50 pm

Mon Jul 27, 2020 11:07 am

Hello,

Thanks for your inquiry.
Sorry our Spire.Presentation does not support setting the outline of SmartArt nodes and connector lines at present. We have added these two features to our upgrade list with the ticket SPIREPPT-1236 and SPIREPPT-1237. If there is any definite news regarding their implementation, we will inform you. Sorry for the inconvenience caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Mon Jul 27, 2020 12:24 pm

Hi Rachel,

Thanks for your response.

Could you please confirm any expected future release date for these features?


Thanks & Regards,
Anil Kumar

anilbits001
 
Posts: 41
Joined: Thu Sep 05, 2019 12:50 pm

Tue Jul 28, 2020 2:57 am

Hi Anil,

Thanks for your response.
Sorry to tell you that we are unable to give you an estimated time for the implementation of the new features at this moment. Our Dev team will do further investigation on this.
Anyway, once there is any good news, we will notify you ASAP.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Fri Aug 07, 2020 11:22 am

Hello,

Thanks for your patient waiting.
Glad to tell you these two new features have beend implemented, please download the newly released Spire.Presentation Pack Hotfix Version:5.8.1 from the following links and test.
Our website: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget: https://www.nuget.org/packages/Spire.Presentation/5.8.1

Code examples:
Code: Select all
            ISmartArt smartArt = presentation.Slides[0].Shapes[0] as ISmartArt;
            int count =smartArt.Nodes.Count;
            ISmartArtNode node;
            for (int i = 0; i < count; i++)
            {
                node = smartArt.Nodes[i];
                node.Line.FillType = FillFormatType.Solid;
                node.Line.SolidFillColor.Color = Color.Gray;
                node.Line.Width = 2;
            }

Code: Select all
            ISmartArt smartArt = presentation.Slides[0].Shapes[0] as ISmartArt;
            int count =smartArt.Nodes.Count;
            ISmartArtNode node;
            for (int i = 0; i < count; i++)
            {
                node = smartArt.Nodes[i];
                node.LinkLine.FillType = FillFormatType.Solid;
                node.LinkLine.SolidFillColor.Color = Color.Gray;
                node.LinkLine.Width = 2;
                node.LinkLine.DashStyle = LineDashStyleType.SystemDash;
            }



Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Aug 11, 2020 6:24 am

Hi Anil,

Greetings from E-iceblue!
Have you tested the new features? Looking forward to your feedback.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Aug 19, 2020 3:50 am

Hi Rachel,

Hope you are doing well.

Thanks for providing these features so quickly.

We will test these functionality and will let you know our findings EOD.

Thanks & Regards,
Anil Kumar

anilbits001
 
Posts: 41
Joined: Thu Sep 05, 2019 12:50 pm

Wed Aug 19, 2020 5:43 am

Hi Anil,

Ok, I'll wait for your further test results.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Aug 19, 2020 10:21 am

Hello Rachel,

Thanks for a quick response.

This code works well when i execute with a predefined PPT template with an smart art already placed. However, when i try to add smartart at run time and then first i removed all the nodes from SmartArt in blank template and then i am adding nodes one by one and filling them based on my requirements.so, if i try to add one node in its and then try to format the border line of node then it throw NullReferenceException Erorr. I am attaching a screen shot and sample code for that. Could you please help me on this.

Moreover, it seems that the code to format connector line from a node to another node is also not working properly. Could you please check this one also.

Please see the code below which i am using.

Dim ppt As Presentation = New Presentation()
Dim smartArt As ISmartArt
Dim node_parent As ISmartArtNode
Dim midNode As ISmartArtNode
Dim gcNode As ISmartArtNode
ppt.LoadFromFile("C:\Users\A0741818\Documents\Visual Studio 2015\WebSites\Hyperlink Error on node in SmartArt in PPT\Presentation_node and connecter formatting.pptx")
smartArt = ppt.Slides(0).Shapes.AppendSmartArt(50, 50, 1000, 1000, SmartArtLayoutType.OrganizationChart)
For Each node As ISmartArtNode In smartArt.Nodes
smartArt.Nodes.RemoveNode(node)
Next
node_parent = smartArt.Nodes.AddNode()
node_parent.Line.FillType = Drawing.FillFormatType.Solid
node_parent.Line.SolidFillColor.Color = System.Drawing.Color.LightGray
node_parent.Line.Width = 5
node_parent.Line.DashStyle = LineDashStyleType.SystemDash

node_parent.LinkLine.FillType = Drawing.FillFormatType.Solid
node_parent.LinkLine.SolidFillColor.Color = System.Drawing.Color.DarkGreen
node_parent.LinkLine.Width = 8
node_parent.LinkLine.DashStyle = LineDashStyleType.SystemDash

midNode = node_parent.ChildNodes.AddNode()
gcNode = midNode.ChildNodes.AddNode()
gcNode.Line.FillType = Drawing.FillFormatType.Solid
gcNode.Line.SolidFillColor.Color = System.Drawing.Color.LightBlue
gcNode.Line.Width = 7
gcNode.Line.DashStyle = LineDashStyleType.SystemDash
gcNode.LinkLine.FillType = Drawing.FillFormatType.Solid
gcNode.LinkLine.SolidFillColor.Color = System.Drawing.Color.DarkOrange
gcNode.LinkLine.Width = 4
gcNode.LinkLine.DashStyle = LineDashStyleType.SystemDashDot
ppt.SaveToFile("C:\Users\A0741818\Documents\Visual Studio 2015\WebSites\Hyperlink Error on node in SmartArt in PPT\result new.pptx", FileFormat.Pptx2013)

Thanks in Advance. Looking for a positive response.

Thanks & Regards,
Anil Kumar

anilbits001
 
Posts: 41
Joined: Thu Sep 05, 2019 12:50 pm

Thu Aug 20, 2020 2:37 am

Hi Anil,

Thanks for your feedback.
I tested your code and indeed found the application threw NullReferenceException Erorr. This issue has been logged in our bug tracking system with the ticket SPIREPPT-1274. We will let you know if there is any update. Sorry for the inconvenience caused.
As for formatting connector line, I tested the following code and found it worked fine, attached is my output file, please check.
Code: Select all
        Dim ppt As Presentation = New Presentation()
        Dim smartArt As ISmartArt
        Dim node_parent As ISmartArtNode
        Dim midNode As ISmartArtNode
        Dim gcNode As ISmartArtNode
        ppt.LoadFromFile("Presentation_node and connecter formatting.pptx")
        smartArt = ppt.Slides(0).Shapes.AppendSmartArt(50, 50, 1000, 1000, SmartArtLayoutType.OrganizationChart)
        For Each node As ISmartArtNode In smartArt.Nodes
            smartArt.Nodes.RemoveNode(node)
        Next
        node_parent = smartArt.Nodes.AddNode()

        midNode = node_parent.ChildNodes.AddNode()
        midNode.LinkLine.FillType = Drawing.FillFormatType.Solid
        midNode.LinkLine.SolidFillColor.Color = System.Drawing.Color.DarkGray
        midNode.LinkLine.Width = 4
        midNode.LinkLine.DashStyle = LineDashStyleType.SystemDashDot

        gcNode = midNode.ChildNodes.AddNode()
        gcNode.LinkLine.FillType = Drawing.FillFormatType.Solid
        gcNode.LinkLine.SolidFillColor.Color = System.Drawing.Color.DarkOrange
        gcNode.LinkLine.Width = 4
        gcNode.LinkLine.DashStyle = LineDashStyleType.SystemDashDot
        ppt.SaveToFile("result new.pptx", FileFormat.Pptx2013)


Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Aug 20, 2020 3:47 am

Hi Rachel,

Thanks for a quick response.

Please update ASAP once the issue for node border line formatting NullReferenceException Erorr will be resolved.

The formatting of connector line seems working now.

Thanks in advance. Looking for a positive response.

Thanks & Regards,
Anil Kumar

anilbits001
 
Posts: 41
Joined: Thu Sep 05, 2019 12:50 pm

Thu Aug 20, 2020 6:02 am

Hi Anil,

Ok, I will notify you as soon as the issue of SPIREPPT-1274 is resolved. Thanks for your patience.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Aug 27, 2020 9:15 am

Hi Anil,

Thanks for your patient waiting.
The issue of ticket SPIREPPT-1274 is now resolved. Please download the newly released Spire.Presentation Pack Hotfix Version:5.8.5 for testing from the following links.
Our website: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget: https://www.nuget.org/packages/Spire.Presentation/5.8.5

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Fri Aug 28, 2020 3:36 pm

Hi Rachel,

Thanks for this quick hotfix version.

We have tested it and the formatting of both border line of a node and connector lines seems working.

i have deleted my response here because, by mistaken i have written wrong my previous response .so please ignore my previous response here. Sorry for inconvenience caused.

However.Please let me know how can i hide a node in smartart. we have a urgent requirement for this.


Thanks in advance.Looking for a positive response.

Thanks & Regards,
Anil Kumar

anilbits001
 
Posts: 41
Joined: Thu Sep 05, 2019 12:50 pm

Mon Aug 31, 2020 6:27 am

Hi Anil,

Thanks for your feedback.
I can't find the option to hide a node directly in Microsoft PowerPoint, how did you achieve it?
But I found that setting the line fill type to "Drawing.FillFormatType.None" can achieve an effect similar to hiding, below is code for your reference. You can give it a try.
Code: Select all
        'format border line of a node
        node.Line.FillType = Drawing.FillFormatType.None
        'format connector line
        node.LinkLine.FillType = Drawing.FillFormatType.None


Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.Presentation