feat(working-with-layers): add 30 compiler-validated C# examples - Working With Layers [26.8.0/net8.0] - #94
Merged
Conversation
…d-retrieve-it-during-runtime-for-compliance-checks Task: Add a custom tag to the legal layer and retrieve it during runtime for compliance checks - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…n-existing-diagram-and-set-its-color-to-blue Task: Add a new layer named annotations to an existing diagram and set its color to blue - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…e-security-layer-for-downstream-processing Task: Apply a custom metadata property to the security layer for downstream processing - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ape-within-the-ui-layer-using-layer-settings Task: Apply a drop shadow effect to every shape within the ui layer using layer settings - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-the-marketing-layer-to-light-gray Task: Change the fill color of all shapes in the marketing layer to light gray - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-to-final-and-preserve-its-shape-properties Task: Clone the draft layer rename the clone to final and preserve its shape properties - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…into-a-newly-created-layer-called-prototype Task: Copy all shapes from the design layer into a newly created layer called prototype - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…y-the-shapes-from-the-export-layer-of-an-existing-file Task: Create a new diagram that contains only the shapes from the export layer of an existing file - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-with-only-the-presentation-layer-visible Task: Create a snapshot image of the diagram with only the presentation layer visible - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…tly-remove-its-associated-shapes-from-the-diagram Task: Delete the layer obsolete and permanently remove its associated shapes from the diagram - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…that-are-not-assigned-to-any-layer Task: Detect and remove any orphaned shapes that are not assigned to any layer - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ble-layers-to-a-vdx-file-for-legacy-compatibility Task: Export a diagram showing only the visible layers to a vdx file for legacy compatibility - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…al-layer-visible-to-an-svg-file-for-web-display Task: Export a diagram with only the technical layer visible to an svg file for web display - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…sociated-shape-counts-to-a-json-file Task: Export the list of layers and their associated shape counts to a json file - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-those-from-the-analysis-layer-to-a-csv-report Task: Filter shapes by layer and export only those from the analysis layer to a csv report - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-layer-s-name-visibility-and-total-shape-count Task: Generate a summary report listing each layer s name visibility and total shape count - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…sible-layer-as-an-individual-pdf-document Task: Iterate over layers and export each visible layer as an individual pdf document - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…he-number-of-connector-shapes-it-contains Task: Iterate through each layer and count the number of connector shapes it contains - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…and-save-the-result-as-a-vsdx-file Task: Load a diagram disable the grid layer and save the result as a vsdx file - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ayer-to-prevent-edits-and-save-the-locked-state Task: Load a diagram lock the architecture layer to prevent edits and save the locked state - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…r-names-with-their-visibility-status Task: Load a visio diagram and list all layer names with their visibility status - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…r-merge-their-overview-layers-into-a-single-diagram Task: Load multiple visio files from a folder merge their overview layers into a single diagram - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-a-single-layer-while-preserving-shape-order Task: Merge the draft and review layers into a single layer while preserving shape order - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…t-background-appears-beneath-all-other-layers-in-the-stack Task: Programmatically reorder layers so that background appears beneath all other layers in the stack - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…d-update-all-shapes-referencing-the-old-name Task: Rename the layer background to base and update all shapes referencing the old name - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ure-layer-to-2-points-for-all-its-shapes Task: Set the line weight of the infrastructure layer to 2 points for all its shapes - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ential-layer-to-false-before-generating-a-print-ready-pdf Task: Set the print visibility of the confidential layer to false before generating a print ready pdf - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…layer-to-50-percent-for-all-its-shapes Task: Set the transparency of the watermark layer to 50 percent for all its shapes - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-to-hidden-before-exporting-the-diagram-to-pdf Task: Toggle visibility of the details layer to hidden before exporting the diagram to pdf - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…has-a-unique-name-and-report-duplicates Task: Validate that each layer in a diagram has a unique name and report duplicates - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
… index and example table
…catalogue for Working With Layers category
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Working With Layers — Compiler-Validated C# Examples
What this PR does
Adds 30 AI-generated, compiler-validated C# examples for the Working With Layers category of Aspose.Diagram for .NET.
All examples were generated by the Aspose.Diagram Examples Generator Agent and passed the full three-attempt validation pipeline before being included.
Validation Summary
dotnet builddotnet runPipeline
Each example was generated and validated through:
Only examples that passed both
dotnet buildanddotnet runare included in this PR.Examples Added
add-a-custom-tag-to-the-legal-layer-and-retrieve-it-during-runtime-for-compliance-checks.csadd-a-new-layer-named-annotations-to-an-existing-diagram-and-set-its-color-to-blue.csapply-a-custom-metadata-property-to-the-security-layer-for-downstream-processing.csapply-a-drop-shadow-effect-to-every-shape-within-the-ui-layer-using-layer-settings.cschange-the-fill-color-of-all-shapes-in-the-marketing-layer-to-light-gray.csclone-the-draft-layer-rename-the-clone-to-final-and-preserve-its-shape-properties.cscopy-all-shapes-from-the-design-layer-into-a-newly-created-layer-called-prototype.cscreate-a-new-diagram-that-contains-only-the-shapes-from-the-export-layer-of-an-existing-file.cscreate-a-snapshot-image-of-the-diagram-with-only-the-presentation-layer-visible.csdelete-the-layer-obsolete-and-permanently-remove-its-associated-shapes-from-the-diagram.csdetect-and-remove-any-orphaned-shapes-that-are-not-assigned-to-any-layer.csexport-a-diagram-showing-only-the-visible-layers-to-a-vdx-file-for-legacy-compatibility.csexport-a-diagram-with-only-the-technical-layer-visible-to-an-svg-file-for-web-display.csexport-the-list-of-layers-and-their-associated-shape-counts-to-a-json-file.csfilter-shapes-by-layer-and-export-only-those-from-the-analysis-layer-to-a-csv-report.csgenerate-a-summary-report-listing-each-layer-s-name-visibility-and-total-shape-count.csiterate-over-layers-and-export-each-visible-layer-as-an-individual-pdf-document.csiterate-through-each-layer-and-count-the-number-of-connector-shapes-it-contains.csload-a-diagram-disable-the-grid-layer-and-save-the-result-as-a-vsdx-file.csload-a-diagram-lock-the-architecture-layer-to-prevent-edits-and-save-the-locked-state.csload-a-visio-diagram-and-list-all-layer-names-with-their-visibility-status.csload-multiple-visio-files-from-a-folder-merge-their-overview-layers-into-a-single-diagram.csmerge-the-draft-and-review-layers-into-a-single-layer-while-preserving-shape-order.csprogrammatically-reorder-layers-so-that-background-appears-beneath-all-other-layers-in-the-stack.csrename-the-layer-background-to-base-and-update-all-shapes-referencing-the-old-name.csset-the-line-weight-of-the-infrastructure-layer-to-2-points-for-all-its-shapes.csset-the-print-visibility-of-the-confidential-layer-to-false-before-generating-a-print-ready-pdf.csset-the-transparency-of-the-watermark-layer-to-50-percent-for-all-its-shapes.cstoggle-visibility-of-the-details-layer-to-hidden-before-exporting-the-diagram-to-pdf.csvalidate-that-each-layer-in-a-diagram-has-a-unique-name-and-report-duplicates.csValidation Details
dotnet build— compiled without errors against Aspose.Diagram for .NET 26.8.0dotnet run— executed without unhandled exceptionsThis PR was created automatically by the Aspose.Diagram Examples Generator Agent. Merge after reviewing the examples above.