Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Graph Layout/Direction and Connectors from Curved to Straight?? #105

Open
tcox8 opened this issue Nov 22, 2021 · 4 comments
Open

Comments

@tcox8
Copy link

tcox8 commented Nov 22, 2021

Is it possible to change the graph layout or graph direction when using the directedgraph XML? My hope would be to change the direction from LeftToRight and to change the connectors from curved to straight. I attempted to do this via the following code but it always draws it the same way. Note: the code below does not have the connectors from curved to straight as I couldn't find any documentation on the internet for that.

<directedgraph GraphDirection="LeftToRight" Layout="Sugiyama">
  <page>
    <renderoptions
          usedynamicconnectors="true"
          scalingfactor="20" />
    <shapes>
    ..............

@tcox8
Copy link
Author

tcox8 commented Nov 22, 2021

Note: I tried using variations of the following but the page does NOT change:

$ls.LayoutDirection = "TopToBottom"
$ls.ConnectorStyle = "RightAngle"
$ls.ConnectorAppearance = "Straight"
Format-VisioPage -LayoutStyle $ls

I test that Format-VisioPage worked by using -Orientation and changing it back and forth from Landscape and Portrait.

@tcox8
Copy link
Author

tcox8 commented Nov 22, 2021

Also, is the XML custom to this application? I cannot find documentation for the formatting of the XML anywhere. Anything close to the language doesn't seem to work. Another example, Attempting to add a subshape. Sorry for all the questions, and I appreciate any help you can provide.

@tcox8
Copy link
Author

tcox8 commented Nov 23, 2021

I noticed "Get-VisioScriptingClient" fails out as it claims the function doesn't exist. I installed 4.2 but had the same issues. I then removed the entire Visio Module and installed version 3.4. Now Get-VisioScriptingClient works but I still have the same issues as my previous comments.

@tcox8
Copy link
Author

tcox8 commented Nov 23, 2021

If I don't use the XML and instead use .AddShape and .AddConnection, I am able to change the layouts as need be with the Format-VisioPage function. I do wish that I had an answer for the XML as that would be ideal. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant