none
Custom path Connector in power point RRS feed

  • Question

  • Hi ,

    I have to create a custom connector in PPTX using OOXml. As, bent connector or curve connector bent on 90 degree only, so like a custom shape i have to create a custom connector, because my connector can go through any path. I download the "OfficeOpenXML-DrawingMLGeometries.zip" where i found a definition of preset Shapes on the file "presetShapeDefinitions.xml" , in this file Bentconnector2 is defined by:

    ----------------------------------------------------------------------------------------------------
    <bentConnector2>
       
    <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
       
    <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
         
    <path fill="none">
           
    <moveTo>
              <pt x="l" y="t" />
            </moveTo>
            <lnTo>
              <pt x="r" y="t" />
            </lnTo>
            <lnTo>
              <pt x="r" y="b" />
            </lnTo>

          </path>
       
    </pathLst>
      </bentConnector2> 

    -----------------------------------------------------------------------------------------------------
    That means bent connector2 is being drawn in this way. But, now i want to create a custom connector like above one. My slide1.xml contain a connection shape like....

    ----------------------------------------------------------------------------------------------------
    <p:cxnSp>
            <p:nvCxnSpPr/>    
            <p:spPr>
              <a:xfrm >
                <a:off x="3886200" y="2362200"/>
                <a:ext cx="914400" cy="914400"/>
              </a:xfrm>
              <a:customGeom >
                    <rect l="l" t="t" r="r" b="b" xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
                        
    <pathLst xmlns="http://schemas.openxmlformats.org/drawingml/2006/main">
                            
    <path fill="none">
                                   
    <moveTo>
                                       <pt x="l" y="t" />
                                  </moveTo>
                                 <lnTo>
                                       <pt x="r" y="t" />
                              </lnTo>
                              <lnTo>
                                      <pt x="r" y="b" />
                             </lnTo>

                            </path>
                         
    </pathLst>
              </a:customGeom>
            </p:spPr>
            <p:style/>        
    </p:cxnSp>
    -----------------------------------------------------------------------------------------------------
    Rather than.....
    ----------------------------------------------------------------------------------------------------
    <p:cxnSp>
            <p:nvCxnSpPr/>    
            <p:spPr>
              <a:xfrm >
                <a:off x="3886200" y="2362200"/>
                <a:ext cx="914400" cy="914400"/>
              </a:xfrm>
              <a:prstGeom prst="curvedConnector2">
               
    <a:avLst/>            
              </a:prstGeom>

            </p:spPr>
            <p:style/>        
    </p:cxnSp>
    -----------------------------------------------------------------------------------------------------
     But it gives always an error when open that pptx, It says pptx has been corrupted ..... How i can fix this problem...???

     

    Thanks & Regards

    Tamkin

     

    Wednesday, May 20, 2009 5:08 AM

All replies

  • Have you used the Validation feature with the latest CTP? here's the introduction: http://msdn.microsoft.com/en-us/library/cc471858(office.14).aspx see if it can help you to find out the errors. Thanks!

    Shuangshuang Liao (MS)
    Friday, May 22, 2009 8:12 AM
  • Yes, i have used that one.. It gives me an error. But "Office Open XML Part 4 - Markup Language Reference.pdf" says that it is legal to put a
    </a:customGeom> (Custom Geom) as a child element to the  </p:cxnSp> (Connection shape) .

    Thanks

    Saturday, May 23, 2009 5:03 AM
  • it seems that <a:customGeom > should be  <a:custGeom>?
    Monday, May 25, 2009 3:23 AM
  • Sorry, During my posting I have done a mistake. But I have put <a:custGeom> to my actual program. Though that doesn’t work.
    I think OOXML support <a:custGeom> to be a child node under <a:spPr> of <a:cnxSp> . But PP doesn't support. PP defines that connector must be always a preset geometry <a:prstGeom> of predefined type like bent connector, curve connector or line connector. 




    Thanks.

    Wednesday, May 27, 2009 5:39 AM