dynamic connectors in Visio .vdx files - graph

Currently I am trying to understand .vdx files, because in the future I want to generate my own. I'm having problems with dynamic connectors. When defining them as follows:
<Shape ID="46" Type="Shape" Master="10">
<Geom IX="0">
<MoveTo IX='1'></MoveTo><LineTo IX='23'></LineTo></Geom>
</Shape>
....
<Connect FromSheet="45" FromCell="BeginX" FromPart="9" ToSheet="1" ToCell="PinX" ToPart="3" />
<Connect FromSheet="45" FromCell="EndX" FromPart="12" ToSheet="23" ToCell="PinX" ToPart="3" />
they are not displayed. After moving a node, the connectors are displayed. What am I missing?
When taking the minimal settings from a Visio generated .vdx file, there are lots of coordinates, which I want to avoid:
<Shape ID="47" Type="Shape" Master="10">
<XForm>
<PinX F="Inh">1.669258233656828</PinX>
<PinY F="Inh">7.519214852067909</PinY>
</XForm>
<XForm1D>
<BeginX F="_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)">1.737275462308963</BeginX>
<BeginY F="_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)">7.671541057367827</BeginY>
<EndX F="_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)">1.601241005004693</EndX>
<EndY F="_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)">7.366888646767992</EndY>
</XForm1D>
<Geom IX="0">
<LineTo IX="2"><X>-0.1664424255025283</X><Y>-0.3046524105998358</Y></LineTo>
</Geom>
</Shape>
What is the best and easiest way to work with dynamic connectors in .vdx files?
EDIT: With Visio 2010 it is much better, and the connectors are shown most of the time. So it really looks like a Visio bug...

According to Connect documentation:
In untrusted XML files, when Visio opens the file, it uses the Connect elements to set glue formulas for shapes, similar to the GlueTo method in Automation. However, geometry will not be updated, so connectors may need to be manually rerouted.

With Visio 2010, the connectors are displayed, so it looks like it was a bug in an earlier version of Visio.

Related

Is it possible to use graph toolkit components (mgt-people-picker, mgt-login etc.) inside an iframe?

In my project, I am trying to use graph toolkit components (mgt-login and mgt-people-picker) inside a teams tab using mgt-msal-provider or mgt-teams-provider, but it doesn't seems to work. Any help is much appreciated.
Those components work as expected with mgt-mock-provider where authentication is not required.
<mgt-teams-provider client-id="Client-ID"
auth-popup-url="auth.html"></mgt-teams-provider>
<mgt-msal-provider client-id="Client-ID"
login-type="redirect/popup"
scopes="user.read,people.read"
authority=""></mgt-msal-provider>
<!--<mgt-mock-provider></mgt-mock-provider>-->
<mgt-login></mgt-login>
<mgt-people-picker></mgt-people-picker>
When I enable mgt-mock-provider, both mgt-login and mgt-people-picker controls are working as expected. I would like to make it work with either mgt-teams-provider or mgt-msal-provider
Note: I have replaced the original client-id value with "Client-ID" in the sample code snippet.

How to create a 3D view just like BimViews using Java?

I am new to the plugin development of BimClientServerLib.
I have to create a plugin/service where i just need the 3D view and get all the information, so that if i push some information like simulate Door_1 it should be highlighted in the 3D View.I have used the [BimServerClientLib] to check in the project and retrieve some information like get all levels or get all detectors with existing BimViews as 3D viewer and the BIMServerClientLib as a separate Java service.Also, if i use the BimViews which is in Java script how do i push information with the service in Java.
Have a look at BIMSurfer. Download the project into any server (like tomcat), then navigate to the index.html. They have two examples, local one without a BIMServer and another with a connection to BIMServer.
You can adjust their BIMServer example to load your project and for highlighting a specific element, you can the provided library methods (available on the BIMSurfer github main page).
bimSurfer.setSelection({ids: ["object3", "object2", "object4", "object6"], selected: true });
Goodluck.

Avalonedit nested code completion from xml file

I'm using Avalonedit in my wcf application. I have to implement code completion feature(intellisense).
My Requirement
I have an xml file with the following content.This xml data will be updated often.
<?xml version="1.0" encoding="UTF-8"?>
<RelativeRegion>
<Display_Window>
<GreenButton>10,10,30,85</GreenButton>
</Display_Window>
<Insert_Window>
<BlueButton>10,10,30,85</BlueButton>
<YellowButton>10,10,30,85</YellowButton>
</Insert_Window>
<Search_Window>
<RedButton>10,10,30,85</RedButton>
<YellowButton>10,10,30,85</YellowButton>
</Search_Window>
</RelativeRegion>
I want to insert intellisense for this data to my avalon editor like
RelativeRegion.Display_Window.GreenButton
Is it possible to directly bind the xml data to avalonedit intellisense?
Is there any way to implement this nested code completion?
What I have done so far
I googled a lot about avalonedit nested code completion and i didn't get anything about the nested thing. Finally I start with the available code from AvalonEdit Code Completion Documentation. But I think this will work only for single level and not suiting for my requirement. May be I am unaware of its the capabilities as a first time user of avalonedit.
Anyone tried the nested code completion. Is there any way to achieve this.
I can change the data format from xml to JSON or any other format if required.

how to set publish dcp for child or other publications to different location without overiding all other settings

I am trying to configure cd_storage and getting issue in setting up dynamic component presentation as they get over written by child and published to same folder from every publication.
I know we can define the publication level settings but once we define that then it expect us to define everything inside that publication tag. We do not want to define every thing 50 times in publication tag.
Could any one suggest the best practice for same.
this is for sdl tridion 2011 sp1
Thanks in advance...
Your problem is in how you defined your storage configuration for the storage which you use to store ComponentPresentations. There is a flag in the definition of a storage which sets exactly this type of behavior: defaultFilesystem. You probably have it set to false which causes all ComponentPresentations from all publications to be stored in the same location. By setting this flag to true you will get ComponentPresentations from different publications stored in different locations. I will give an example to show how this works in cd_storage_conf.xml:
<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultCPs" defaultFilesystem="true">
<Root Path="c:\temp\cpRoot" />
</Storage>
....
<ItemTypes defaultStorageId="defaultFile" cached="true">
<Item typeMapping="ComponentPresentation" itemExtension=".jsp" storageId="defaultCPs"/>
....
This is really easy to maintain and will make the Broker to store ComponentPresentations to locations like: c:\temp\cpRoot\pub109\dcp\jsp\*** (here I have publicationId=109).
Hope this helps.

How do you define a single blendable design time instance?

The default Windows 8 project template has a CollectionViewSource in the template.
<CollectionViewSource
x:Name="itemsViewSource"
Source="{Binding Model.Invitations}"
d:Source="{Binding Invitations, Source={d:DesignInstance Type=vm:DesignerFilteredInvitations, IsDesignTimeCreatable=True}}" />
Obviously not all pages have a collection as their model, you can define a DataContext like this:
<vm:MySingleItemViewModel x:Key="Model" />
How do you define the design instance for this kind of model?
Well, design time data is best accomplished like this: http://blog.jerrynixon.com/2012/08/most-people-are-doing-mvvm-all-wrong.html
I realize your question is asking about using d:DesignInstance which also works with this type of technique - just not demonstrated in that article.
All it requires is a good constructor.
Okay, using this works fine:
<Page
d:DataContext="{d:DesignInstance Type=Models:ViewModel, IsDesignTimeCreatable=True}"
And using this works fine:
<d:Page.DataContext>
<Models:ViewModel/>
</d:Page.DataContext>
I must tell you the latter is an easier approach, too. It is also what Visual Studio will generate when you setup a data source in the designer. It also gives you fully-typed bindings. But either is acceptable.
Another note. I can see no good reason to set an object directly to the source of a CollectionViewSource. Normally you would be binding the CVS's Source property to a property inside your ViewModel. But, given your question: Here's how:
<CollectionViewSource
x:Name="TestCVS" Source="{Binding}"
d:DataContext="{Binding Source={d:DesignInstance Type=Models:ViewModel, IsDesignTimeCreatable=True}}"/>
Binding to the Source in the designer caused me endless trouble. But it irritated me more because I knew I would never do it this way. This is what I wanted to do:
<d:Page.DataContext>
<Models:ViewModel/>
</d:Page.DataContext>
<Page.Resources>
    <CollectionViewSource x:Name="TestCVS" Source="{Binding}" />
</Page.Resources>
You better have a great reason for your approach!
Best of luck!

Resources