Repository navigation
VisioAutomation 3.0.0
·
111 commits
to master
since this release
Major version bump. Several behavior changes that affect callers:
- The exception type thrown by
CustomPropertyHelper.SetandUserDefinedCellHelper.Setfor malformed values changes fromCOMExceptiontoArgumentException(with the originalCOMExceptionpreserved asInnerException). Client.Model.DrawDirectedGraphDocumentnow respects each layout'sUseDynamicConnectorssetting from XML, instead of hardcoding it tofalse.DirectedGraphDocumentLoader.LoadFromXmlnow rejects non-<directedgraph>root elements that previously parsed silently.- Minimum supported .NET Framework rises from 4.0 to 4.5.2 (binary-breaking for consumers still on net40).
Source compatibility for property accesses is preserved: the new Formula property on CustomPropertyCells and UserDefinedCellCells is paired with an [Obsolete] Value alias scheduled for removal in a later release.
Changed
- Minimum required .NET Framework raised from 4.0 to 4.5.2. .NET Framework 4.5.2 was released in 2014 and has shipped via Windows Update for years, so consumers on a current Windows machine are essentially unaffected. The package's
lib\folder also moves fromlib\net40tolib\net452, correctly reflecting the binaries' actual target framework — the previouslib\net40claim would silently install the assemblies into anet40project where they would fail to load. - Replaced the deprecated
<licenseUrl>nuspec element with the modern SPDX<license type="expression">MIT</license>form. The license itself is unchanged (still MIT) — only the metadata representation differs, which is what nuget.org's package page now expects. - The package now includes a
README.mdat its root (sourced from the repo'sreadme.md) so the package page on nuget.org renders project content directly instead of just metadata.
Added
DirectedGraphDocumentLoader.LoadFromXmlnow honors aconnectortypeattribute on<renderoptions>, acceptingCurved(default),Straight, orRightAngle. Previously the connector type was hardcoded toCurvedregardless of XML, so every directedgraph rendered from XML had curved connectors. Closes #140 (sub-issue of #105).DirectedGraphDocumentLoader.LoadFromXmlnow honors adirectionattribute on<renderoptions>, acceptingTopToBottom(default),BottomToTop,LeftToRight, orRightToLeft. Also accepts alayoutattribute, currentlySugiyama-only (any other value raisesArgumentExceptionwith a descriptive message). Closes #141 (sub-issue of #105).DirectedGraphLayout.LayoutOptions(new publicMsaglOptionsproperty) carries per-page layout settings parsed from<renderoptions>. Defaults to a freshMsaglOptions()for programmatically constructed layouts.- Typed setters on
CustomPropertyCells:SetString(string),SetNumber(int),SetNumber(double),SetBool(bool),SetDate(DateTime),SetFormula(string). Each emits a correctly-encoded Visio formula and setsTypeto match. New canonical replacement for rawFormula = ...assignment, which is a foot-gun for string values (a bare identifier like"testVal"is parsed as a name reference, not a literal). Closes #144. - Typed setters on
UserDefinedCellCells:SetString(string),SetFormula(string). Same idea, simpler surface (noTypefield). Closes #144. Formulaproperty onCustomPropertyCellsandUserDefinedCellCells(renamed fromValueto surface that the cell stores a Visio formula, not a literal value).
Changed
CustomPropertyHelper.SetandUserDefinedCellHelper.Setnow wrap Visio's formula-errorCOMException(#NAME?,#VALUE!, etc.) in anArgumentExceptionwith a self-explanatory message pointing atSetString/EncodeValues. Behavior change: callers that catchCOMExceptionfrom these methods will need to catchArgumentExceptioninstead (or both). The originalCOMExceptionis preserved asInnerException. Part of #144.
Deprecated
CustomPropertyCells.ValueandUserDefinedCellCells.Valueare now[Obsolete]aliases forFormula. Source compatibility preserved through the deprecation window; the alias is scheduled for removal as part of the Phase 3 modernization work. Migration: renamecells.Valuetocells.Formula, or use the new typed setters (SetString, etc.). Part of #144.
Changed
Client.Model.DrawDirectedGraphDocumentnow respects each layout'sLayoutOptions(the per-pageMsaglOptions) when rendering, instead of always overridingUseDynamicConnectorstofalseand ignoring the parsedusedynamicconnectors/scalingfactorfrom XML. Behavior change: XML<renderoptions>attributes that were previously parsed but silently dropped now actually take effect; programmatic callers who relied on the hardcodedUseDynamicConnectors=falseshould set it explicitly ondg_layout.LayoutOptionsbefore calling.DirectedGraphDocumentLoader.LoadFromXmlnow validates that the root XML element is<directedgraph>and throwsArgumentExceptionotherwise. This is the same root name theImport-VisioModelcmdlet has always required; the bare loader API previously accepted any root and silently parsed only its<page>children, which let typos like<autolayoutdrawing>succeed without warning. Surfaces the schema mismatch that bit the #105 reporter. The four in-repo test fixtures (VTest/datafiles/directed_graph_*.xml) have been re-rooted from<autolayoutdrawing>to<directedgraph>to match.
Fixed
OrgChartDocument.Renderno longer fails withCOMException: File not foundon Visio 2013+. The defaultOrgChartStyling.Visio2013Templatewas hardcoded toorgch_u.vst, but Visio 2013 replaced binary.vsttemplates with XML-based.vstxand modern Visio installs only shiporgch_u.vstx. Updated toorgch_u.vstx. Visio 2010 (Visio2010Template = "orgch_u.vst") is unchanged.GeometrySection.Rendernow returns the section index Visio assigned to the newly-added geometry section, instead of always returning the literal0. This matches the API's stated intent (and the Geometry gitbook page's claim) so that callers adding multiple geometry sections can target a specific one by index. Closes #128.
Artifacts
VisioAutomation2010.3.0.0.nupkgis the NuGet package. Place in a folder, add that folder as a NuGet package source for your project, thenInstall-Package VisioAutomation2010.VisioAutomation2010-binaries-3.0.0.zipis the raw DLLs for projects that do not use NuGet.
Related
- The companion Visio PowerShell module wraps this NuGet for PowerShell use.
- Project documentation.
- Full changelog.