# SmartArt, Linear Algorithm, size and alignment of nodes

• ### Question

• Hi,

I can not figure out which way is determined by the size of the node in the linear algorithm. I'll try to explain what I mean.

For example I will use vList3 layout.Add SmartArt object which contains only one node. This node placed in center of SmartArt object and has spaces at top,bottom, left and right sides.

This position determined by algorithm's params and clear to me:

```<dgm:alg type="lin">
<dgm:param val="fromT" type="linDir"/>
<dgm:param val="mid" type="vertAlign"/>
<dgm:param val="ctr" type="horzAlign"/>
</dgm:alg>```

Next step I investigate the constraints which determine the size of composite node:

```<dgm:constrLst>
<dgm:constr type="w" refType="w" forName="composite" for="ch"/>
<dgm:constr type="h" refType="h" forName="composite" for="ch"/>
<dgm:constr type="h" refType="h" forName="spacing" for="ch" fact="0.25" refForName="composite" refFor="ch"/>
<dgm:constr type="h" refType="w" forName="spacing" for="ch" fact="0.1" op="lte"/>
<dgm:constr val="65" type="primFontSz" for="des" op="equ" ptType="node"/>
</dgm:constrLst>```
I interpret first two lines like: set width and height for composite node like width and height of parent (in this case it's SmartArt object). So in this case node must occupy the entire space within the SmartArt object. But he didn't that. Why?

Next step I tried to change height of SmartArt and got following result:

No spaces at top and bottom sides, and height of node was changed.

Where can I get the params or constraints  which explain spaces around the node?

I'm not sure that the layout file contains all the information needed to display the SmartArt object.

Monday, October 22, 2012 11:23 AM

• Hi FunkyKytarista,

I haven’t received a response to my posting on Nov. 19, so I hope your issue is resolved.

Thanks, Vilmos

Wednesday, November 28, 2012 8:19 PM

### All replies

• Hi FunkyKytarista,

Thank you for your question. In the future, please provide to which document (including version) and section your question is related.
A member of the protocol documentation team will respond to you soon.

Regards,
Vilmos Foltenyi - MSFT

Monday, October 22, 2012 5:47 PM
• Hi FunkyKytarista,

I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon.

Regards,
Vilmos Foltenyi - MSFT

Tuesday, October 23, 2012 5:04 AM
• Hi,

I found a reason of spaces.  In this case all calculation dependents of imgShp size.

But now I do not understand one more thing. In third constraint we are verifying that  imgShp does not higher than parent node. If it is not true  needs to change the height of imgShp, make it like height of the parent. But this constraint do not speaks anything about width of imgShp (which was defined by first constraint).In this case we get ellipse instead of a circle.

```<dgm:constr type="w" refType="w" forName="imgShp" for="ch" fact="0.335"/>
<dgm:constr type="h" refType="w" forName="imgShp" for="ch" refForName="imgShp" refFor="ch" op="equ"/>
<dgm:constr type="h" refType="h" forName="imgShp" for="ch" op="lte"/>
<dgm:constr type="ctrY" refType="h" forName="imgShp" for="ch" fact="0.5"/>
<dgm:constr type="l" forName="imgShp" for="ch"/>
<dgm:constr type="w" refType="w" forName="txShp" for="ch" fact="0.665" op="equ"/>
<dgm:constr type="h" refType="h" forName="txShp" for="ch" refForName="imgShp" refFor="ch" op="equ"/>
<dgm:constr type="ctrY" refType="h" forName="txShp" for="ch" fact="0.5"/>
<dgm:constr type="l" refType="w" forName="txShp" for="ch" fact="0.5" refForName="imgShp" refFor="ch"/>
<dgm:constr type="lMarg" refType="w" forName="txShp" for="ch" fact="1.25" refForName="imgShp" refFor="ch"/>```

Tuesday, October 23, 2012 2:43 PM
• Hi FunkyKytarista,

Your post contains xml snippets and screen shots, so you have a file. Please send the file as attachment to
‘dochelp (at) microsoft (dot) com’
and in the e-mail indicate that it is for me.

Thanks, Vilmos

Monday, November 19, 2012 7:05 PM
• Hi FunkyKytarista,

I haven’t received a response to my posting on Nov. 19, so I hope your issue is resolved.

Thanks, Vilmos

Wednesday, November 28, 2012 8:19 PM
• Hi FunkyKytarista,

i have some problem same with you , haven't you solve the problem?

if you have solved , could you please tell me some advice about is there some way to get shape's position, width and height, or is there default i forget.

i would be happy to get any answer.

thanks!

Monday, September 22, 2014 9:51 AM
• do anybody provide me the appropriate answer for this query.

Thanks,

Arun

Monday, October 12, 2015 10:45 AM

I see you posted a new forum topic with a similar topic (https://social.msdn.microsoft.com/Forums/en-US/5f095db3-76c1-4676-9e26-a2c6d856487e/need-to-identify-the-smartartshape-bounds-using-the-smart-art-bounds?forum=os_binaryfile). Can you please let me know if these two are inquiries for the same technical issue? If this issue is different from the other topic you posted, we can have another engineer review this one separately.

Thanks,
Kamil Sykora

Monday, October 12, 2015 2:05 PM
• Hi Kamil,

I cannot say both are same issue. But the root cause of this issue is same. In this query i need to know about how the calculation and its algorithm took place on the position and size of the smartart with its shapes in drawing(x).xml.

Please don't confuse between the needs which are explained in those queries.

Please let me know if you need any clarifications.

Thanks,

Arun

Tuesday, October 13, 2015 3:59 AM
• Hello Arun,

I will look into this issue for you. Since the original issue had two different questions and the first one was answered by the original customer, can you clarify which specific question you are looking to resolve? Furthermore, the original question had a specific file as an example. Do you have a simple example file that you could provide that we can use as a starting point to the investigation? If so, please send it to dochelp@microsoft.com to my attention.

Thanks,
Kamil Sykora

Tuesday, October 13, 2015 1:13 PM
• Hey Kamil,

for example, you can simply add a smart art in MS PowerPoint and save as image of any image format.

Could you please reply for the above query as soon as possible.? Because you are not clearly understanding how Microsoft handles the behavior of Position of the smart art shapes.

Please let me know if you have any confusion in my above query. Because your response was not yet clear and non-absoluteness. it takes more amount of time wastage for me to make you understand what my query is.

Arun

Monday, November 2, 2015 7:16 AM
• Hi All,

Any proper solution for this query ?

Arun

Tuesday, November 3, 2015 9:01 AM
• Hello Arun,

Can you please clarify your question? I am at this point not sure what specific issue you are facing. Please use detailed element references, preferably with an example of how you generated them.

We can assist if you have questions about specific XML elements as they are described by the ISO/IEC 29500 specification but there are certain aspects that are not described by the specification, such as exact rendering of individual shapes. Please see https://msdn.microsoft.com/en-us/library/office/dd439435(v=office.14).aspx for additional information about the algorithms used by the Microsoft Office products.

Thanks,
Kamil Sykora

Tuesday, November 3, 2015 1:38 PM