├── .gitattributes
├── .gitignore
├── CONTRIBUTING.md
├── Camber.sln
├── LICENSE
├── README.md
├── _config.yml
├── lib
└── Autodesk
│ └── AutoCAD 2025
│ ├── ACA
│ └── AecBaseMgd.dll
│ ├── C3D
│ ├── AeccDataShortcutMgd.dll
│ ├── AeccDbMgd.dll
│ ├── AeccPressurePipesMgd.dll
│ └── Dynamo
│ │ ├── AcDynamoServices.dll
│ │ ├── AutoCADNodes.dll
│ │ ├── Civil3DNodes.dll
│ │ └── Core
│ │ └── DSCoreNodes.dll
│ ├── accoremgd.dll
│ ├── acdbmgd.dll
│ └── acmgd.dll
├── src
├── Builder
│ ├── Builder.csproj
│ ├── CreatePackage.bat
│ ├── Properties
│ │ └── launchSettings.json
│ └── pkg.json
├── Camber
│ ├── AutoCAD
│ │ ├── DocumentExtensions.cs
│ │ ├── Field.cs
│ │ ├── Layout.cs
│ │ ├── Objects
│ │ │ ├── AttributeDefinition.cs
│ │ │ ├── AttributeReference.cs
│ │ │ ├── BlockExtensions.cs
│ │ │ ├── BlockReferenceExtensions.cs
│ │ │ ├── Dimensions
│ │ │ │ ├── AlignedDimension.cs
│ │ │ │ └── Dimension.cs
│ │ │ ├── Layer.cs
│ │ │ ├── MLeader.cs
│ │ │ ├── MTextExtensions.cs
│ │ │ ├── Multi-View Blocks
│ │ │ │ ├── DisplayRepresentation.cs
│ │ │ │ ├── MultiViewBlock.cs
│ │ │ │ ├── MultiViewBlockReference.cs
│ │ │ │ └── ViewBlock.cs
│ │ │ ├── Object.cs
│ │ │ ├── ObjectSupport.cs
│ │ │ ├── Polylines
│ │ │ │ ├── Polyline3DExtensions.cs
│ │ │ │ ├── PolylineExtensions.cs
│ │ │ │ ├── PolylineUtilities.cs
│ │ │ │ └── PolylineVertex.cs
│ │ │ └── TextExtensions.cs
│ │ └── Xref.cs
│ ├── Camber.csproj
│ ├── Camber_DynamoCustomization.xml
│ ├── Civil
│ │ ├── CivilObjects
│ │ │ ├── AlignmentExtensions.cs
│ │ │ ├── Catchment.cs
│ │ │ ├── CatchmentGroup.cs
│ │ │ ├── CivilObject.cs
│ │ │ ├── CivilObjectSupport.cs
│ │ │ ├── Corridor.cs
│ │ │ ├── Feature Line
│ │ │ │ ├── FeatureLine.cs
│ │ │ │ ├── FeatureLineSegment.cs
│ │ │ │ └── FeatureLineSegmentType.cs
│ │ │ ├── Intersections
│ │ │ │ └── Intersection.cs
│ │ │ ├── ParcelExtensions.cs
│ │ │ ├── Pipe Networks
│ │ │ │ ├── PartFamily.cs
│ │ │ │ ├── PartSize.cs
│ │ │ │ ├── Parts
│ │ │ │ │ ├── Part.cs
│ │ │ │ │ ├── Pipe.cs
│ │ │ │ │ └── Structure.cs
│ │ │ │ ├── PartsList.cs
│ │ │ │ ├── PipeNetwork.cs
│ │ │ │ └── Rule Sets
│ │ │ │ │ └── RuleSet.cs
│ │ │ ├── Pressure Networks
│ │ │ │ ├── Pressure Parts
│ │ │ │ │ ├── PressureAppurtenance.cs
│ │ │ │ │ ├── PressureFitting.cs
│ │ │ │ │ ├── PressurePart.cs
│ │ │ │ │ ├── PressurePartConnection.cs
│ │ │ │ │ └── PressurePipe.cs
│ │ │ │ ├── PressureNetwork.cs
│ │ │ │ ├── PressurePartSize.cs
│ │ │ │ ├── PressurePartsList.cs
│ │ │ │ └── PressurePipeRun.cs
│ │ │ ├── Profile.cs
│ │ │ ├── ProfileView.cs
│ │ │ ├── SampleLine.cs
│ │ │ ├── SampleLineGroup.cs
│ │ │ ├── SectionView.cs
│ │ │ ├── Surfaces
│ │ │ │ ├── GridSurface.cs
│ │ │ │ ├── GridSurfaceCell.cs
│ │ │ │ ├── GridSurfaceVertex.cs
│ │ │ │ ├── GridVolumeSurface.cs
│ │ │ │ ├── ICamberSurface.cs
│ │ │ │ ├── SurfaceExtensions.cs
│ │ │ │ ├── TinSurfaceExtensions.cs
│ │ │ │ └── TinVolumeSurface.cs
│ │ │ ├── ViewFrame.cs
│ │ │ └── ViewFrameGroup.cs
│ │ ├── CorridorSurface.cs
│ │ ├── Data Shortcuts
│ │ │ ├── DataShortcut.cs
│ │ │ ├── DataShortcutFunctions.cs
│ │ │ ├── DataShortcutProject.cs
│ │ │ └── DataShortcutWorkingFolder.cs
│ │ ├── Design Checks
│ │ │ ├── AlignmentDesignCheck.cs
│ │ │ ├── AlignmentDesignCheckSet.cs
│ │ │ ├── DesignCheckSetCollections.cs
│ │ │ ├── ProfileDesignCheck.cs
│ │ │ └── ProfileDesignCheckSet.cs
│ │ ├── Folder.cs
│ │ ├── Grading Criteria
│ │ │ ├── GradingCriteria.cs
│ │ │ └── GradingCriteriaSet.cs
│ │ ├── Labels
│ │ │ ├── AlignmentStationOffsetLabel.cs
│ │ │ ├── CatchmentAreaLabel.cs
│ │ │ ├── CatchmentFlowSegmentLabel.cs
│ │ │ ├── GeneralNoteLabel.cs
│ │ │ ├── GeneralSegmentLabel.cs
│ │ │ ├── IntersectionLocationLabel.cs
│ │ │ ├── Label.cs
│ │ │ ├── PipePlanLabel.cs
│ │ │ ├── ProfileViewDepthLabel.cs
│ │ │ ├── ProfileViewStationElevationLabel.cs
│ │ │ ├── SectionViewDepthLabel.cs
│ │ │ ├── SectionViewOffsetElevationLabel.cs
│ │ │ ├── StructurePlanLabel.cs
│ │ │ ├── SurfaceElevationLabel.cs
│ │ │ └── SurfaceSlopeLabel.cs
│ │ ├── QTO
│ │ │ ├── QTOCriteria.cs
│ │ │ ├── QTOCriteriaData.cs
│ │ │ └── QTOCriteriaItem.cs
│ │ └── Styles
│ │ │ ├── Band Sets
│ │ │ ├── BandSetStyle.cs
│ │ │ ├── ProfileViewBandSetStyle.cs
│ │ │ └── SectionViewBandSetStyle.cs
│ │ │ ├── Bands
│ │ │ ├── BandStyle.cs
│ │ │ ├── HorizontalGeometryBandStyle.cs
│ │ │ ├── PipeNetworkBandStyle.cs
│ │ │ ├── PressureNetworkBandStyle.cs
│ │ │ ├── ProfileDataBandStyle.cs
│ │ │ ├── SectionDataBandStyle.cs
│ │ │ ├── SectionalDataBandStyle.cs
│ │ │ ├── SuperelevationDataBandStyle.cs
│ │ │ └── VerticalGeometryBandStyle.cs
│ │ │ ├── Code Sets
│ │ │ ├── CodeSetStyle.cs
│ │ │ └── CodeSetStyleItem.cs
│ │ │ ├── DisplayStyle
│ │ │ ├── DisplayStyle.cs
│ │ │ └── DisplayStyleViewDirections.cs
│ │ │ ├── Labels
│ │ │ ├── Alignment
│ │ │ │ ├── AlignmentCurveLabelStyle.cs
│ │ │ │ ├── AlignmentLabelStyles.cs
│ │ │ │ ├── AlignmentLineLabelStyle.cs
│ │ │ │ └── AlignmentStationOffsetLabelStyle.cs
│ │ │ ├── Catchment
│ │ │ │ ├── CatchmentAreaLabelStyle.cs
│ │ │ │ ├── CatchmentFlowSegmentLabelStyle.cs
│ │ │ │ └── CatchmentLabelStyles.cs
│ │ │ ├── General
│ │ │ │ ├── GeneralCurveLabelStyle.cs
│ │ │ │ ├── GeneralLabelStyles.cs
│ │ │ │ ├── GeneralLineLabelStyle.cs
│ │ │ │ ├── GeneralLinkLabelStyle.cs
│ │ │ │ ├── GeneralMarkerLabelStyle.cs
│ │ │ │ ├── GeneralNoteLabelStyle.cs
│ │ │ │ └── GeneralShapeLabelStyle.cs
│ │ │ ├── IntersectionLocationLabelStyle.cs
│ │ │ ├── Label Style Components
│ │ │ │ ├── ComponentSettings.cs
│ │ │ │ └── LabelStyleComponent.cs
│ │ │ ├── LabelStyle.cs
│ │ │ ├── LabelStyleCollections.cs
│ │ │ ├── Match Line
│ │ │ │ ├── MatchLineLabelStyles.cs
│ │ │ │ ├── MatchLineLeftLabelStyle.cs
│ │ │ │ └── MatchLineRightLabelStyle.cs
│ │ │ ├── Parcel
│ │ │ │ ├── ParcelAreaLabelStyle.cs
│ │ │ │ ├── ParcelCurveLabelStyle.cs
│ │ │ │ ├── ParcelLabelStyles.cs
│ │ │ │ └── ParcelLineLabelStyle.cs
│ │ │ ├── Pipe
│ │ │ │ ├── PipeLabelStyles.cs
│ │ │ │ ├── PipePlanProfileLabelStyle.cs
│ │ │ │ ├── PipeProfileViewLabelStyle.cs
│ │ │ │ └── PipeSectionViewLabelStyle.cs
│ │ │ ├── PointLabelStyle.cs
│ │ │ ├── Profile View
│ │ │ │ ├── ProfileViewDepthLabelStyle.cs
│ │ │ │ ├── ProfileViewLabelStyles.cs
│ │ │ │ └── ProfileViewStationElevationLabelStyle.cs
│ │ │ ├── Profile
│ │ │ │ ├── ProfileCurveLabelStyle.cs
│ │ │ │ ├── ProfileGradeBreakLabelStyle.cs
│ │ │ │ ├── ProfileHorizontalGeometryPointLabelStyle.cs
│ │ │ │ ├── ProfileLabelStyles.cs
│ │ │ │ ├── ProfileLineLabelStyle.cs
│ │ │ │ ├── ProfileMajorStationLabelStyle.cs
│ │ │ │ └── ProfileMinorStationLabelStyle.cs
│ │ │ ├── Projection
│ │ │ │ ├── ProfileViewProjectionLabelStyle.cs
│ │ │ │ ├── ProjectionLabelStyles.cs
│ │ │ │ └── SectionViewProjectionLabelStyle.cs
│ │ │ ├── SampleLineLabelStyle.cs
│ │ │ ├── Section View
│ │ │ │ ├── SectionViewDepthLabelStyle.cs
│ │ │ │ ├── SectionViewLabelStyles.cs
│ │ │ │ └── SectionViewOffsetElevationLabelStyle.cs
│ │ │ ├── Section
│ │ │ │ ├── SectionGradeBreakLabelStyle.cs
│ │ │ │ ├── SectionLabelStyles.cs
│ │ │ │ ├── SectionMajorOffsetLabelStyle.cs
│ │ │ │ ├── SectionMinorOffsetLabelStyle.cs
│ │ │ │ └── SectionSegmentLabelStyle.cs
│ │ │ ├── StructureLabelStyle.cs
│ │ │ ├── Surface
│ │ │ │ ├── SurfaceContourLabelStyle.cs
│ │ │ │ ├── SurfaceElevationLabelStyle.cs
│ │ │ │ ├── SurfaceLabelStyles.cs
│ │ │ │ ├── SurfaceSlopeLabelStyle.cs
│ │ │ │ └── SurfaceWatershedLabelStyle.cs
│ │ │ └── ViewFrameLabelStyle.cs
│ │ │ ├── Objects
│ │ │ ├── AlignmentStyle
│ │ │ │ ├── AlignmentMarkerStyles.cs
│ │ │ │ └── AlignmentStyle.cs
│ │ │ ├── AssemblyStyle.cs
│ │ │ ├── BuildingSiteStyle.cs
│ │ │ ├── CatchmentStyle.cs
│ │ │ ├── CorridorStyle.cs
│ │ │ ├── FeatureLineStyle.cs
│ │ │ ├── GradingStyle.cs
│ │ │ ├── GroupPlotStyle.cs
│ │ │ ├── InterferenceStyle.cs
│ │ │ ├── IntersectionStyle.cs
│ │ │ ├── LinkStyle.cs
│ │ │ ├── MarkerStyle.cs
│ │ │ ├── MassHaulLineStyle.cs
│ │ │ ├── MatchLineStyle.cs
│ │ │ ├── ObjectStyleCollections.cs
│ │ │ ├── ParcelStyle.cs
│ │ │ ├── PipeStyle.cs
│ │ │ ├── ProfileStyle
│ │ │ │ ├── ProfileMarkerStyles.cs
│ │ │ │ └── ProfileStyle.cs
│ │ │ ├── SampleLineStyle.cs
│ │ │ ├── SectionStyle.cs
│ │ │ ├── ShapeStyle.cs
│ │ │ ├── SheetStyle.cs
│ │ │ ├── SlopePatternStyle.cs
│ │ │ ├── StructureStyle.cs
│ │ │ ├── SurfaceStyle.cs
│ │ │ └── ViewFrameStyle.cs
│ │ │ ├── Style.cs
│ │ │ ├── StyleCollections.cs
│ │ │ ├── StyleSupport.cs
│ │ │ └── Views
│ │ │ ├── AxisStyle.cs
│ │ │ ├── AxisTickStyle.cs
│ │ │ ├── AxisTitleStyle.cs
│ │ │ ├── CantViewStyle.cs
│ │ │ ├── GridStyle.cs
│ │ │ ├── MassHaulViewStyle.cs
│ │ │ ├── ProfileViewStyle.cs
│ │ │ ├── SectionViewStyle.cs
│ │ │ ├── SuperelevationViewStyle.cs
│ │ │ ├── ViewStyle.cs
│ │ │ ├── ViewStyleCollections.cs
│ │ │ └── ViewTitleStyle.cs
│ ├── DynamoExtensions
│ │ └── Geometry
│ │ │ ├── BoundingBoxExtensions.cs
│ │ │ ├── CurveExtensions.cs
│ │ │ ├── PlaneExtensions.cs
│ │ │ └── PointExtensions.cs
│ ├── External
│ │ ├── External Objects
│ │ │ ├── ExternalBlockReference.cs
│ │ │ ├── ExternalDBPoint.cs
│ │ │ ├── ExternalLayer.cs
│ │ │ ├── ExternalMText.cs
│ │ │ ├── ExternalObject.cs
│ │ │ └── ExternalObjectBase.cs
│ │ ├── ExternalBlock.cs
│ │ ├── ExternalDocument.cs
│ │ └── ExternalLayout.cs
│ ├── LandXML
│ │ └── LandXML.cs
│ ├── NodeMigrationMappingAttribute.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── Tools
│ │ └── ModelText.cs
│ └── Utilities
│ │ ├── GeometryConversions.cs
│ │ ├── Globals.cs
│ │ ├── MathUtilities.cs
│ │ ├── ReflectionUtilities.cs
│ │ └── StringUtilities.cs
├── CamberUI
│ ├── AutoCAD
│ │ ├── AutoCADEnumDropDowns.cs
│ │ ├── ConvertToCamberObject.cs
│ │ ├── NamedPageSetupsDropDown.cs
│ │ └── TextStylesDropDown.cs
│ ├── CamberUI.csproj
│ ├── Civil
│ │ ├── CivilEnumDropDowns.cs
│ │ ├── CivilObjects
│ │ │ └── TimeOfConcentrationCalculationMethodsDropDown.cs
│ │ ├── CoordinateSystemCodesDropDown.cs
│ │ ├── Data Shortcuts
│ │ │ ├── GetCurrentProject.cs
│ │ │ ├── GetWorkingFolder.cs
│ │ │ ├── Refresh.cs
│ │ │ ├── SetWorkingFolder.cs
│ │ │ └── Validate.cs
│ │ ├── Design Checks
│ │ │ ├── DesignCheckDropDowns.cs
│ │ │ └── DesignCheckEnumDropDowns.cs
│ │ ├── GradingCriteriaDropDowns.cs
│ │ ├── GradingCriteriaEnumDropDowns.cs
│ │ ├── QTODropDowns.cs
│ │ ├── QTOEnumDropDowns.cs
│ │ └── Styles
│ │ │ ├── AlignmentLabelSetStyleNamesDropDown.cs
│ │ │ ├── CodeSetStyleDropDown.cs
│ │ │ ├── Label Styles
│ │ │ ├── AlignmentLabelStyleDropDowns.cs
│ │ │ ├── CatchmentLabelStyleDropDowns.cs
│ │ │ ├── GeneralLabelStylesDropDown.cs
│ │ │ ├── IntersectionLabelStyleDropDowns.cs
│ │ │ ├── LabelStyleDropDownBase.cs
│ │ │ ├── MatchLineLabelStyleDropDowns.cs
│ │ │ ├── ParcelLabelStyleDropDowns.cs
│ │ │ ├── PipeLabelStyleDropDowns.cs
│ │ │ ├── PointLabelStyleDropDowns.cs
│ │ │ ├── ProfileLabelStyleDropDowns.cs
│ │ │ ├── ProfileViewLabelStyleDropDowns.cs
│ │ │ ├── ProjectionLabelStyleDropDowns.cs
│ │ │ ├── SampleLineLabelStyleDropDowns.cs
│ │ │ ├── SectionLabelStyleDropDowns.cs
│ │ │ ├── SectionViewLabelStyleDropDowns.cs
│ │ │ ├── StructureLabelStyleDropDowns.cs
│ │ │ ├── SurfaceLabelStyleDropDowns.cs
│ │ │ └── ViewFrameLabelStyleDropDowns.cs
│ │ │ ├── Object Styles
│ │ │ ├── ObjectStyleDropDowns.cs
│ │ │ ├── Pipe Styles
│ │ │ │ ├── PipeStylePlanOptionsDropDown.cs
│ │ │ │ └── PipeStyleProfileOptionsDropDown.cs
│ │ │ └── Structure Styles
│ │ │ │ ├── StructureStyleModelOptionsDropDown.cs
│ │ │ │ ├── StructureStylePlanOptionsDropDown.cs
│ │ │ │ ├── StructureStyleProfileOptionsDropDown.cs
│ │ │ │ └── StructureStyleSectionOptionsDropDown.cs
│ │ │ ├── StyleDropDownBase.cs
│ │ │ ├── StyleEnumDropDowns.cs
│ │ │ └── ViewStyleDropDowns.cs
│ ├── EnumDropDownBase.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ └── Tools
│ │ └── ModelText
│ │ ├── SystemFontsDropDown.cs
│ │ └── TextAlignmentDropDown.cs
└── MigrationAssistant
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── Camber.Migrations.xml
│ ├── GenerateMigrationsXML.bat
│ ├── GenerateMigrationsXML.py
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── MigrationAssistant.csproj
│ ├── MigrationResult.cs
│ ├── MigrationViewModel.cs
│ ├── MigrationWorker.cs
│ ├── README.md
│ └── RelayCommand.cs
└── tests
├── Alignment
├── AlignmentCreationTests.dwg
├── AlignmentCreationTests.dyn
├── AlignmentTests.dwg
└── AlignmentTests.dyn
├── CodeSetStyles
├── CodeSetStyleTests.dwg
└── CodeSetStyleTests.dyn
├── DisplayStyles
├── DisplayStyleTests.dwg
└── DisplayStyleTests.dyn
├── Document
├── DocumentSettingsTests.dwg
└── DrawingSettingsTests.dyn
├── ExternalBlockReference
├── ExternalBlockReferenceTests.dwg
└── ExternalBlockReferenceTests.dyn
├── ExternalDBPoint
├── ExternalDBPointTests.dwg
└── ExternalDBPointTests.dyn
├── ExternalDocument
├── ExternalDocumentSettingsTests.dyn
├── ExternalDocumentTests.dwg
└── ExternalDocumentTests.dyn
├── ExternalLayout
├── ExternalLayoutTests.dwg
└── ExternalLayoutTests.dyn
├── ExternalMText
├── ByPoint.dyn
├── ExternalMTextTests.dwg
├── GetProperties.dyn
└── SetProperties.dyn
├── Fields
├── FieldTests.dwg
└── FieldTests.dyn
├── GridSurface
├── 491_926.asc
├── 491_927.asc
├── 491_928.asc
├── 491_929.asc
├── 491_930.asc
├── 491_931.asc
├── GridSurfaceTests.dwg
└── GridSurfaceTests.dyn
├── LandXML
├── LandXMLTest.xml
├── LandXML_Export.dwg
├── LandXML_Export.dyn
├── LandXML_Import.dwg
├── LandXML_Import.dyn
└── LandXML_ReadData.dyn
├── Layouts
├── LayoutTests.dwg
└── LayoutTests.dyn
├── MText
├── MTextTests.dwg
└── MTextTests.dyn
├── MVBlocks
├── MVBlockTests.dwg
└── MVBlocksTest.dyn
├── MigrationTests
├── AlignmentMigrationTests.dyn
├── BlockMigrationTests.dyn
├── CivilObjectMigrationTests.dyn
├── DocumentMigrationTests.dyn
├── LayerMigrationTests.dyn
├── LayoutMigrationTests.dyn
├── MTextMigrationTests.dyn
├── MultileaderMigrationTests.dyn
├── ObjectMigrationTests.dyn
├── PartMigrationTests.dyn
├── PipeMigrationTests.dyn
├── PipeNetworkMigrationTests.dyn
├── Polyline3DMigrationTests.dyn
├── PolylineMigrationTests.dyn
├── PressureNetworkMigrationTests.dyn
├── PressurePartMigrationTests.dyn
├── ProfileViewMigrationTests.dyn
├── SampleLineGroupMigrationTests.dyn
├── SampleLineMigrationTests.dyn
├── SurfaceMigrationTests.dyn
├── TextMigrationTests.dyn
└── TinSurfaceMigrationTests.dyn
├── Parcels
├── ParcelTest.dyn
└── ParcelsTest.dwg
├── Pipe Networks
├── PipeNetwork_AddStructure.dwg
├── PipeNetwork_AddStructure.dyn
├── PipeNetwork_ConnectStructureToPipe.dwg
└── PipeNetwork_ConnectStructureToPipe.dyn
├── Polylines
├── PolylineTests.dwg
└── PolylineTests.dyn
├── Surface
├── BoundaryTests.dwg
└── BoundaryTests.dyn
├── TINSurface
└── TINSurface_CreateFromDEMTest.dyn
├── TINVolumeSurface
├── TINVolumeSurfaceTests.dwg
└── TINVolumeSurfaceTests.dyn
└── Xref
├── Xref01.dwg
├── Xref02.dwg
├── XrefTests.dwg
└── XrefTests.dyn
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2022, Zachri Jensen
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | 1. Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | 2. Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | 3. Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/ACA/AecBaseMgd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/ACA/AecBaseMgd.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/C3D/AeccDataShortcutMgd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/C3D/AeccDataShortcutMgd.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/C3D/AeccDbMgd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/C3D/AeccDbMgd.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/C3D/AeccPressurePipesMgd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/C3D/AeccPressurePipesMgd.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/C3D/Dynamo/AcDynamoServices.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/C3D/Dynamo/AcDynamoServices.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/C3D/Dynamo/AutoCADNodes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/C3D/Dynamo/AutoCADNodes.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/C3D/Dynamo/Civil3DNodes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/C3D/Dynamo/Civil3DNodes.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/C3D/Dynamo/Core/DSCoreNodes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/C3D/Dynamo/Core/DSCoreNodes.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/accoremgd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/accoremgd.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/acdbmgd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/acdbmgd.dll
--------------------------------------------------------------------------------
/lib/Autodesk/AutoCAD 2025/acmgd.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/lib/Autodesk/AutoCAD 2025/acmgd.dll
--------------------------------------------------------------------------------
/src/Builder/Builder.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0
5 | enable
6 | enable
7 | false
8 | bin\
9 | Library
10 |
11 | true
12 |
13 | false
14 |
15 | none
16 | OnOutputUpdated
17 |
18 |
19 |
20 |
21 | Never
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/Builder/CreatePackage.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal
3 |
4 | echo Starting to create package...
5 |
6 | set "BuildConfig=Debug"
7 | set "C3DVersion=2025"
8 | set "DynamoVersion=3.2"
9 | set "PackageName=Camber"
10 | set "CamberSourceDir=%CD%\..\Camber\bin\%BuildConfig%"
11 | set "CamberUISourceDir=%CD%\..\CamberUI\bin\%BuildConfig%"
12 | set "AssistantSourceDir=%CD%\..\MigrationAssistant\bin\%BuildConfig%"
13 | set "DestDir=%APPDATA%\Autodesk\C3D %C3DVersion%\Dynamo\%DynamoVersion%\packages\%PackageName%"
14 |
15 | echo Camber source directory: %CamberSourceDir%
16 | echo Camber UI source directory: %CamberUISourceDir%
17 | echo Migration assistant source directory: %AssistantSourceDir%
18 | echo Package directory: %DestDir%
19 |
20 | if exist "%DestDir%" (
21 | echo Deleting existing package directory...
22 | rmdir /s /q "%DestDir%"
23 | )
24 |
25 | mkdir "%DestDir%\bin"
26 | mkdir "%DestDir%\extra\MigrationAssistant"
27 |
28 | echo Copying built source files...
29 | xcopy "%CamberSourceDir%\*" "%DestDir%\bin" /s /i /y
30 | xcopy "%CamberUISourceDir%\*" "%DestDir%\bin" /s /i /y
31 |
32 | echo Copying pkg.json...
33 | copy "%~dp0pkg.json" "%DestDir%" /y
34 |
35 | echo Copying extras...
36 | xcopy "%AssistantSourceDir%\*" "%DestDir%\extra\MigrationAssistant" /s /i /y
37 |
38 | echo Finished creating '%PackageName%' package
39 |
40 | endlocal
--------------------------------------------------------------------------------
/src/Builder/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Civil 3D 2025": {
4 | "commandName": "Executable",
5 | "executablePath": "C:\\Program Files\\Autodesk\\AutoCAD 2025\\acad.exe"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/Builder/pkg.json:
--------------------------------------------------------------------------------
1 | {
2 | "license": "BSD-3 Clause",
3 | "file_hash": null,
4 | "name": "Camber",
5 | "version": "5.0.0",
6 | "description": "An open source Dynamo package for Civil 3D.",
7 | "group": "",
8 | "keywords": [ "civil", "engineering", "infrastructure" ],
9 | "dependencies": [],
10 | "host_dependencies": [ "Civil 3D" ],
11 | "contents": "",
12 | "engine_version": "3.2.2.5494",
13 | "engine": "dynamo",
14 | "engine_metadata": "",
15 | "site_url": "",
16 | "repository_url": "https://github.com/mzjensen/Camber",
17 | "contains_binaries": true,
18 | "node_libraries": [
19 | "Camber, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null",
20 | "CamberUI, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null"
21 | ]
22 | }
--------------------------------------------------------------------------------
/src/Camber/AutoCAD/Objects/BlockReferenceExtensions.cs:
--------------------------------------------------------------------------------
1 | using Dynamo.Graph.Nodes;
2 | using System.Collections.Generic;
3 | using AcAttRef = Autodesk.AutoCAD.DatabaseServices.AttributeReference;
4 | using AcBlockReference = Autodesk.AutoCAD.DatabaseServices.BlockReference;
5 | using acDb = Autodesk.AutoCAD.DatabaseServices;
6 | using acDynApp = Autodesk.AutoCAD.DynamoApp.Services;
7 | using acDynNodes = Autodesk.AutoCAD.DynamoNodes;
8 |
9 | namespace Camber.AutoCAD.Objects
10 | {
11 | public static class BlockReference
12 | {
13 | #region query methods
14 | ///
15 | /// Gets the Attribute References in a Block Reference.
16 | ///
17 | ///
18 | ///
19 | [NodeCategory("Query")]
20 | public static List AttributeReferences(this acDynNodes.BlockReference blockReference)
21 | {
22 | acDynNodes.Document document = acDynNodes.Document.Current;
23 | var attRefs = new List();
24 |
25 | using (var ctx = new acDynApp.DocumentContext(document.AcDocument))
26 | {
27 | var acBlkRef = (AcBlockReference)ctx.Transaction.GetObject(blockReference.InternalObjectId, acDb.OpenMode.ForRead);
28 | foreach (acDb.ObjectId oid in acBlkRef.AttributeCollection)
29 | {
30 | attRefs.Add(AttributeReference.GetByObjectId(oid));
31 | }
32 | }
33 | return attRefs;
34 | }
35 | #endregion
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Camber/AutoCAD/Objects/ObjectSupport.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System;
3 | using acDb = Autodesk.AutoCAD.DatabaseServices;
4 | using acDynApp = Autodesk.AutoCAD.DynamoApp.Services;
5 | using acDynNodes = Autodesk.AutoCAD.DynamoNodes;
6 | using Autodesk.DesignScript.Runtime;
7 | #endregion
8 |
9 | namespace Camber.AutoCAD.Objects
10 | {
11 | [SupressImportIntoVM]
12 | internal static class ObjectSupport
13 | {
14 | public static T Get(acDb.ObjectId oid, Func creator)
15 | where T : acDynNodes.Object
16 | where U : acDb.DBObject
17 | {
18 | acDynNodes.Document document = acDynNodes.Document.Current;
19 | using (acDynApp.DocumentContext ctx = new acDynApp.DocumentContext(document.AcDocument))
20 | {
21 | U acObject = ctx.Transaction.GetObject(oid, acDb.OpenMode.ForWrite) as U;
22 | return creator(acObject);
23 | }
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Camber/AutoCAD/Objects/Polylines/PolylineVertex.cs:
--------------------------------------------------------------------------------
1 | using acDb = Autodesk.AutoCAD.DatabaseServices;
2 | using acGeom = Autodesk.AutoCAD.Geometry;
3 |
4 | namespace Camber.AutoCAD.Objects
5 | {
6 | internal sealed class PolylineVertex
7 | {
8 | #region properties
9 | ///
10 | /// Gets the index of this .
11 | ///
12 | public int Index { get; }
13 |
14 | ///
15 | /// Gets the of this .
16 | ///
17 | public acGeom.Point3d AcPoint { get; }
18 |
19 | ///
20 | /// Gets the of this , if applicable.
21 | ///
22 | public acDb.PolylineVertex3d Vertex3d { get; }
23 | #endregion
24 |
25 | #region constructors
26 | ///
27 | /// Creates a new by index and .
28 | ///
29 | /// The index.
30 | /// The AutoCAD Point3d.
31 | internal PolylineVertex(int index, acGeom.Point3d acPoint)
32 | {
33 | Index = index;
34 | AcPoint = acPoint;
35 | Vertex3d = null;
36 | }
37 |
38 | ///
39 | /// Creates a new by .
40 | ///
41 | /// The PolylineVertex3d
42 | internal PolylineVertex(acDb.PolylineVertex3d vertex3d)
43 | {
44 | AcPoint = vertex3d.Position;
45 | Vertex3d = vertex3d;
46 | }
47 | #endregion
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/CivilObjectSupport.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System;
3 | using acDb = Autodesk.AutoCAD.DatabaseServices;
4 | using acDynApp = Autodesk.AutoCAD.DynamoApp.Services;
5 | using acDynNodes = Autodesk.AutoCAD.DynamoNodes;
6 | using civDynNodes = Autodesk.Civil.DynamoNodes;
7 | using AeccEntity = Autodesk.Civil.DatabaseServices.Entity;
8 | using Autodesk.DesignScript.Runtime;
9 | #endregion
10 |
11 | namespace Camber.Civil.CivilObjects
12 | {
13 | [SupressImportIntoVM]
14 | internal static class CivilObjectSupport
15 | {
16 | public static T Get(acDb.ObjectId id, Func creator)
17 | where T : civDynNodes.CivilObject
18 | where U : AeccEntity
19 | {
20 | acDynNodes.Document document = acDynNodes.Document.Current;
21 | using (acDynApp.DocumentContext ctx = new acDynApp.DocumentContext(document.AcDocument))
22 | {
23 | U aeccObject = ctx.Transaction.GetObject(id, acDb.OpenMode.ForWrite) as U;
24 | return creator(aeccObject);
25 | }
26 | }
27 |
28 | ///
29 | /// Checks whether the Entity is a reference object. A reference object is located in another drawing, and linked using a data shortcut or through Autodesk Vault.
30 | ///
31 | ///
32 | public static void CheckForReference(AeccEntity entity)
33 | {
34 | if (entity.IsReferenceObject || entity.IsReferenceSubObject)
35 | {
36 | throw new InvalidOperationException("Object is referenced and cannot be changed!");
37 | }
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Feature Line/FeatureLineSegmentType.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using Autodesk.DesignScript.Runtime;
3 | #endregion
4 |
5 | namespace Camber.Civil.CivilObjects
6 | {
7 | [IsVisibleInDynamoLibrary(false)]
8 | public enum FeatureLineSegmentType
9 | {
10 | Line,
11 | Arc,
12 | Helix
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Pipe Networks/Rule Sets/RuleSet.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccRuleSet = Autodesk.Civil.DatabaseServices.Styles.NetworkRuleSetStyle;
4 | using Camber.Civil.Styles;
5 | #endregion
6 |
7 | namespace Camber.Civil.PipeNetworks
8 | {
9 | public class RuleSet : Style
10 | {
11 | #region properties
12 | internal AeccRuleSet AeccRuleSet => AcObject as AeccRuleSet;
13 | #endregion
14 |
15 | #region constructors
16 | internal RuleSet(AeccRuleSet aeccRuleSet, bool isDynamoOwned = false) : base(aeccRuleSet, isDynamoOwned) { }
17 |
18 | internal static RuleSet GetByObjectId(acDb.ObjectId ruleSetId)
19 | => StyleSupport.Get
20 | (ruleSetId, (ruleSet) => new RuleSet(ruleSet));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"RuleSet(Name = {Name})";
25 |
26 | ///
27 | /// Remove all rules that belong to the Rule Set.
28 | ///
29 | ///
30 | public RuleSet RemoveAllRules()
31 | {
32 | bool openedForWrite = AeccRuleSet.IsWriteEnabled;
33 | if (!openedForWrite) AeccRuleSet.UpgradeOpen();
34 | AeccRuleSet.RemoveAllRules();
35 | if (!openedForWrite) AeccStyle.DowngradeOpen();
36 | return this;
37 | }
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Pressure Networks/Pressure Parts/PressureAppurtenance.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccPressureAppurtenance = Autodesk.Civil.DatabaseServices.PressureAppurtenance;
4 | using Autodesk.DesignScript.Runtime;
5 | using Camber.Civil.CivilObjects;
6 | #endregion
7 |
8 | namespace Camber.Civil.PressureNetworks.Parts
9 | {
10 | public sealed class PressureAppurtenance : PressurePart
11 | {
12 | #region properties
13 | internal AeccPressureAppurtenance AeccPressureAppurtenance => AcObject as AeccPressureAppurtenance;
14 | #endregion
15 |
16 | #region constructors
17 | internal PressureAppurtenance(AeccPressureAppurtenance aeccPressureAppurtenance, bool isDynamoOwned = false) : base(aeccPressureAppurtenance, isDynamoOwned) { }
18 |
19 | [SupressImportIntoVM]
20 | internal static PressureAppurtenance GetByObjectId(acDb.ObjectId appurtenanceId)
21 | => CivilObjectSupport.Get
22 | (appurtenanceId, (appurtenance) => new PressureAppurtenance(appurtenance));
23 | #endregion
24 |
25 | #region methods
26 | public override string ToString() => $"PressureAppurtenance(Name = {Name})";
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Pressure Networks/Pressure Parts/PressureFitting.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccPressureFitting = Autodesk.Civil.DatabaseServices.PressureFitting;
4 | using Autodesk.DesignScript.Runtime;
5 | using Camber.Civil.CivilObjects;
6 | #endregion
7 |
8 | namespace Camber.Civil.PressureNetworks.Parts
9 | {
10 | public sealed class PressureFitting : PressurePart
11 | {
12 | #region properties
13 | internal AeccPressureFitting AeccPressureFitting => AcObject as AeccPressureFitting;
14 | #endregion
15 |
16 | #region constructors
17 | internal PressureFitting(AeccPressureFitting aeccPressureFitting, bool isDynamoOwned = false) : base(aeccPressureFitting, isDynamoOwned) { }
18 |
19 | [SupressImportIntoVM]
20 | internal static PressureFitting GetByObjectId(acDb.ObjectId fittingId)
21 | => CivilObjectSupport.Get
22 | (fittingId, (fitting) => new PressureFitting(fitting));
23 | #endregion
24 |
25 | #region methods
26 | public override string ToString() => $"PressureFitting(Name = {Name})";
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Pressure Networks/Pressure Parts/PressurePipe.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccPressurePipe = Autodesk.Civil.DatabaseServices.PressurePipe;
4 | using Autodesk.DesignScript.Runtime;
5 | using Camber.Civil.CivilObjects;
6 | #endregion
7 |
8 | namespace Camber.Civil.PressureNetworks.Parts
9 | {
10 | public sealed class PressurePipe : PressurePart
11 | {
12 | #region properties
13 | internal AeccPressurePipe AeccPressurePipe => AcObject as AeccPressurePipe;
14 | #endregion
15 |
16 | #region constructors
17 | internal PressurePipe(AeccPressurePipe aeccPressurePipe, bool isDynamoOwned = false) : base(aeccPressurePipe, isDynamoOwned) { }
18 |
19 | [SupressImportIntoVM]
20 | internal static PressurePipe GetByObjectId(acDb.ObjectId pipeId)
21 | => CivilObjectSupport.Get
22 | (pipeId, (pipe) => new PressurePipe(pipe));
23 | #endregion
24 |
25 | #region methods
26 | public override string ToString() => $"PressurePipe(Name = {Name})";
27 | #endregion
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Pressure Networks/PressurePartSize.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using AeccPressurePartSize = Autodesk.Civil.DatabaseServices.Styles.PressurePartSize;
3 | #endregion
4 |
5 | namespace Camber.Civil.PressureNetworks
6 | {
7 | public class PressurePartSize
8 | {
9 | #region properties
10 | internal AeccPressurePartSize AeccPressurePartSize { get; set; }
11 |
12 | ///
13 | /// Gets the description of a Pressure Part Size.
14 | ///
15 | public string Description => AeccPressurePartSize.Description;
16 |
17 | ///
18 | /// Gets whether a Pressure Part Size is a Pipe, Fitting, or Appurtenance.
19 | ///
20 | public string Domain => AeccPressurePartSize.Domain.ToString();
21 |
22 | ///
23 | /// Gets the type of a Pressure Part Size.
24 | ///
25 | public string Type => AeccPressurePartSize.PartType.ToString();
26 | #endregion
27 |
28 | #region constructors
29 | internal PressurePartSize(AeccPressurePartSize aeccPressurePartSize)
30 | {
31 | AeccPressurePartSize = aeccPressurePartSize;
32 | }
33 | #endregion
34 |
35 | #region methods
36 | public override string ToString() => $"PressurePartSize(Domain = {Domain}, Type = {Type})";
37 | #endregion
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Profile.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using acDynNodes = Autodesk.AutoCAD.DynamoNodes;
4 | using acDynApp = Autodesk.AutoCAD.DynamoApp.Services;
5 | using civDynNodes = Autodesk.Civil.DynamoNodes;
6 | using AeccProfile = Autodesk.Civil.DatabaseServices.Profile;
7 | #endregion
8 |
9 | namespace Camber.Civil.CivilObjects
10 | {
11 | public static class Profile
12 | {
13 | #region methods
14 | ///
15 | /// Gets a Dynamo-wrapped Profile by Object ID.
16 | ///
17 | ///
18 | ///
19 | internal static civDynNodes.Profile GetFromObjectId(acDb.ObjectId profId)
20 | {
21 | acDynNodes.Document document = acDynNodes.Document.Current;
22 | try
23 | {
24 | using (acDynApp.DocumentContext ctx = new acDynApp.DocumentContext(document.AcDocument))
25 | {
26 | var aeccProfile = ctx.Transaction.GetObject(profId, acDb.OpenMode.ForWrite) as AeccProfile;
27 | var parentAlign = Alignment.GetByObjectId(aeccProfile.AlignmentId);
28 | return parentAlign.ProfileByName(aeccProfile.Name);
29 | }
30 | }
31 | catch { throw; }
32 | }
33 | #endregion
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Surfaces/GridSurfaceVertex.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Geometry;
2 | using Camber.Utilities.GeometryConversions;
3 | using AeccGridSurfaceVertex = Autodesk.Civil.DatabaseServices.GridSurfaceVertex;
4 |
5 | namespace Camber.Civil.CivilObjects.Surfaces
6 | {
7 | public sealed class GridSurfaceVertex
8 | {
9 | #region properties
10 | internal AeccGridSurfaceVertex AeccGridSurfaceVertex { get; }
11 |
12 | ///
13 | /// Gets the column index of a Grid Surface Vertex.
14 | ///
15 | public int ColumnIndex => AeccGridSurfaceVertex.GridLocation.ColumnIndex;
16 |
17 | ///
18 | /// Gets the row index of a Grid Surface Vertex.
19 | ///
20 | public int RowIndex => AeccGridSurfaceVertex.GridLocation.RowIndex;
21 |
22 | ///
23 | /// Gets the Grid Surface that a Grid Surface Vertex belongs to.
24 | ///
25 | public GridSurface Surface => GridSurface.GetByObjectId(AeccGridSurfaceVertex.Surface.ObjectId);
26 |
27 | ///
28 | /// Gets the Dynamo point geometry of a Grid Surface Vertex.
29 | ///
30 | public Point Geometry => GeometryConversions.AcPointToDynPoint(AeccGridSurfaceVertex.Location);
31 | #endregion
32 |
33 | #region constructors
34 | internal GridSurfaceVertex(AeccGridSurfaceVertex aeccGridSurfaceVertex)
35 | {
36 | AeccGridSurfaceVertex = aeccGridSurfaceVertex;
37 | }
38 | #endregion
39 |
40 | #region methods
41 | public override string ToString() => $"{nameof(GridSurfaceVertex)}(Row index = {RowIndex}, Column index = {ColumnIndex})";
42 | #endregion
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Surfaces/GridVolumeSurface.cs:
--------------------------------------------------------------------------------
1 | namespace Camber.Civil.CivilObjects.Surfaces
2 | {
3 | internal class GridVolumeSurface
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/Camber/Civil/CivilObjects/Surfaces/ICamberSurface.cs:
--------------------------------------------------------------------------------
1 | using civDynNodes = Autodesk.Civil.DynamoNodes;
2 |
3 | namespace Camber.Civil.CivilObjects.Surfaces
4 | {
5 | internal interface ICamberSurface
6 | {
7 | civDynNodes.Surface AsSurface();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Design Checks/DesignCheckSetCollections.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.DesignChecks
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum DesignCheckSetCollections
7 | {
8 | AlignmentDesignCheckSets,
9 | ProfileDesignCheckSets
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Band Sets/BandSetStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccBandSetStyle = Autodesk.Civil.DatabaseServices.Styles.BandSetStyle;
4 | using Autodesk.DesignScript.Runtime;
5 | #endregion
6 |
7 | namespace Camber.Civil.Styles.BandSets
8 | {
9 | [IsVisibleInDynamoLibrary(false)]
10 | public class BandSetStyle : Style
11 | {
12 | #region properties
13 | internal AeccBandSetStyle AeccBandSetStyle => AcObject as AeccBandSetStyle;
14 |
15 | ///
16 | /// Gets whether the data band major/minor interval distances for Profile/Section Views
17 | /// matches the Profile/Section View Style's major/minor grid spacing intervals.
18 | ///
19 | public bool MatchIncrementToGridIntervals => GetBool();
20 | #endregion
21 |
22 | #region constructors
23 | internal BandSetStyle(AeccBandSetStyle aeccBandSetStyle, bool isDynamoOwned = false) : base(aeccBandSetStyle, isDynamoOwned) { }
24 |
25 | internal static BandSetStyle GetByObjectId(acDb.ObjectId bandSetStyleId)
26 | => StyleSupport.Get
27 | (bandSetStyleId, (bandSetStyle) => new BandSetStyle(bandSetStyle));
28 | #endregion
29 |
30 | #region methods
31 | public override string ToString() => $"BandSetStyle(Name = {Name})";
32 |
33 | ///
34 | /// Sets whether the data band major/minor interval distances for Profile/Section Views
35 | /// matches the Profile/Section View Style's major/minor grid spacing intervals.
36 | ///
37 | ///
38 | ///
39 | public BandSetStyle SetMatchIncrementToGridIntervals(bool @bool)
40 | {
41 | SetValue(@bool);
42 | return this;
43 | }
44 | #endregion
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Band Sets/ProfileViewBandSetStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccProfileViewBandSetStyle = Autodesk.Civil.DatabaseServices.Styles.ProfileViewBandSetStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.BandSets
7 | {
8 | public sealed class ProfileViewBandSetStyle : BandSetStyle
9 | {
10 | #region properties
11 | internal AeccProfileViewBandSetStyle AeccProfileViewBandSetStyle => AcObject as AeccProfileViewBandSetStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal ProfileViewBandSetStyle(AeccProfileViewBandSetStyle aeccProfileViewBandSetStyle, bool isDynamoOwned = false) : base(aeccProfileViewBandSetStyle, isDynamoOwned) { }
16 |
17 | internal static ProfileViewBandSetStyle GetByObjectId(acDb.ObjectId profileViewBandSetStyleId)
18 | => StyleSupport.Get
19 | (profileViewBandSetStyleId, (profileViewBandSetStyle) => new ProfileViewBandSetStyle(profileViewBandSetStyle));
20 | #endregion
21 |
22 | #region methods
23 | public override string ToString() => $"ProfileViewBandSetStyle(Name = {Name})";
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Band Sets/SectionViewBandSetStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccSectionViewBandSetStyle = Autodesk.Civil.DatabaseServices.Styles.SectionViewBandSetStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.BandSets
7 | {
8 | public sealed class SectionViewBandSetStyle : BandSetStyle
9 | {
10 | #region properties
11 | internal AeccSectionViewBandSetStyle AeccSectionViewBandSetStyle => AcObject as AeccSectionViewBandSetStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal SectionViewBandSetStyle(AeccSectionViewBandSetStyle aeccSectionViewBandSetStyle, bool isDynamoOwned = false) : base(aeccSectionViewBandSetStyle, isDynamoOwned) { }
16 |
17 | internal static SectionViewBandSetStyle GetByObjectId(acDb.ObjectId sectionViewBandSetStyleId)
18 | => StyleSupport.Get
19 | (sectionViewBandSetStyleId, (sectionViewBandSetStyle) => new SectionViewBandSetStyle(sectionViewBandSetStyle));
20 | #endregion
21 |
22 | #region methods
23 | public override string ToString() => $"SectionViewBandSetStyle(Name = {Name})";
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Bands/HorizontalGeometryBandStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccHorizontalGeometryBandStyle = Autodesk.Civil.DatabaseServices.Styles.HorizontalGeometryBandStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Bands
7 | {
8 | public sealed class HorizontalGeometryBandStyle : BandStyle
9 | {
10 | #region properties
11 | internal AeccHorizontalGeometryBandStyle AeccHorizontalGeometryBandStyle => AcObject as AeccHorizontalGeometryBandStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal HorizontalGeometryBandStyle(AeccHorizontalGeometryBandStyle aeccHorizontalGeometryBandStyle, bool isDynamoOwned = false)
16 | : base(aeccHorizontalGeometryBandStyle, isDynamoOwned) { }
17 |
18 | internal static HorizontalGeometryBandStyle GetByObjectId(acDb.ObjectId horizontalGeometryBandStyleId)
19 | => StyleSupport.Get
20 | (horizontalGeometryBandStyleId, (horizontalGeometryBandStyle) => new HorizontalGeometryBandStyle(horizontalGeometryBandStyle));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"HorizontalGeometryBandStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Bands/PipeNetworkBandStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccPipeNetworkBandStyle = Autodesk.Civil.DatabaseServices.Styles.PipeNetworkBandStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Bands
7 | {
8 | public sealed class PipeNetworkBandStyle : BandStyle
9 | {
10 | #region properties
11 | internal AeccPipeNetworkBandStyle AeccPipeNetworkBandStyle => AcObject as AeccPipeNetworkBandStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal PipeNetworkBandStyle(AeccPipeNetworkBandStyle aeccPipeNetworkBandStyle, bool isDynamoOwned = false)
16 | : base(aeccPipeNetworkBandStyle, isDynamoOwned) { }
17 |
18 | internal static PipeNetworkBandStyle GetByObjectId(acDb.ObjectId pipeNetworkBandStyleId)
19 | => StyleSupport.Get
20 | (pipeNetworkBandStyleId, (pipeNetworkBandStyle) => new PipeNetworkBandStyle(pipeNetworkBandStyle));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"PipeNetworkBandStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Bands/PressureNetworkBandStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccPressureNetworkBandStyle = Autodesk.Civil.DatabaseServices.Styles.PressureNetworkBandStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Bands
7 | {
8 | public sealed class PressureNetworkBandStyle : BandStyle
9 | {
10 | #region properties
11 | internal AeccPressureNetworkBandStyle AeccPressureNetworkBandStyle => AcObject as AeccPressureNetworkBandStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal PressureNetworkBandStyle(AeccPressureNetworkBandStyle aeccPressureNetworkBandStyle, bool isDynamoOwned = false)
16 | : base(aeccPressureNetworkBandStyle, isDynamoOwned) { }
17 |
18 | internal static PressureNetworkBandStyle GetByObjectId(acDb.ObjectId pressureNetworkBandStyleId)
19 | => StyleSupport.Get
20 | (pressureNetworkBandStyleId, (pressureNetworkBandStyle) => new PressureNetworkBandStyle(pressureNetworkBandStyle));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"PressureNetworkBandStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Bands/ProfileDataBandStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccProfileDataBandStyle = Autodesk.Civil.DatabaseServices.Styles.ProfileDataBandStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Bands
7 | {
8 | public sealed class ProfileDataBandStyle : BandStyle
9 | {
10 | #region properties
11 | internal AeccProfileDataBandStyle AeccProfileDataBandStyle => AcObject as AeccProfileDataBandStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal ProfileDataBandStyle(AeccProfileDataBandStyle aeccPipeNetworkBandStyle, bool isDynamoOwned = false)
16 | : base(aeccPipeNetworkBandStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileDataBandStyle GetByObjectId(acDb.ObjectId profileDataBandStyleId)
19 | => StyleSupport.Get
20 | (profileDataBandStyleId, (profileDataBandStyle) => new ProfileDataBandStyle(profileDataBandStyle));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"ProfileDataBandStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Bands/SectionDataBandStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccSectionDataBandStyle = Autodesk.Civil.DatabaseServices.Styles.SectionDataBandStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Bands
7 | {
8 | public sealed class SectionDataBandStyle : BandStyle
9 | {
10 | #region properties
11 | internal AeccSectionDataBandStyle AeccSectionDataBandStyle => AcObject as AeccSectionDataBandStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal SectionDataBandStyle(AeccSectionDataBandStyle aeccSectionDataBandStyle, bool isDynamoOwned = false)
16 | : base(aeccSectionDataBandStyle, isDynamoOwned) { }
17 |
18 | internal static SectionDataBandStyle GetByObjectId(acDb.ObjectId sectionDataBandStyleId)
19 | => StyleSupport.Get
20 | (sectionDataBandStyleId, (sectionDataBandStyle) => new SectionDataBandStyle(sectionDataBandStyle));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"SectionDataBandStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Bands/SectionalDataBandStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccSectionalDataBandStyle = Autodesk.Civil.DatabaseServices.Styles.SectionalDataBandStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Bands
7 | {
8 | public sealed class SectionalDataBandStyle : BandStyle
9 | {
10 | #region properties
11 | internal AeccSectionalDataBandStyle AeccSectionalDataBandStyle => AcObject as AeccSectionalDataBandStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal SectionalDataBandStyle(AeccSectionalDataBandStyle aeccSectionalDataBandStyle, bool isDynamoOwned = false)
16 | : base(aeccSectionalDataBandStyle, isDynamoOwned) { }
17 |
18 | internal static SectionalDataBandStyle GetByObjectId(acDb.ObjectId sectionalDataBandStyleId)
19 | => StyleSupport.Get
20 | (sectionalDataBandStyleId, (sectionalDataBandStyle) => new SectionalDataBandStyle(sectionalDataBandStyle));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"SectionalDataBandStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Bands/SuperelevationDataBandStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccSuperelevationDataBandStyle = Autodesk.Civil.DatabaseServices.Styles.SuperelevationDataBandStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Bands
7 | {
8 | public sealed class SuperelevationDataBandStyle : BandStyle
9 | {
10 | #region properties
11 | internal AeccSuperelevationDataBandStyle AeccSuperelevationDataBandStyle => AcObject as AeccSuperelevationDataBandStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal SuperelevationDataBandStyle(AeccSuperelevationDataBandStyle aeccSuperelevationDataBandStyle, bool isDynamoOwned = false)
16 | : base(aeccSuperelevationDataBandStyle, isDynamoOwned) { }
17 |
18 | internal static SuperelevationDataBandStyle GetByObjectId(acDb.ObjectId superelevationDataBandStyleId)
19 | => StyleSupport.Get
20 | (superelevationDataBandStyleId, (superelevationDataBandStyle) => new SuperelevationDataBandStyle(superelevationDataBandStyle));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"SuperelevationDataBandStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Bands/VerticalGeometryBandStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccVerticalGeometryBandStyle = Autodesk.Civil.DatabaseServices.Styles.VerticalGeometryBandStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Bands
7 | {
8 | public sealed class VerticalGeometryBandStyle : BandStyle
9 | {
10 | #region properties
11 | internal AeccVerticalGeometryBandStyle AeccVerticalGeometryBandStyle => AcObject as AeccVerticalGeometryBandStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal VerticalGeometryBandStyle(AeccVerticalGeometryBandStyle aeccVerticalGeometryBandStyle, bool isDynamoOwned = false)
16 | : base(aeccVerticalGeometryBandStyle, isDynamoOwned) { }
17 |
18 | internal static VerticalGeometryBandStyle GetByObjectId(acDb.ObjectId verticalGeometryBandStyleId)
19 | => StyleSupport.Get
20 | (verticalGeometryBandStyleId, (verticalGeometryBandStyle) => new VerticalGeometryBandStyle(verticalGeometryBandStyle));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"VerticalGeometryBandStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/DisplayStyle/DisplayStyleViewDirections.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum DisplayStyleViewDirections
7 | {
8 | Plan,
9 | Profile,
10 | Model,
11 | Section
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Alignment/AlignmentCurveLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Alignment
7 | {
8 | public sealed class AlignmentCurveLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal AlignmentCurveLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static AlignmentCurveLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new AlignmentCurveLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates an Alignment Curve Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static AlignmentCurveLabelStyle ByName(string name)
28 | {
29 | return (AlignmentCurveLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.AlignmentLabelStyles.ToString() + "." + AlignmentLabelStyles.CurveLabelStyles.ToString(),
32 | typeof(AlignmentCurveLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"AlignmentCurveLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Alignment/AlignmentLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.Alignment
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum AlignmentLabelStyles
7 | {
8 | CantCriticalPointsLabelStyles,
9 | CurveLabelStyles,
10 | //DefaultLabelStyle,
11 | DesignSpeedLabelStyles,
12 | GeometryPointLabelStyles,
13 | LineLabelStyles,
14 | MajorStationLabelStyles,
15 | MinorStationLabelStyles,
16 | PointOfIntersectionLabelStyles,
17 | SpiralLabelStyles,
18 | StationEquationLabelStyles,
19 | StationOffsetLabelStyles,
20 | SuperelevationCriticalPointsLabelStyles,
21 | TangentIntersectionLabelStyles,
22 | VerticalGeometryPointLabelStyles
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Alignment/AlignmentLineLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Alignment
7 | {
8 | public sealed class AlignmentLineLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal AlignmentLineLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static AlignmentLineLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new AlignmentLineLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates an Alignment Line Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static AlignmentLineLabelStyle ByName(string name)
28 | {
29 | return (AlignmentLineLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.AlignmentLabelStyles.ToString() + "." + AlignmentLabelStyles.LineLabelStyles.ToString(),
32 | typeof(AlignmentLineLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"AlignmentLineLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Alignment/AlignmentStationOffsetLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Alignment
7 | {
8 | public sealed class AlignmentStationOffsetLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal AlignmentStationOffsetLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static AlignmentStationOffsetLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new AlignmentStationOffsetLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates an Alignment Station Offset Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static AlignmentStationOffsetLabelStyle ByName(string name)
28 | {
29 | return (AlignmentStationOffsetLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.AlignmentLabelStyles.ToString() + "." + AlignmentLabelStyles.StationOffsetLabelStyles.ToString(),
32 | typeof(AlignmentStationOffsetLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"AlignmentStationOffsetLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Catchment/CatchmentAreaLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Catchment
7 | {
8 | public sealed class CatchmentAreaLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal CatchmentAreaLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static CatchmentAreaLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new CatchmentAreaLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Catchment Area Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static CatchmentAreaLabelStyle ByName(string name)
28 | {
29 | return (CatchmentAreaLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.CatchmentLabelStyles.ToString() + "." + CatchmentLabelStyles.AreaLabelStyles.ToString(),
32 | typeof(CatchmentAreaLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"CatchmentAreaLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Catchment/CatchmentFlowSegmentLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Catchment
7 | {
8 | public sealed class CatchmentFlowSegmentLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal CatchmentFlowSegmentLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static CatchmentFlowSegmentLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new CatchmentFlowSegmentLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Catchment Flow Segment Label Style by name.
24 | ///
25 | /// The style name
26 | ///
27 | public static CatchmentFlowSegmentLabelStyle ByName(string name)
28 | {
29 | return (CatchmentFlowSegmentLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.CatchmentLabelStyles.ToString() + "." + CatchmentLabelStyles.FlowSegmentLabelStyles.ToString(),
32 | typeof(CatchmentFlowSegmentLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"CatchmentFlowSegmentLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Catchment/CatchmentLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.Catchment
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum CatchmentLabelStyles
7 | {
8 | AreaLabelStyles,
9 | //DefaultLabelStyle,
10 | FlowSegmentLabelStyles
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/General/GeneralCurveLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.General
7 | {
8 | public sealed class GeneralCurveLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal GeneralCurveLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static GeneralCurveLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new GeneralCurveLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a General Curve Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static GeneralCurveLabelStyle ByName(string name)
28 | {
29 | return (GeneralCurveLabelStyle)CreateByNameType(
30 | name,
31 | GeneralLabelStyles.GeneralCurveLabelStyles.ToString(),
32 | typeof(GeneralCurveLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"GeneralCurveLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/General/GeneralLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.General
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum GeneralLabelStyles
7 | {
8 | GeneralCurveLabelStyles,
9 | GeneralLineLabelStyles,
10 | GeneralLinkLabelStyles,
11 | GeneralMarkerLabelStyles,
12 | GeneralNoteLabelStyles,
13 | GeneralShapeLabelStyles
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/General/GeneralLineLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.General
7 | {
8 | public sealed class GeneralLineLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal GeneralLineLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static GeneralLineLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new GeneralLineLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a General Line Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static GeneralLineLabelStyle ByName(string name)
28 | {
29 | return (GeneralLineLabelStyle)CreateByNameType(
30 | name,
31 | GeneralLabelStyles.GeneralLineLabelStyles.ToString(),
32 | typeof(GeneralLineLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"GeneralLineLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/General/GeneralLinkLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.General
7 | {
8 | public sealed class GeneralLinkLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal GeneralLinkLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static GeneralLinkLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new GeneralLinkLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a General Link Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static GeneralLinkLabelStyle ByName(string name)
28 | {
29 | return (GeneralLinkLabelStyle)CreateByNameType(
30 | name,
31 | GeneralLabelStyles.GeneralLinkLabelStyles.ToString(),
32 | typeof(GeneralLinkLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"GeneralLinkLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/General/GeneralMarkerLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.General
7 | {
8 | public sealed class GeneralMarkerLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal GeneralMarkerLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static GeneralMarkerLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new GeneralMarkerLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a General Marker Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static GeneralMarkerLabelStyle ByName(string name)
28 | {
29 | return (GeneralMarkerLabelStyle)CreateByNameType(
30 | name,
31 | GeneralLabelStyles.GeneralMarkerLabelStyles.ToString(),
32 | typeof(GeneralMarkerLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"GeneralMarkerLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/General/GeneralNoteLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.General
7 | {
8 | public sealed class GeneralNoteLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal GeneralNoteLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static GeneralNoteLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new GeneralNoteLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a General Note Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static GeneralNoteLabelStyle ByName(string name)
28 | {
29 | return (GeneralNoteLabelStyle)CreateByNameType(
30 | name,
31 | GeneralLabelStyles.GeneralNoteLabelStyles.ToString(),
32 | typeof(GeneralNoteLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"GeneralNoteLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/General/GeneralShapeLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.General
7 | {
8 | public sealed class GeneralShapeLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal GeneralShapeLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static GeneralShapeLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new GeneralShapeLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a General Shape Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static GeneralShapeLabelStyle ByName(string name)
28 | {
29 | return (GeneralShapeLabelStyle)CreateByNameType(
30 | name,
31 | GeneralLabelStyles.GeneralShapeLabelStyles.ToString(),
32 | typeof(GeneralShapeLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"GeneralShapeLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/IntersectionLocationLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels
7 | {
8 | public sealed class IntersectionLocationLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal IntersectionLocationLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static IntersectionLocationLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new IntersectionLocationLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates an Intersection Location Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static IntersectionLocationLabelStyle ByName(string name)
28 | {
29 | return (IntersectionLocationLabelStyle)CreateByNameType(
30 | name,
31 | "IntersectionLabelStyles.LocationLabelStyles",
32 | typeof(IntersectionLocationLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"IntersectionLocationLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Label Style Components/ComponentSettings.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using Autodesk.DesignScript.Runtime;
3 | #endregion
4 |
5 | namespace Camber.Civil.Styles.Labels
6 | {
7 | [IsVisibleInDynamoLibrary(false)]
8 | public enum ComponentSettings
9 | {
10 | General,
11 | Block,
12 | Border,
13 | DirectionArrow,
14 | Line,
15 | Text,
16 | Tick
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/LabelStyleCollections.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum LabelStyleCollections
7 | {
8 | AlignmentLabelStyles,
9 | CatchmentLabelStyles,
10 | IntersectionLabelStyles,
11 | MatchLineLabelStyles,
12 | ParcelLabelStyles,
13 | PipeLabelStyles,
14 | PointLabelStyles,
15 | ProfileLabelStyles,
16 | ProfileViewLabelStyles,
17 | ProjectionLabelStyles,
18 | SampleLineLabelStyles,
19 | SectionLabelStyles,
20 | SectionViewLabelStyles,
21 | StructureLabelStyles,
22 | SurfaceLabelStyles,
23 | ViewFrameLabelStyles
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Match Line/MatchLineLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.MatchLine
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum MatchLineLabelStyles
7 | {
8 | LeftLabelStyles,
9 | RightLabelStyles
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Match Line/MatchLineLeftLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.MatchLine
7 | {
8 | public sealed class MatchLineLeftLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal MatchLineLeftLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static MatchLineLeftLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new MatchLineLeftLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Match Line Left Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static MatchLineLeftLabelStyle ByName(string name)
28 | {
29 | return (MatchLineLeftLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.MatchLineLabelStyles.ToString() + "." + MatchLineLabelStyles.LeftLabelStyles.ToString(),
32 | typeof(MatchLineLeftLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"MatchLineLeftLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Match Line/MatchLineRightLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.MatchLine
7 | {
8 | public sealed class MatchLineRightLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal MatchLineRightLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static MatchLineRightLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new MatchLineRightLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Match Line Right Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static MatchLineRightLabelStyle ByName(string name)
28 | {
29 | return (MatchLineRightLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.MatchLineLabelStyles.ToString() + "." + MatchLineLabelStyles.RightLabelStyles.ToString(),
32 | typeof(MatchLineRightLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"MatchLineLeftLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Parcel/ParcelAreaLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Parcel
7 | {
8 | public sealed class ParcelAreaLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ParcelAreaLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ParcelAreaLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ParcelAreaLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Parcel Area Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ParcelAreaLabelStyle ByName(string name)
28 | {
29 | return (ParcelAreaLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ParcelLabelStyles.ToString() + "." + ParcelLabelStyles.AreaLabelStyles.ToString(),
32 | typeof(ParcelAreaLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ParcelAreaLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Parcel/ParcelCurveLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Parcel
7 | {
8 | public sealed class ParcelCurveLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ParcelCurveLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ParcelCurveLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ParcelCurveLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Parcel Curve Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ParcelCurveLabelStyle ByName(string name)
28 | {
29 | return (ParcelCurveLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ParcelLabelStyles.ToString() + "." + ParcelLabelStyles.CurveLabelStyles.ToString(),
32 | typeof(ParcelCurveLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ParcelCurveLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Parcel/ParcelLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.Parcel
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum ParcelLabelStyles
7 | {
8 | AreaLabelStyles,
9 | CurveLabelStyles,
10 | //DefaultLabelStyle,
11 | LineLabelStyles
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Parcel/ParcelLineLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Parcel
7 | {
8 | public sealed class ParcelLineLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ParcelLineLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ParcelLineLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ParcelLineLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Parcel Line Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ParcelLineLabelStyle ByName(string name)
28 | {
29 | return (ParcelLineLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ParcelLabelStyles.ToString() + "." + ParcelLabelStyles.LineLabelStyles.ToString(),
32 | typeof(ParcelLineLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ParcelLineLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Pipe/PipeLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.Pipe
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum PipeLabelStyles
7 | {
8 | CrossProfileLabelStyles,
9 | CrossSectionLabelStyles,
10 | //DefaultLabelStyle,
11 | PlanProfileLabelStyles
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Pipe/PipePlanProfileLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Pipe
7 | {
8 | public sealed class PipePlanProfileLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal PipePlanProfileLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static PipePlanProfileLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new PipePlanProfileLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Pipe Plan Profile Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static PipePlanProfileLabelStyle ByName(string name)
28 | {
29 | return (PipePlanProfileLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.PipeLabelStyles.ToString() + "." + PipeLabelStyles.PlanProfileLabelStyles.ToString(),
32 | typeof(PipePlanProfileLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"PipePlanProfileLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Pipe/PipeProfileViewLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Pipe
7 | {
8 | public sealed class PipeProfileViewLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal PipeProfileViewLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static PipeProfileViewLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new PipeProfileViewLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Pipe Profile View Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static PipeProfileViewLabelStyle ByName(string name)
28 | {
29 | return (PipeProfileViewLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.PipeLabelStyles.ToString() + "." + PipeLabelStyles.CrossProfileLabelStyles.ToString(),
32 | typeof(PipeProfileViewLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"PipeProfileViewLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Pipe/PipeSectionViewLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Pipe
7 | {
8 | public sealed class PipeSectionViewLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal PipeSectionViewLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static PipeSectionViewLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new PipeSectionViewLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Pipe Section View Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static PipeSectionViewLabelStyle ByName(string name)
28 | {
29 | return (PipeSectionViewLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.PipeLabelStyles.ToString() + "." + PipeLabelStyles.CrossSectionLabelStyles.ToString(),
32 | typeof(PipeSectionViewLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"PipeSectionViewLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/PointLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels
7 | {
8 | public sealed class PointLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal PointLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static PointLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new PointLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Point Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static PointLabelStyle ByName(string name)
28 | {
29 | return (PointLabelStyle)CreateByNameType(
30 | name,
31 | "PointLabelStyle.LabelStyles",
32 | typeof(PointLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"PointLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile View/ProfileViewDepthLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.ProfileView
7 | {
8 | public sealed class ProfileViewDepthLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ProfileViewDepthLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileViewDepthLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ProfileViewDepthLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Profile View Depth Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ProfileViewDepthLabelStyle ByName(string name)
28 | {
29 | return (ProfileViewDepthLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ProfileViewLabelStyles.ToString() + "." + ProfileViewLabelStyles.DepthLabelStyles.ToString(),
32 | typeof(ProfileViewDepthLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ProfileViewDepthLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile View/ProfileViewLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.ProfileView
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum ProfileViewLabelStyles
7 | {
8 | //DefaultLabelStyle,
9 | DepthLabelStyles,
10 | StationElevationLabelStyles
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile View/ProfileViewStationElevationLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.ProfileView
7 | {
8 | public sealed class ProfileViewStationElevationLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ProfileViewStationElevationLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileViewStationElevationLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ProfileViewStationElevationLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Profile View Station Elevation Label Style by name.
24 | ///
25 | ///
26 | ///
27 | ///
28 | public static ProfileViewStationElevationLabelStyle ByName(string name)
29 | {
30 | return (ProfileViewStationElevationLabelStyle)CreateByNameType(
31 | name,
32 | LabelStyleCollections.ProfileViewLabelStyles.ToString() + "." + ProfileViewLabelStyles.StationElevationLabelStyles.ToString(),
33 | typeof(ProfileViewStationElevationLabelStyle).ToString());
34 | }
35 | #endregion
36 |
37 | #region methods
38 | public override string ToString() => $"ProfileViewStationElevationLabelStyle(Name = {Name})";
39 | #endregion
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile/ProfileCurveLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Profile
7 | {
8 | public sealed class ProfileCurveLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ProfileCurveLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileCurveLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ProfileCurveLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Profile Curve Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ProfileCurveLabelStyle ByName(string name)
28 | {
29 | return (ProfileCurveLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ProfileLabelStyles.ToString() + "." + ProfileLabelStyles.CurveLabelStyles.ToString(),
32 | typeof(ProfileCurveLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ProfileCurveLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile/ProfileGradeBreakLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Profile
7 | {
8 | public sealed class ProfileGradeBreakLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ProfileGradeBreakLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileGradeBreakLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ProfileGradeBreakLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Profile Grade Break Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ProfileGradeBreakLabelStyle ByName(string name)
28 | {
29 | return (ProfileGradeBreakLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ProfileLabelStyles.ToString() + "." + ProfileLabelStyles.GradeBreakLabelStyles.ToString(),
32 | typeof(ProfileGradeBreakLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ProfileGradeBreakLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile/ProfileHorizontalGeometryPointLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Profile
7 | {
8 | public sealed class ProfileHorizontalGeometryPointLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ProfileHorizontalGeometryPointLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileHorizontalGeometryPointLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ProfileHorizontalGeometryPointLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Profile Horizontal Geometry Point Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ProfileHorizontalGeometryPointLabelStyle ByName(string name)
28 | {
29 | return (ProfileHorizontalGeometryPointLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ProfileLabelStyles.ToString() + "." + ProfileLabelStyles.HorizontalGeometryPointLabelStyles.ToString(),
32 | typeof(ProfileHorizontalGeometryPointLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ProfileHorizontalGeometryPointLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile/ProfileLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.Profile
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum ProfileLabelStyles
7 | {
8 | CurveLabelStyles,
9 | //DefaultLabelStyle,
10 | GradeBreakLabelStyles,
11 | HorizontalGeometryPointLabelStyles,
12 | LineLabelStyles,
13 | MajorStationLabelStyles,
14 | MinorStationLabelStyles
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile/ProfileLineLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Profile
7 | {
8 | public sealed class ProfileLineLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ProfileLineLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileLineLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ProfileLineLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Profile Line Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ProfileLineLabelStyle ByName(string name)
28 | {
29 | return (ProfileLineLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ProfileLabelStyles.ToString() + "." + ProfileLabelStyles.LineLabelStyles.ToString(),
32 | typeof(ProfileLineLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ProfileLineLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile/ProfileMajorStationLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Profile
7 | {
8 | public sealed class ProfileMajorStationLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ProfileMajorStationLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileMajorStationLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ProfileMajorStationLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Profile Major Station Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ProfileMajorStationLabelStyle ByName(string name)
28 | {
29 | return (ProfileMajorStationLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ProfileLabelStyles.ToString() + "." + ProfileLabelStyles.MajorStationLabelStyles.ToString(),
32 | typeof(ProfileMajorStationLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ProfileMajorStationLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Profile/ProfileMinorStationLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Profile
7 | {
8 | public sealed class ProfileMinorStationLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ProfileMinorStationLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileMinorStationLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ProfileMinorStationLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Profile Minor Station Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ProfileMinorStationLabelStyle ByName(string name)
28 | {
29 | return (ProfileMinorStationLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ProfileLabelStyles.ToString() + "." + ProfileLabelStyles.MinorStationLabelStyles.ToString(),
32 | typeof(ProfileMinorStationLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ProfileMinorStationLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Projection/ProfileViewProjectionLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Projection
7 | {
8 | public sealed class ProfileViewProjectionLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ProfileViewProjectionLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ProfileViewProjectionLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ProfileViewProjectionLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Profile View Projection Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ProfileViewProjectionLabelStyle ByName(string name)
28 | {
29 | return (ProfileViewProjectionLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ProjectionLabelStyles.ToString() + "." + ProjectionLabelStyles.ProfileViewProjectionLabelStyles.ToString(),
32 | typeof(ProfileViewProjectionLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ProfileViewProjectionLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Projection/ProjectionLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.Projection
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum ProjectionLabelStyles
7 | {
8 | //DefaultLabelStyle,
9 | ProfileViewProjectionLabelStyles,
10 | SectionViewProjectionLabelStyles
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Projection/SectionViewProjectionLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Projection
7 | {
8 | public sealed class SectionViewProjectionLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SectionViewProjectionLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SectionViewProjectionLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SectionViewProjectionLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Section View Projection Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SectionViewProjectionLabelStyle ByName(string name)
28 | {
29 | return (SectionViewProjectionLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.ProjectionLabelStyles.ToString() + "." + ProjectionLabelStyles.SectionViewProjectionLabelStyles.ToString(),
32 | typeof(SectionViewProjectionLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SectionViewProjectionLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/SampleLineLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels
7 | {
8 | public sealed class SampleLineLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SampleLineLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SampleLineLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SampleLineLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Sample Line Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SampleLineLabelStyle ByName(string name)
28 | {
29 | return (SampleLineLabelStyle)CreateByNameType(
30 | name,
31 | "SampleLineLabelStyles.LabelStyles",
32 | typeof(SampleLineLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SampleLineLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Section View/SectionViewDepthLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.SectionView
7 | {
8 | public sealed class SectionViewDepthLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SectionViewDepthLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SectionViewDepthLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SectionViewDepthLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Section View Depth Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SectionViewDepthLabelStyle ByName(string name)
28 | {
29 | return (SectionViewDepthLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SectionViewLabelStyles.ToString() + "." + SectionViewLabelStyles.GradeLabelStyles.ToString(),
32 | typeof(SectionViewDepthLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SectionViewDepthLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Section View/SectionViewLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.SectionView
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum SectionViewLabelStyles
7 | {
8 | //DefaultLabelStyle,
9 | GradeLabelStyles,
10 | OffsetElevationLabelStyles
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Section View/SectionViewOffsetElevationLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.SectionView
7 | {
8 | public sealed class SectionViewOffsetElevationLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SectionViewOffsetElevationLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SectionViewOffsetElevationLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SectionViewOffsetElevationLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Section View Offset Elevation Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SectionViewOffsetElevationLabelStyle ByName(string name)
28 | {
29 | return (SectionViewOffsetElevationLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SectionViewLabelStyles.ToString() + "." + SectionViewLabelStyles.OffsetElevationLabelStyles.ToString(),
32 | typeof(SectionViewOffsetElevationLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SectionViewOffsetElevationLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Section/SectionGradeBreakLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Section
7 | {
8 | public sealed class SectionGradeBreakLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SectionGradeBreakLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SectionGradeBreakLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SectionGradeBreakLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Section Grade Break Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SectionGradeBreakLabelStyle ByName(string name)
28 | {
29 | return (SectionGradeBreakLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SectionLabelStyles.ToString() + "." + SectionLabelStyles.GradeBreakLabelStyles.ToString(),
32 | typeof(SectionGradeBreakLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SectionGradeBreakLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Section/SectionLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.Section
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum SectionLabelStyles
7 | {
8 | //DefaultLabelStyle,
9 | GradeBreakLabelStyles,
10 | MajorOffsetLabelStyles,
11 | MinorOffsetLabelStyles,
12 | SegmentLabelStyles
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Section/SectionMajorOffsetLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Section
7 | {
8 | public sealed class SectionMajorOffsetLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SectionMajorOffsetLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SectionMajorOffsetLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SectionMajorOffsetLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Section Major Offset Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SectionMajorOffsetLabelStyle ByName(string name)
28 | {
29 | return (SectionMajorOffsetLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SectionLabelStyles.ToString() + "." + SectionLabelStyles.MajorOffsetLabelStyles.ToString(),
32 | typeof(SectionMajorOffsetLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SectionMajorOffsetLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Section/SectionMinorOffsetLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Section
7 | {
8 | public sealed class SectionMinorOffsetLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SectionMinorOffsetLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SectionMinorOffsetLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SectionMinorOffsetLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Section Minor Offset Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SectionMinorOffsetLabelStyle ByName(string name)
28 | {
29 | return (SectionMinorOffsetLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SectionLabelStyles.ToString() + "." + SectionLabelStyles.MinorOffsetLabelStyles.ToString(),
32 | typeof(SectionMinorOffsetLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SectionMinorOffsetLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Section/SectionSegmentLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Section
7 | {
8 | public sealed class SectionSegmentLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SectionSegmentLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SectionSegmentLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SectionSegmentLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Section Segment Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SectionSegmentLabelStyle ByName(string name)
28 | {
29 | return (SectionSegmentLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SectionLabelStyles.ToString() + "." + SectionLabelStyles.SegmentLabelStyles.ToString(),
32 | typeof(SectionSegmentLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SectionSegmentLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/StructureLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels
7 | {
8 | public sealed class StructureLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal StructureLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static StructureLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new StructureLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Structure Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static StructureLabelStyle ByName(string name)
28 | {
29 | return (StructureLabelStyle)CreateByNameType(
30 | name,
31 | "StructureLabeStyles.LabelStyles",
32 | typeof(StructureLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"StructureLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Surface/SurfaceContourLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Surface
7 | {
8 | public sealed class SurfaceContourLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SurfaceContourLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SurfaceContourLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SurfaceContourLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Surface Contour Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SurfaceContourLabelStyle ByName(string name)
28 | {
29 | return (SurfaceContourLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SurfaceLabelStyles.ToString() + "." + SurfaceLabelStyles.ContourLabelStyles.ToString(),
32 | typeof(SurfaceContourLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SurfaceContourLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Surface/SurfaceElevationLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Surface
7 | {
8 | public sealed class SurfaceElevationLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SurfaceElevationLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SurfaceElevationLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SurfaceElevationLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Surface Elevation Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SurfaceElevationLabelStyle ByName(string name)
28 | {
29 | return (SurfaceElevationLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SurfaceLabelStyles.ToString() + "." + SurfaceLabelStyles.SpotElevationLabelStyles.ToString(),
32 | typeof(SurfaceElevationLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SurfaceElevationLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Surface/SurfaceLabelStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Labels.Surface
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum SurfaceLabelStyles
7 | {
8 | ContourLabelStyles,
9 | //DefaultLabelStyle,
10 | SlopeLabelStyles,
11 | SpotElevationLabelStyles,
12 | WatershedLabelStyles
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Surface/SurfaceSlopeLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Surface
7 | {
8 | public sealed class SurfaceSlopeLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SurfaceSlopeLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SurfaceSlopeLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SurfaceSlopeLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Surface Slope Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SurfaceSlopeLabelStyle ByName(string name)
28 | {
29 | return (SurfaceSlopeLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SurfaceLabelStyles.ToString() + "." + SurfaceLabelStyles.SlopeLabelStyles.ToString(),
32 | typeof(SurfaceSlopeLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SurfaceSlopeLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/Surface/SurfaceWatershedLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels.Surface
7 | {
8 | public sealed class SurfaceWatershedLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal SurfaceWatershedLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static SurfaceWatershedLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new SurfaceWatershedLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a Surface Watershed Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static SurfaceWatershedLabelStyle ByName(string name)
28 | {
29 | return (SurfaceWatershedLabelStyle)CreateByNameType(
30 | name,
31 | LabelStyleCollections.SurfaceLabelStyles.ToString() + "." + SurfaceLabelStyles.WatershedLabelStyles.ToString(),
32 | typeof(SurfaceWatershedLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"SurfaceWatershedLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Labels/ViewFrameLabelStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccLabelStyle = Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Labels
7 | {
8 | public sealed class ViewFrameLabelStyle : LabelStyle
9 | {
10 | #region properties
11 | internal AeccLabelStyle AeccLabelStyle => AcObject as AeccLabelStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ViewFrameLabelStyle(AeccLabelStyle aeccLabelStyle, bool isDynamoOwned = false) : base(aeccLabelStyle, isDynamoOwned) { }
17 |
18 | internal static ViewFrameLabelStyle GetByObjectId(acDb.ObjectId labelStyleId)
19 | => StyleSupport.Get
20 | (labelStyleId, (labelStyle) => new ViewFrameLabelStyle(labelStyle));
21 |
22 | ///
23 | /// Creates a View Frame Label Style by name.
24 | ///
25 | ///
26 | ///
27 | public static ViewFrameLabelStyle ByName(string name)
28 | {
29 | return (ViewFrameLabelStyle)CreateByNameType(
30 | name,
31 | "ViewFrameLabelStyles.LabelStyles",
32 | typeof(ViewFrameLabelStyle).ToString());
33 | }
34 | #endregion
35 |
36 | #region methods
37 | public override string ToString() => $"ViewFrameLabelStyle(Name = {Name})";
38 | #endregion
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/AlignmentStyle/AlignmentMarkerStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Objects
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum AlignmentMarkerStyles
7 | {
8 | BeginPoint,
9 | CompoundCurveIntersectPoint,
10 | CurveLineIntersectPoint,
11 | CurveSpiralIntersectPoint,
12 | EndPoint,
13 | IntersectionPoint,
14 | LineCurveIntersectPoint,
15 | LineSpiralIntersectPoint,
16 | MidPoint,
17 | ReverseCurveIntersectPoint,
18 | ReverseSpiralIntersectPoint,
19 | SpiralCurveIntersectPoint,
20 | SpiralLineIntersectPoint,
21 | SpiralSpiralIntersectPoint,
22 | StationReferencePoint,
23 | ThroughPoint
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/BuildingSiteStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccBuildingSiteStyle = Autodesk.Civil.DatabaseServices.Styles.BuildingSiteStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Objects
7 | {
8 | public sealed class BuildingSiteStyle : Style
9 | {
10 | #region properties
11 | internal AeccBuildingSiteStyle AeccBuildingSiteStyle => AcObject as AeccBuildingSiteStyle;
12 |
13 | ///
14 | /// Gets the utility connection Marker Style of a Building Site Style.
15 | ///
16 | public MarkerStyle UtilityConnectionMarkerStyle => MarkerStyle.GetByObjectId(AeccBuildingSiteStyle.MarkerStyleId);
17 | #endregion
18 |
19 | #region constructors
20 | internal BuildingSiteStyle(AeccBuildingSiteStyle aeccBuildingSiteStyle, bool isDynamoOwned = false) : base(aeccBuildingSiteStyle, isDynamoOwned) { }
21 |
22 | internal static BuildingSiteStyle GetByObjectId(acDb.ObjectId styleId)
23 | => StyleSupport.Get
24 | (styleId, (style) => new BuildingSiteStyle(style));
25 | #endregion
26 |
27 | #region methods
28 | public override string ToString() => $"BuildingSiteStyle(Name = {Name})";
29 |
30 | ///
31 | /// Sets the utility connection Marker Style of a Building Site Style.
32 | ///
33 | ///
34 | ///
35 | public BuildingSiteStyle SetUtilityConnectionMarkerStyle(MarkerStyle markerStyle) => (BuildingSiteStyle)SetValue(markerStyle.AeccMarkerStyle.ObjectId, "MarkerStyleId");
36 | #endregion
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/CorridorStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccCorridorStyle = Autodesk.Civil.DatabaseServices.Styles.CorridorStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Objects
7 | {
8 | public sealed class CorridorStyle : Style
9 | {
10 | #region properties
11 | internal AeccCorridorStyle AeccCorridorStyle => AcObject as AeccCorridorStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal CorridorStyle(AeccCorridorStyle aeccCorridorStyle, bool isDynamoOwned = false) : base(aeccCorridorStyle, isDynamoOwned) { }
17 |
18 | internal static CorridorStyle GetByObjectId(acDb.ObjectId styleId)
19 | => StyleSupport.Get
20 | (styleId, (style) => new CorridorStyle(style));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"CorridorStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/IntersectionStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccIntersectionStyle = Autodesk.Civil.DatabaseServices.Styles.IntersectionStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Objects
7 | {
8 | public sealed class IntersectionStyle : Style
9 | {
10 | #region properties
11 | internal AeccIntersectionStyle AeccIntersectionStyle => AcObject as AeccIntersectionStyle;
12 |
13 | ///
14 | /// Gets the Marker Style for an Intersection Style.
15 | ///
16 | public MarkerStyle MarkerStyle
17 | {
18 | get
19 | {
20 | var markerStyleId = AeccIntersectionStyle.MarkerStyleId;
21 | if (markerStyleId.IsValid && !markerStyleId.IsErased)
22 | {
23 | return MarkerStyle.GetByObjectId(markerStyleId);
24 | }
25 | return null;
26 | }
27 | }
28 |
29 | #endregion
30 |
31 | #region constructors
32 | internal IntersectionStyle(AeccIntersectionStyle aeccIntersectionStyle, bool isDynamoOwned = false) : base(aeccIntersectionStyle, isDynamoOwned) { }
33 |
34 | internal static IntersectionStyle GetByObjectId(acDb.ObjectId styleId)
35 | => StyleSupport.Get
36 | (styleId, (style) => new IntersectionStyle(style));
37 | #endregion
38 |
39 | #region methods
40 | public override string ToString() => $"IntersectionStyle(Name = {Name})";
41 | #endregion
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/LinkStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 |
3 | using Autodesk.DesignScript.Runtime;
4 | using acDb = Autodesk.AutoCAD.DatabaseServices;
5 | using AeccLinkStyle = Autodesk.Civil.DatabaseServices.Styles.LinkStyle;
6 | #endregion
7 |
8 | namespace Camber.Civil.Styles.Objects
9 | {
10 | public sealed class LinkStyle : Style
11 | {
12 | #region properties
13 | internal AeccLinkStyle AeccLinkStyle => AcObject as AeccLinkStyle;
14 |
15 | ///
16 | /// Dummy public member so the class gets imported.
17 | ///
18 | [IsVisibleInDynamoLibrary(false)]
19 | public object DummyProperty => null;
20 | #endregion
21 |
22 | #region constructors
23 | internal LinkStyle(AeccLinkStyle aeccLinkStyle, bool isDynamoOwned = false) : base(aeccLinkStyle, isDynamoOwned) { }
24 |
25 | internal static LinkStyle GetByObjectId(acDb.ObjectId styleId)
26 | => StyleSupport.Get
27 | (styleId, (style) => new LinkStyle(style));
28 | #endregion
29 |
30 | #region methods
31 | public override string ToString() => $"LinkStyle(Name = {Name})";
32 | #endregion
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/MassHaulLineStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccMassHaulLineStyle = Autodesk.Civil.DatabaseServices.Styles.MassHaulLineStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Objects
7 | {
8 | public sealed class MassHaulLineStyle : Style
9 | {
10 | #region properties
11 | internal AeccMassHaulLineStyle AeccMassHaulLineStyle => AcObject as AeccMassHaulLineStyle;
12 |
13 | ///
14 | /// Gets the free haul option for a Mass Haul Line Style, which determines how to show the free haul in the view.
15 | ///
16 | public string FreeHaulOption => AeccMassHaulLineStyle.FreeHaulOption.ToString();
17 | #endregion
18 |
19 | #region constructors
20 | internal MassHaulLineStyle(AeccMassHaulLineStyle aeccMassHaulLineStyle, bool isDynamoOwned = false) : base(aeccMassHaulLineStyle, isDynamoOwned) { }
21 |
22 | internal static MassHaulLineStyle GetByObjectId(acDb.ObjectId styleId)
23 | => StyleSupport.Get
24 | (styleId, (style) => new MassHaulLineStyle(style));
25 | #endregion
26 |
27 | #region methods
28 | public override string ToString() => $"MassHaulLineStyle(Name = {Name})";
29 |
30 | ///
31 | /// Sets the free haul option for a Mass Haul Line Style, which determines how to show the free haul in the view.
32 | ///
33 | /// True = Grade Point, False = Balance Point
34 | ///
35 | public MassHaulLineStyle SetFreeHaulOption(bool useGradePoint)
36 | {
37 | var freeHaulOption = Autodesk.Civil.FreeHaulDisplayType.BalancePoint;
38 | if (useGradePoint)
39 | {
40 | freeHaulOption = Autodesk.Civil.FreeHaulDisplayType.GradePoint;
41 | }
42 | SetValue(freeHaulOption);
43 | return this;
44 | }
45 | #endregion
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/MatchLineStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccMatchLineStyle = Autodesk.Civil.DatabaseServices.Styles.MatchLineStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Objects
7 | {
8 | public sealed class MatchLineStyle : Style
9 | {
10 | #region properties
11 | internal AeccMatchLineStyle AeccMatchLineStyle => AcObject as AeccMatchLineStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal MatchLineStyle(AeccMatchLineStyle aeccMatchLineStyle, bool isDynamoOwned = false) : base(aeccMatchLineStyle, isDynamoOwned) { }
16 |
17 | internal static MatchLineStyle GetByObjectId(acDb.ObjectId styleId)
18 | => StyleSupport.Get
19 | (styleId, (style) => new MatchLineStyle(style));
20 | #endregion
21 |
22 | #region methods
23 | public override string ToString() => $"MatchLineStyle(Name = {Name})";
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/ObjectStyleCollections.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Objects
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum ObjectStyleCollections
7 | {
8 | AlignmentStyles,
9 | AssemblyStyles,
10 | BuildingSiteStyles,
11 | CatchmentStyles,
12 | CorridorStyles,
13 | FeatureLineStyles,
14 | GradingStyles,
15 | GroupPlotStyles,
16 | InterferenceStyles,
17 | IntersectionStyles,
18 | LinkStyles,
19 | MarkerStyles,
20 | MassHaulLineStyles,
21 | MatchLineStyles,
22 | ParcelStyles,
23 | PipeStyles,
24 | PointStyles,
25 | ProfileStyles,
26 | ProjectionStyles,
27 | SampleLineStyles,
28 | SectionStyles,
29 | ShapeStyles,
30 | SheetStyles,
31 | SlopePatternStyles,
32 | StructureStyles,
33 | SurfaceStyles,
34 | SurveyFigureStyles,
35 | SurveyNetworkStyles,
36 | ViewFrameStyles
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/ProfileStyle/ProfileMarkerStyles.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Objects
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum ProfileMarkerStyles
7 | {
8 | BeginPoint,
9 | EndPoint,
10 | HighPoint,
11 | LowPoint,
12 | ProfileMarkerSectionView,
13 | ThroughPoint,
14 | VCompoundCurveIntersectPoint,
15 | VCurveTangentIntersectPoint,
16 | VIntersectionPoint,
17 | VReverseCurveIntersectPoint,
18 | VTangentCurveIntersectPoint
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/SampleLineStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccSampleLineStyle = Autodesk.Civil.DatabaseServices.Styles.SampleLineStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Objects
7 | {
8 | public sealed class SampleLineStyle : Style
9 | {
10 | #region properties
11 | internal AeccSampleLineStyle AeccSampleLineStyle => AcObject as AeccSampleLineStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal SampleLineStyle(AeccSampleLineStyle aeccSampleLineStyle, bool isDynamoOwned = false) : base(aeccSampleLineStyle, isDynamoOwned) { }
16 |
17 | internal static SampleLineStyle GetByObjectId(acDb.ObjectId styleId)
18 | => StyleSupport.Get
19 | (styleId, (style) => new SampleLineStyle(style));
20 | #endregion
21 |
22 | #region methods
23 | public override string ToString() => $"SampleLineStyle(Name = {Name})";
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/SectionStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccSectionStyle = Autodesk.Civil.DatabaseServices.Styles.SectionStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Objects
7 | {
8 | public sealed class SectionStyle : Style
9 | {
10 | #region properties
11 | internal AeccSectionStyle AeccSectionStyle => AcObject as AeccSectionStyle;
12 | #endregion
13 |
14 | #region constructors
15 | internal SectionStyle(AeccSectionStyle aeccSectionStyle, bool isDynamoOwned = false) : base(aeccSectionStyle, isDynamoOwned) { }
16 |
17 | internal static SectionStyle GetByObjectId(acDb.ObjectId styleId)
18 | => StyleSupport.Get
19 | (styleId, (style) => new SectionStyle(style));
20 | #endregion
21 |
22 | #region methods
23 | public override string ToString() => $"SectionStyle(Name = {Name})";
24 | #endregion
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/ShapeStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccShapeStyle = Autodesk.Civil.DatabaseServices.Styles.ShapeStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Objects
7 | {
8 | public sealed class ShapeStyle : Style
9 | {
10 | #region properties
11 | internal AeccShapeStyle AeccShapeStyle => AcObject as AeccShapeStyle;
12 |
13 | ///
14 | /// Dummy public property so that the class gets imported.
15 | ///
16 | public object DummyProperty => null;
17 | #endregion
18 |
19 | #region constructors
20 | internal ShapeStyle(AeccShapeStyle aeccShapeStyle, bool isDynamoOwned = false) : base(aeccShapeStyle, isDynamoOwned) { }
21 |
22 | internal static ShapeStyle GetByObjectId(acDb.ObjectId styleId)
23 | => StyleSupport.Get
24 | (styleId, (style) => new ShapeStyle(style));
25 | #endregion
26 |
27 | #region methods
28 | public override string ToString() => $"ShapeStyle(Name = {Name})";
29 | #endregion
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/SurfaceStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using Autodesk.DesignScript.Runtime;
3 | using acDb = Autodesk.AutoCAD.DatabaseServices;
4 | using AeccSurfaceStyle = Autodesk.Civil.DatabaseServices.Styles.SurfaceStyle;
5 | #endregion
6 |
7 | namespace Camber.Civil.Styles.Objects
8 | {
9 | public sealed class SurfaceStyle : Style
10 | {
11 | #region properties
12 | internal AeccSurfaceStyle AeccSurfaceStyle => AcObject as AeccSurfaceStyle;
13 |
14 | [IsVisibleInDynamoLibrary(false)]
15 | public string DummyProperty => "DummyProperty";
16 | #endregion
17 |
18 | #region constructors
19 | internal SurfaceStyle(AeccSurfaceStyle aeccSurfaceStyle, bool isDynamoOwned = false) : base(aeccSurfaceStyle, isDynamoOwned) { }
20 |
21 | internal static SurfaceStyle GetByObjectId(acDb.ObjectId styleId)
22 | => StyleSupport.Get
23 | (styleId, (style) => new SurfaceStyle(style));
24 | #endregion
25 |
26 | #region methods
27 | public override string ToString() => $"SurfaceStyle(Name = {Name})";
28 | #endregion
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Objects/ViewFrameStyle.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using acDb = Autodesk.AutoCAD.DatabaseServices;
3 | using AeccViewFrameStyle = Autodesk.Civil.DatabaseServices.Styles.ViewFrameStyle;
4 | #endregion
5 |
6 | namespace Camber.Civil.Styles.Objects
7 | {
8 | public sealed class ViewFrameStyle : Style
9 | {
10 | #region properties
11 | internal AeccViewFrameStyle AeccViewFrameStyle => AcObject as AeccViewFrameStyle;
12 |
13 | #endregion
14 |
15 | #region constructors
16 | internal ViewFrameStyle(AeccViewFrameStyle aeccViewFrameStyle, bool isDynamoOwned = false) : base(aeccViewFrameStyle, isDynamoOwned) { }
17 |
18 | internal static ViewFrameStyle GetByObjectId(acDb.ObjectId styleId)
19 | => StyleSupport.Get
20 | (styleId, (style) => new ViewFrameStyle(style));
21 | #endregion
22 |
23 | #region methods
24 | public override string ToString() => $"ViewFrameStyle(Name = {Name})";
25 | #endregion
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/StyleCollections.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum StyleCollections
7 | {
8 | CodeSetStyles,
9 | GradingCriteriaSets,
10 | QuantityTakeoffCriterias
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/StyleSupport.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System;
3 | using acDb = Autodesk.AutoCAD.DatabaseServices;
4 | using acDynApp = Autodesk.AutoCAD.DynamoApp.Services;
5 | using acDynNodes = Autodesk.AutoCAD.DynamoNodes;
6 | using Autodesk.DesignScript.Runtime;
7 | #endregion
8 |
9 | namespace Camber.Civil.Styles
10 | {
11 | [SupressImportIntoVM]
12 | internal static class StyleSupport
13 | {
14 | public static T Get(acDb.ObjectId id, Func creator)
15 | where T : acDynNodes.ObjectBase
16 | where U : acDb.DBObject
17 | {
18 | acDynNodes.Document document = acDynNodes.Document.Current;
19 | using (acDynApp.DocumentContext ctx = new acDynApp.DocumentContext(document.AcDocument))
20 | {
21 | U aeccObject = ctx.Transaction
22 | .GetObject(id, acDb.OpenMode.ForWrite) as U;
23 | return creator(aeccObject);
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/Camber/Civil/Styles/Views/ViewStyleCollections.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 |
3 | namespace Camber.Civil.Styles.Views
4 | {
5 | [IsVisibleInDynamoLibrary(false)]
6 | public enum ViewStyleCollections
7 | {
8 | CantViewStyles,
9 | MassHaulViewStyles,
10 | ProfileViewStyles,
11 | SectionViewStyles,
12 | SuperelevationViewStyles
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Camber/DynamoExtensions/Geometry/PlaneExtensions.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using Autodesk.DesignScript.Geometry;
3 | #endregion
4 |
5 | namespace Camber.DynamoExtensions.GeometryExtensions
6 | {
7 | public class PlaneExtensions
8 | {
9 | #region constructors
10 | private PlaneExtensions() { }
11 | #endregion
12 |
13 | #region methods
14 | ///
15 | /// Checks to see if geometry lies in front of or behind a plane, with the front side being in the direction of the plane normal.
16 | /// Returns True for in front, False for behind, and Null if the geometry intersects with the plane.
17 | ///
18 | ///
19 | ///
20 | ///
21 | public static bool? SideOfPlane(Geometry geometry, Plane plane)
22 | {
23 | if (geometry.DoesIntersect(plane) == false)
24 | {
25 | var ptOnPlane = plane.ClosestPointTo(geometry);
26 | var ptOnGeom = geometry.ClosestPointTo(plane);
27 | var vec = Vector.ByTwoPoints(ptOnPlane, ptOnGeom);
28 | var ang = vec.AngleAboutAxis(plane.Normal, plane.YAxis);
29 | if (ang == 180)
30 | {
31 | return false;
32 | }
33 | else
34 | {
35 | return true;
36 | }
37 | }
38 | else
39 | {
40 | return null;
41 | }
42 | }
43 | #endregion
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/Camber/DynamoExtensions/Geometry/PointExtensions.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using Autodesk.DesignScript.Geometry;
3 | #endregion
4 |
5 | namespace Camber.DynamoExtensions.GeometryExtensions
6 | {
7 | public class PointExtensions
8 | {
9 | #region constructors
10 | private PointExtensions() { }
11 | #endregion
12 |
13 | #region methods
14 | ///
15 | /// Measures the angle (in degrees) between two points. The angle is measured from the world X axis with angles increasing in the counterclockwise direction.
16 | /// If 3D points are supplied, they are projected onto the world XY plane.
17 | ///
18 | ///
19 | ///
20 | ///
21 | public static double AngleBetweenPoints(Point p1, Point p2)
22 | {
23 | var p1Flat = Point.ByCoordinates(p1.X, p1.Y);
24 | var p2Flat = Point.ByCoordinates(p2.X, p2.Y);
25 | var vector = Vector.ByTwoPoints(p1Flat, p2Flat);
26 | var xAxis = Vector.XAxis();
27 | var zAxis = Vector.ZAxis();
28 |
29 | return vector.AngleAboutAxis(xAxis, zAxis.Reverse());
30 | }
31 | #endregion
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Camber/NodeMigrationMappingAttribute.cs:
--------------------------------------------------------------------------------
1 | using Autodesk.DesignScript.Runtime;
2 | using System;
3 |
4 | namespace Camber
5 | {
6 | [SupressImportIntoVM]
7 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property)]
8 | public class NodeMigrationMappingAttribute : Attribute
9 | {
10 | public string OldName { get; }
11 | public string NewName { get; }
12 |
13 | public NodeMigrationMappingAttribute(string oldName, string newName)
14 | {
15 | OldName = oldName;
16 | NewName = newName;
17 | }
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/Camber/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // Setting ComVisible to false makes the types in this assembly not visible
5 | // to COM components. If you need to access a type in this assembly from
6 | // COM, set the ComVisible attribute to true on that type.
7 | [assembly: ComVisible(false)]
8 |
9 | // The following GUID is for the ID of the typelib if this project is exposed to COM
10 | [assembly: Guid("23bbab73-5a3b-4ee8-a757-a1f37c67ab1f")]
11 |
--------------------------------------------------------------------------------
/src/Camber/Utilities/Globals.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System;
3 | using acApp = Autodesk.AutoCAD.ApplicationServices;
4 | #endregion
5 |
6 | namespace Camber.Utilities
7 | {
8 | internal static class Globals
9 | {
10 | ///
11 | /// Gets the current running version of AutoCAD/Civil 3D.
12 | ///
13 | ///
14 | internal static short GetCurrentVersion()
15 | {
16 | dynamic acadapp = acApp.Application.AcadApplication;
17 | string p = acadapp.Path;
18 | var numstr = p.Substring(p.Length - 4);
19 | var num = Convert.ToInt16(numstr);
20 | return num;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Camber/Utilities/StringUtilities.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Text;
3 | using Autodesk.DesignScript.Runtime;
4 | #endregion
5 |
6 | namespace Camber.Utilities
7 | {
8 | [IsVisibleInDynamoLibrary(false)]
9 | public static class StringUtilities
10 | {
11 | ///
12 | /// Adds spaces between capital letters in a string.
13 | ///
14 | ///
15 | ///
16 | ///
17 | ///
18 | public static string AddSpacesBetweenCapitals(string text, bool preserveAcronyms, bool dropLastCharacter = false)
19 | {
20 | if (string.IsNullOrWhiteSpace(text)) { return string.Empty; }
21 | StringBuilder newText = new StringBuilder(text.Length * 2);
22 | newText.Append(text[0]);
23 | for (int i = 1; i < text.Length; i++)
24 | {
25 | if (char.IsUpper(text[i]))
26 | if ((text[i - 1] != ' ' && !char.IsUpper(text[i - 1])) ||
27 | (preserveAcronyms && char.IsUpper(text[i - 1]) &&
28 | i < text.Length - 1 && !char.IsUpper(text[i + 1])))
29 | newText.Append(' ');
30 | newText.Append(text[i]);
31 | }
32 | if (dropLastCharacter) { newText = newText.Remove(newText.Length - 1, 1); }
33 | return newText.ToString();
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/CamberUI/AutoCAD/AutoCADEnumDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Autodesk.DesignScript.Runtime;
4 | using Camber.Properties;
5 | using Newtonsoft.Json;
6 | using acDb = Autodesk.AutoCAD.DatabaseServices;
7 | using aecDb = Autodesk.Aec.DatabaseServices;
8 | using Dynamo.Graph.Nodes;
9 | #endregion
10 |
11 | namespace Camber.UI
12 | {
13 | [NodeName("Block Units")]
14 | [NodeCategory("Camber.AutoCAD.Objects.Block")]
15 | [NodeDescription("Select Block units.")]
16 | [IsDesignScriptCompatible]
17 | public class BlockUnitsDropDown : EnumDropDownBase
18 | {
19 | private const string OutputName = "units";
20 |
21 | public BlockUnitsDropDown() : base(OutputName, typeof(acDb.UnitsValue))
22 | {
23 | this.Info(string.Format(Resources.NODE_OBSOLETE_MESSAGE, "Units"), true);
24 | }
25 |
26 | [JsonConstructor]
27 | public BlockUnitsDropDown(IEnumerable inPorts, IEnumerable outPorts)
28 | : base(OutputName, typeof(acDb.UnitsValue), inPorts, outPorts)
29 | {
30 | this.Info(string.Format(Resources.NODE_OBSOLETE_MESSAGE, "Units"), true);
31 | }
32 | }
33 |
34 | [NodeName("View Block View Directions")]
35 | [NodeCategory("Camber.AutoCAD.Objects.Multi-View Blocks.ViewBlock")]
36 | [NodeDescription("Select View Block view direction type.")]
37 | [IsDesignScriptCompatible]
38 | public class ViewDirectionsDropDown : EnumDropDownBase
39 | {
40 | private const string OutputName = "viewDirection";
41 |
42 | public ViewDirectionsDropDown() : base(OutputName, typeof(aecDb.ViewDirection)) { }
43 |
44 | [JsonConstructor]
45 | public ViewDirectionsDropDown(IEnumerable inPorts, IEnumerable outPorts)
46 | : base(OutputName, typeof(aecDb.ViewDirection), inPorts, outPorts) { }
47 | }
48 | }
--------------------------------------------------------------------------------
/src/CamberUI/AutoCAD/ConvertToCamberObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Collections.Generic;
4 | using ProtoCore.AST.AssociativeAST;
5 | using Newtonsoft.Json;
6 | using acDynNodes = Autodesk.AutoCAD.DynamoNodes;
7 | using Dynamo.Graph.Nodes;
8 |
9 | namespace Camber.UI
10 | {
11 | [NodeName("Convert to Camber Object")]
12 | [NodeDescription("Converts a Dynamo Object to a Camber Object.")]
13 | [NodeCategory("Camber")]
14 | [InPortNames("object")]
15 | [InPortTypes("Object")]
16 | [InPortDescriptions("Object")]
17 | [OutPortNames("Object")]
18 | [OutPortTypes("Object")]
19 | [OutPortDescriptions("Object")]
20 |
21 | [IsDesignScriptCompatible]
22 | public class ConvertToCamberObject : NodeModel
23 | {
24 | #region constructors
25 | ///
26 | /// Default constructor
27 | ///
28 | public ConvertToCamberObject()
29 | {
30 | RegisterAllPorts();
31 | }
32 |
33 | ///
34 | /// JSON constructor
35 | ///
36 | ///
37 | ///
38 | [JsonConstructor]
39 | private ConvertToCamberObject(IEnumerable inPorts, IEnumerable outPorts) : base(inPorts, outPorts) { }
40 | #endregion
41 |
42 | #region methods
43 | public override IEnumerable BuildOutputAst(List inputAsNodes)
44 | {
45 | if (!InPorts[0].Connectors.Any())
46 | {
47 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode()) };
48 | }
49 |
50 | var functionNode =
51 | AstFactory.BuildFunctionCall(
52 | new Func(AutoCAD.Objects.Object.ConvertToCamberObject),
53 | new List { inputAsNodes[0] });
54 |
55 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), functionNode) };
56 | }
57 | #endregion
58 | }
59 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/CivilObjects/TimeOfConcentrationCalculationMethodsDropDown.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using CoreNodeModels;
4 | using Dynamo.Graph.Nodes;
5 | using Dynamo.Utilities;
6 | using ProtoCore.AST.AssociativeAST;
7 | using Newtonsoft.Json;
8 | using System.Linq;
9 | #endregion
10 |
11 | namespace Camber.UI
12 | {
13 | [NodeName("Time of Concentration Calculation Methods")]
14 | [NodeCategory("Camber.Civil 3D.CivilObjects.Catchment")]
15 | [NodeDescription("Select time of concentration calculation method.")]
16 | [IsDesignScriptCompatible]
17 | public class TimeOfConcentrationCalculationMethodsDropDown : DSDropDownBase
18 | {
19 | public TimeOfConcentrationCalculationMethodsDropDown() : base("calculationMethod") { }
20 |
21 | [JsonConstructor]
22 | public TimeOfConcentrationCalculationMethodsDropDown(IEnumerable inPorts, IEnumerable outPorts) : base("calculationMethod", inPorts, outPorts) { }
23 |
24 | protected override SelectionState PopulateItemsCore(string currentSelection)
25 | {
26 | Items.Clear();
27 |
28 | var newItems = new List()
29 | {
30 | new DynamoDropDownItem("User-defined", "CalculationMethodUserDefined"),
31 | new DynamoDropDownItem("TR-55", "CalculationMethodTR55")
32 | };
33 |
34 | Items.AddRange(newItems);
35 | Items = Items.OrderBy(x => x.Name).ToObservableCollection();
36 |
37 | SelectedIndex = -1;
38 | return SelectionState.Restore;
39 | }
40 |
41 | public override IEnumerable BuildOutputAst(List inputAstNodes)
42 | {
43 | if (Items.Count == 0 || SelectedIndex == -1)
44 | {
45 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode()) };
46 | }
47 |
48 | var stringNode = AstFactory.BuildStringNode((string)Items[SelectedIndex].Item);
49 | var assign = AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), stringNode);
50 |
51 | return new List { assign };
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Data Shortcuts/GetCurrentProject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Collections.Generic;
4 | using ProtoCore.AST.AssociativeAST;
5 | using Newtonsoft.Json;
6 | using acDynNodes = Autodesk.AutoCAD.DynamoNodes;
7 | using Camber.Civil.DataShortcuts;
8 | using Dynamo.Graph.Nodes;
9 |
10 | namespace Camber.UI
11 | {
12 | [NodeName("Get Current Data Shortcut Project")]
13 | [NodeDescription("Gets the current Data Shortcut Project.")]
14 | [NodeCategory("Camber.Civil 3D.Data Shortcuts")]
15 | [InPortNames("document")]
16 | [InPortTypes("Autodesk.AutoCAD.DynamoNodes.Document")]
17 | [InPortDescriptions("Document")]
18 | [OutPortNames("dataShortcutProject")]
19 | [OutPortTypes("Camber.Civil.DataShortcuts.DataShortcutProject")]
20 | [OutPortDescriptions("DataShortcutProject")]
21 |
22 | [IsDesignScriptCompatible]
23 | public class GetCurrentProject : NodeModel
24 | {
25 | #region constructors
26 | ///
27 | /// Default constructor
28 | ///
29 | public GetCurrentProject()
30 | {
31 | RegisterAllPorts();
32 | }
33 |
34 | ///
35 | /// JSON constructor
36 | ///
37 | ///
38 | ///
39 | [JsonConstructor]
40 | private GetCurrentProject(IEnumerable inPorts, IEnumerable outPorts) : base(inPorts, outPorts) { }
41 | #endregion
42 |
43 | #region methods
44 | public override IEnumerable BuildOutputAst(List inputAsNodes)
45 | {
46 | if (!InPorts[0].Connectors.Any())
47 | {
48 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode()) };
49 | }
50 |
51 | var functionNode =
52 | AstFactory.BuildFunctionCall(
53 | new Func(DataShortcuts.GetCurrentProject),
54 | new List { inputAsNodes[0] });
55 |
56 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), functionNode) };
57 | }
58 | #endregion
59 | }
60 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Data Shortcuts/GetWorkingFolder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Collections.Generic;
4 | using ProtoCore.AST.AssociativeAST;
5 | using Newtonsoft.Json;
6 | using acDynNodes = Autodesk.AutoCAD.DynamoNodes;
7 | using Camber.Civil.DataShortcuts;
8 | using Dynamo.Graph.Nodes;
9 |
10 | namespace Camber.UI
11 | {
12 | [NodeName("Get Data Shortcut Working Folder")]
13 | [NodeDescription("Gets the current Data Shortcut Working Folder.")]
14 | [NodeCategory("Camber.Civil 3D.Data Shortcuts")]
15 | [InPortNames("document")]
16 | [InPortTypes("Autodesk.AutoCAD.DynamoNodes.Document")]
17 | [InPortDescriptions("Document")]
18 | [OutPortNames("dataShortcutWorkingFolder")]
19 | [OutPortTypes("Camber.Civil.DataShortcuts.DataShortcutWorkingFolder")]
20 | [OutPortDescriptions("DataShortcutWorkingFolder")]
21 |
22 | [IsDesignScriptCompatible]
23 | public class GetWorkingFolder : NodeModel
24 | {
25 | #region constructors
26 | ///
27 | /// Default constructor
28 | ///
29 | public GetWorkingFolder()
30 | {
31 | RegisterAllPorts();
32 | }
33 |
34 | ///
35 | /// JSON constructor
36 | ///
37 | ///
38 | ///
39 | [JsonConstructor]
40 | private GetWorkingFolder(IEnumerable inPorts, IEnumerable outPorts) : base(inPorts, outPorts) { }
41 | #endregion
42 |
43 | #region methods
44 | public override IEnumerable BuildOutputAst(List inputAsNodes)
45 | {
46 | if (!InPorts[0].Connectors.Any())
47 | {
48 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode()) };
49 | }
50 |
51 | var functionNode =
52 | AstFactory.BuildFunctionCall(
53 | new Func(DataShortcuts.GetWorkingFolder),
54 | new List { inputAsNodes[0] });
55 |
56 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), functionNode) };
57 | }
58 | #endregion
59 | }
60 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Data Shortcuts/Refresh.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Collections.Generic;
4 | using ProtoCore.AST.AssociativeAST;
5 | using Newtonsoft.Json;
6 | using Camber.Civil.DataShortcuts;
7 | using Dynamo.Graph.Nodes;
8 |
9 | namespace Camber.UI
10 | {
11 | [NodeName("Refresh Data Shortcuts")]
12 | [NodeDescription("Refreshes the Data Shortcuts view in the Toolspace.")]
13 | [NodeCategory("Camber.Civil 3D.Data Shortcuts")]
14 | [InPortNames("runToggle")]
15 | [InPortTypes("bool")]
16 | [InPortDescriptions("A boolean input that can be changed to force the node to run.\n \nbool")]
17 | [OutPortNames("bool")]
18 | [OutPortTypes("bool")]
19 | [OutPortDescriptions("bool")]
20 |
21 | [IsDesignScriptCompatible]
22 | public class Refresh : NodeModel
23 | {
24 | #region constructors
25 | ///
26 | /// Default constructor
27 | ///
28 | public Refresh()
29 | {
30 | RegisterAllPorts();
31 | }
32 |
33 | ///
34 | /// JSON constructor
35 | ///
36 | ///
37 | ///
38 | [JsonConstructor]
39 | private Refresh(IEnumerable inPorts, IEnumerable outPorts) : base(inPorts, outPorts) { }
40 | #endregion
41 |
42 | #region methods
43 | public override IEnumerable BuildOutputAst(List inputAsNodes)
44 | {
45 | if (!InPorts[0].Connectors.Any())
46 | {
47 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode()) };
48 | }
49 |
50 | var functionNode =
51 | AstFactory.BuildFunctionCall(
52 | new Func(DataShortcuts.Refresh),
53 | new List { inputAsNodes[0] });
54 |
55 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), functionNode) };
56 | }
57 | #endregion
58 | }
59 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Data Shortcuts/SetWorkingFolder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Collections.Generic;
4 | using ProtoCore.AST.AssociativeAST;
5 | using Newtonsoft.Json;
6 | using acDynNodes = Autodesk.AutoCAD.DynamoNodes;
7 | using Camber.Civil.DataShortcuts;
8 | using Dynamo.Graph.Nodes;
9 |
10 | namespace Camber.UI
11 | {
12 | [NodeName("Set Data Shortcut Working Folder")]
13 | [NodeDescription("Sets the current Data Shortcut Working Folder.")]
14 | [NodeCategory("Camber.Civil 3D.Data Shortcuts")]
15 | [InPortNames("document", "directoryPath")]
16 | [InPortTypes("Autodesk.AutoCAD.DynamoNodes.Document", "string")]
17 | [InPortDescriptions("Document", "string")]
18 | [OutPortNames("dataShortcutWorkingFolder")]
19 | [OutPortTypes("Camber.Civil.DataShortcuts.DataShortcutWorkingFolder")]
20 | [OutPortDescriptions("DataShortcutWorkingFolder")]
21 |
22 | [IsDesignScriptCompatible]
23 | public class SetWorkingFolder : NodeModel
24 | {
25 | #region constructors
26 | ///
27 | /// Default constructor
28 | ///
29 | public SetWorkingFolder()
30 | {
31 | RegisterAllPorts();
32 | }
33 |
34 | ///
35 | /// JSON constructor
36 | ///
37 | ///
38 | ///
39 | [JsonConstructor]
40 | private SetWorkingFolder(IEnumerable inPorts, IEnumerable outPorts) : base(inPorts, outPorts) { }
41 | #endregion
42 |
43 | #region methods
44 | public override IEnumerable BuildOutputAst(List inputAsNodes)
45 | {
46 | if (!InPorts[0].Connectors.Any() || !InPorts[1].Connectors.Any())
47 | {
48 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode()) };
49 | }
50 |
51 | var functionNode =
52 | AstFactory.BuildFunctionCall(
53 | new Func(DataShortcuts.SetWorkingFolder),
54 | new List { inputAsNodes[0], inputAsNodes[1] });
55 |
56 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), functionNode) };
57 | }
58 | #endregion
59 | }
60 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Data Shortcuts/Validate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Collections.Generic;
4 | using ProtoCore.AST.AssociativeAST;
5 | using Newtonsoft.Json;
6 | using Camber.Civil.DataShortcuts;
7 | using Dynamo.Graph.Nodes;
8 |
9 | namespace Camber.UI
10 | {
11 | [NodeName("Validate Data Shortcuts")]
12 | [NodeDescription("Validates all Data Shortcuts.")]
13 | [NodeCategory("Camber.Civil 3D.Data Shortcuts")]
14 | [InPortNames("runToggle")]
15 | [InPortTypes("bool")]
16 | [InPortDescriptions("A boolean input that can be changed to force the node to run.\n\nbool")]
17 | [OutPortNames("bool")]
18 | [OutPortTypes("bool")]
19 | [OutPortDescriptions("bool")]
20 |
21 | [IsDesignScriptCompatible]
22 | public class Validate : NodeModel
23 | {
24 | #region constructors
25 | ///
26 | /// Default constructor
27 | ///
28 | public Validate()
29 | {
30 | RegisterAllPorts();
31 | }
32 |
33 | ///
34 | /// JSON constructor
35 | ///
36 | ///
37 | ///
38 | [JsonConstructor]
39 | private Validate(IEnumerable inPorts, IEnumerable outPorts) : base(inPorts, outPorts) { }
40 | #endregion
41 |
42 | #region methods
43 | public override IEnumerable BuildOutputAst(List inputAsNodes)
44 | {
45 | if (!InPorts[0].Connectors.Any())
46 | {
47 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode()) };
48 | }
49 |
50 | var functionNode =
51 | AstFactory.BuildFunctionCall(
52 | new Func(DataShortcuts.Validate),
53 | new List { inputAsNodes[0] });
54 |
55 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), functionNode) };
56 | }
57 | #endregion
58 | }
59 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Design Checks/DesignCheckDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.DesignChecks;
6 | #endregion
7 |
8 | namespace Camber.UI
9 | {
10 | [NodeName("Alignment Design Check Sets")]
11 | [NodeCategory("Camber.Civil 3D.Design Checks")]
12 | [NodeDescription("Select Alignment Design Check Set.")]
13 | [IsDesignScriptCompatible]
14 | public class AlignmentDesignCheckSetDropDown : StyleDropDownBase
15 | {
16 | private const string OutputName = "alignmentDesignCheckSet";
17 | private static string StyleType = typeof(AlignmentDesignCheckSet).ToString();
18 | private static string StyleCollection = DesignCheckSetCollections.AlignmentDesignCheckSets.ToString();
19 |
20 | public AlignmentDesignCheckSetDropDown() : base(OutputName, StyleCollection, StyleType) { }
21 |
22 | [JsonConstructor]
23 | public AlignmentDesignCheckSetDropDown(IEnumerable inPorts, IEnumerable outPorts)
24 | : base(OutputName, StyleCollection, StyleType, inPorts, outPorts) { }
25 | }
26 |
27 | [NodeName("Profile Design Check Sets")]
28 | [NodeCategory("Camber.Civil 3D.Design Checks")]
29 | [NodeDescription("Select Profile Design Check Set.")]
30 | [IsDesignScriptCompatible]
31 | public class ProfileDesignCheckSetDropDown : StyleDropDownBase
32 | {
33 | private const string OutputName = "profileDesignCheckSet";
34 | private static string StyleType = typeof(ProfileDesignCheckSet).ToString();
35 | private static string StyleCollection = DesignCheckSetCollections.ProfileDesignCheckSets.ToString();
36 |
37 | public ProfileDesignCheckSetDropDown() : base(OutputName, StyleCollection, StyleType) { }
38 |
39 | [JsonConstructor]
40 | public ProfileDesignCheckSetDropDown(IEnumerable inPorts, IEnumerable outPorts)
41 | : base(OutputName, StyleCollection, StyleType, inPorts, outPorts) { }
42 | }
43 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/GradingCriteriaDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles;
6 | using Camber.Civil.GradingCriteria;
7 |
8 | #endregion
9 |
10 | namespace Camber.UI
11 | {
12 | [NodeName("Grading Criteria Sets")]
13 | [NodeCategory("Camber.Civil 3D.Grading Criteria")]
14 | [NodeDescription("Select Grading Criteria Set.")]
15 | [IsDesignScriptCompatible]
16 | public class GradingCriteriaSetDropDown : StyleDropDownBase
17 | {
18 | private const string OutputName = "gradingCriteriaSet";
19 | private static string StyleType = typeof(GradingCriteriaSet).ToString();
20 | private static string StyleCollection = StyleCollections.GradingCriteriaSets.ToString();
21 |
22 | public GradingCriteriaSetDropDown() : base(OutputName, StyleCollection, StyleType) { }
23 |
24 | [JsonConstructor]
25 | public GradingCriteriaSetDropDown(IEnumerable inPorts, IEnumerable outPorts)
26 | : base(OutputName, StyleCollection, StyleType, inPorts, outPorts) { }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/QTODropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles;
6 | using Camber.Civil.QTO;
7 |
8 | #endregion
9 |
10 | namespace Camber.UI
11 | {
12 | [NodeName("Quantity Takeoff Criterias")]
13 | [NodeCategory("Camber.Civil 3D.Quantity Takeoff")]
14 | [NodeDescription("Select Quantity Takeoff Criteria.")]
15 | [IsDesignScriptCompatible]
16 | public class QTOCriteriaDropDown : StyleDropDownBase
17 | {
18 | private const string OutputName = "qTOCriteria";
19 | private static string StyleType = typeof(QTOCriteria).ToString();
20 | private static string StyleCollection = StyleCollections.QuantityTakeoffCriterias.ToString();
21 |
22 | public QTOCriteriaDropDown() : base(OutputName, StyleCollection, StyleType) { }
23 |
24 | [JsonConstructor]
25 | public QTOCriteriaDropDown(IEnumerable inPorts, IEnumerable outPorts)
26 | : base(OutputName, StyleCollection, StyleType, inPorts, outPorts) { }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/QTOEnumDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using civDb = Autodesk.Civil.DatabaseServices;
4 | using civDs = Autodesk.Civil.DataShortcuts;
5 | using Newtonsoft.Json;
6 | using Dynamo.Graph.Nodes;
7 |
8 | #endregion
9 |
10 | namespace Camber.UI
11 | {
12 | [NodeName("Material Quantity Types")]
13 | [NodeCategory("Camber.Civil 3D.Quantity Takeoff.QTOCriteria")]
14 | [NodeDescription("Select material quantity type.")]
15 | [IsDesignScriptCompatible]
16 | public class MaterialQuantityTypesDropDown : EnumDropDownBase
17 | {
18 | private const string OutputName = "quantityType";
19 |
20 | public MaterialQuantityTypesDropDown() : base(OutputName, typeof(civDb.MaterialQuantityType)) { }
21 |
22 | [JsonConstructor]
23 | public MaterialQuantityTypesDropDown(IEnumerable inPorts, IEnumerable outPorts)
24 | : base(OutputName, typeof(civDb.MaterialQuantityType), inPorts, outPorts) { }
25 | }
26 |
27 | [NodeName("Material Conditions")]
28 | [NodeCategory("Camber.Civil 3D.Quantity Takeoff.QTOCriteriaData")]
29 | [NodeDescription("Select material condition.")]
30 | [IsDesignScriptCompatible]
31 | public class MaterialConditionsDropDown : EnumDropDownBase
32 | {
33 | private const string OutputName = "condition";
34 |
35 | public MaterialConditionsDropDown() : base(OutputName, typeof(civDb.MaterialConditionType)) { }
36 |
37 | [JsonConstructor]
38 | public MaterialConditionsDropDown(IEnumerable inPorts, IEnumerable outPorts)
39 | : base(OutputName, typeof(civDb.MaterialConditionType), inPorts, outPorts) { }
40 | }
41 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/CodeSetStyleDropDown.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using civDb = Autodesk.Civil.DatabaseServices;
6 | using Camber.Civil.Styles;
7 | using Camber.Civil.Styles.CodeSets;
8 | #endregion
9 |
10 | namespace Camber.UI
11 | {
12 | [NodeName("Code Set Styles")]
13 | [NodeCategory("Camber.Civil 3D.Styles.Code Set Styles")]
14 | [NodeDescription("Select Code Set Style.")]
15 | [IsDesignScriptCompatible]
16 | public class CodeSetStyleDropDown : StyleDropDownBase
17 | {
18 | private const string OutputName = "codeSetStyle";
19 | private static string StyleType = typeof(CodeSetStyle).ToString();
20 | private static string StyleCollection = StyleCollections.CodeSetStyles.ToString();
21 |
22 | public CodeSetStyleDropDown() : base(OutputName, StyleCollection, StyleType) { }
23 |
24 | [JsonConstructor]
25 | public CodeSetStyleDropDown(IEnumerable inPorts, IEnumerable outPorts)
26 | : base(OutputName, StyleCollection, StyleType, inPorts, outPorts) { }
27 | }
28 |
29 | [NodeName("Subentity Style Types")]
30 | [NodeCategory("Camber.Civil 3D.Styles.Code Set Styles.CodeSetStyleItem")]
31 | [NodeDescription("Select subentity style type.")]
32 | [IsDesignScriptCompatible]
33 | public class SubentityStyleTypesDropDown : EnumDropDownBase
34 | {
35 | private const string OutputName = "subentityStyleType";
36 |
37 | public SubentityStyleTypesDropDown() : base(OutputName, typeof(civDb.Styles.SubassemblySubentityStyleType)) { }
38 |
39 | [JsonConstructor]
40 | public SubentityStyleTypesDropDown(IEnumerable inPorts, IEnumerable outPorts)
41 | : base(OutputName, typeof(civDb.Styles.SubassemblySubentityStyleType), inPorts, outPorts) { }
42 | }
43 | }
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/CatchmentLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | using Camber.Civil.Styles.Labels.Catchment;
7 | #endregion
8 |
9 | namespace Camber.UI
10 | {
11 | [NodeName("Catchment Area Label Styles")]
12 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Catchment")]
13 | [NodeDescription("Select Catchment Area Label Style.")]
14 | [IsDesignScriptCompatible]
15 | public class CatchmentAreaLabelStylesDropDown : LabelStyleDropDownBase
16 | {
17 | private const string OutputName = "catchmentAreaLabelStyle";
18 | private static string LabelStyleCollection = LabelStyleCollections.CatchmentLabelStyles.ToString() + "." + CatchmentLabelStyles.AreaLabelStyles.ToString();
19 | private static string LabelStyleType = typeof(CatchmentAreaLabelStyle).ToString();
20 |
21 | public CatchmentAreaLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
22 |
23 | [JsonConstructor]
24 | public CatchmentAreaLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
25 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
26 | }
27 |
28 | [NodeName("Catchment Flow Segment Label Styles")]
29 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Catchment")]
30 | [NodeDescription("Select Catchment Flow Segment Label Style.")]
31 | [IsDesignScriptCompatible]
32 | public class CatchmentFlowSegmentLabelStylesDropDown : LabelStyleDropDownBase
33 | {
34 | private const string OutputName = "catchmentFlowSegmentLabelStyle";
35 | private static string LabelStyleCollection = LabelStyleCollections.CatchmentLabelStyles.ToString() + "." + CatchmentLabelStyles.FlowSegmentLabelStyles.ToString();
36 | private static string LabelStyleType = typeof(CatchmentFlowSegmentLabelStyle).ToString();
37 |
38 | public CatchmentFlowSegmentLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
39 |
40 | [JsonConstructor]
41 | public CatchmentFlowSegmentLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
42 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/IntersectionLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | #endregion
7 |
8 | namespace Camber.UI
9 | {
10 | [NodeName("Intersection Location Label Styles")]
11 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.IntersectionLocationLabelStyle")]
12 | [NodeDescription("Select Intersection Location Label Style.")]
13 | [IsDesignScriptCompatible]
14 | public class IntersectionLocationLabelStylesDropDown : LabelStyleDropDownBase
15 | {
16 | private const string OutputName = "intersectionLocationLabelStyle";
17 | private static string LabelStyleCollection = LabelStyleCollections.IntersectionLabelStyles.ToString() + ".LocationLabelStyles";
18 | private static string LabelStyleType = typeof(IntersectionLocationLabelStyle).ToString();
19 |
20 | public IntersectionLocationLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
21 |
22 | [JsonConstructor]
23 | public IntersectionLocationLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
24 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/MatchLineLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | using Camber.Civil.Styles.Labels.MatchLine;
7 | #endregion
8 |
9 | namespace Camber.UI
10 | {
11 | [NodeName("Match Line Left Label Styles")]
12 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Match Line")]
13 | [NodeDescription("Select Match Line Left Label Style.")]
14 | [IsDesignScriptCompatible]
15 | public class MatchLineLeftLabelStylesDropDown : LabelStyleDropDownBase
16 | {
17 | private const string OutputName = "matchLineLeftLabelStyle";
18 | private static string LabelStyleCollection = LabelStyleCollections.MatchLineLabelStyles.ToString() + "." + MatchLineLabelStyles.LeftLabelStyles.ToString();
19 | private static string LabelStyleType = typeof(MatchLineLeftLabelStyle).ToString();
20 |
21 | public MatchLineLeftLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
22 |
23 | [JsonConstructor]
24 | public MatchLineLeftLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
25 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
26 | }
27 |
28 | [NodeName("Match Line Right Label Styles")]
29 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Match Line")]
30 | [NodeDescription("Select Match Line Right Label Style.")]
31 | [IsDesignScriptCompatible]
32 | public class MatchLineRightLabelStylesDropDown : LabelStyleDropDownBase
33 | {
34 | private const string OutputName = "matchLineRightLabelStyle";
35 | private static string LabelStyleCollection = LabelStyleCollections.MatchLineLabelStyles.ToString() + "." + MatchLineLabelStyles.RightLabelStyles.ToString();
36 | private static string LabelStyleType = typeof(MatchLineRightLabelStyle).ToString();
37 |
38 | public MatchLineRightLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
39 |
40 | [JsonConstructor]
41 | public MatchLineRightLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
42 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/PointLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | #endregion
7 |
8 | namespace Camber.UI
9 | {
10 | [NodeName("Point Label Styles")]
11 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.PointLabelStyle")]
12 | [NodeDescription("Select Point Label Style.")]
13 | [IsDesignScriptCompatible]
14 | public class PointLabelStylesDropDown : LabelStyleDropDownBase
15 | {
16 | private const string OutputName = "pointLabelStyle";
17 | private static string LabelStyleCollection = LabelStyleCollections.PointLabelStyles.ToString() + ".LabelStyles";
18 | private static string LabelStyleType = typeof(PointLabelStyle).ToString();
19 |
20 | public PointLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
21 |
22 | [JsonConstructor]
23 | public PointLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
24 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/ProfileViewLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | using Camber.Civil.Styles.Labels.ProfileView;
7 | #endregion
8 |
9 | namespace Camber.UI
10 | {
11 | [NodeName("Profile View Depth Label Styles")]
12 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Profile View")]
13 | [NodeDescription("Select Profile View Depth Label Style.")]
14 | [IsDesignScriptCompatible]
15 | public class ProfileViewDepthLabelStylesDropDown : LabelStyleDropDownBase
16 | {
17 | private const string OutputName = "profileViewDepthLabelStyle";
18 | private static string LabelStyleCollection = LabelStyleCollections.ProfileViewLabelStyles.ToString() + "." + ProfileViewLabelStyles.DepthLabelStyles.ToString();
19 | private static string LabelStyleType = typeof(ProfileViewDepthLabelStyle).ToString();
20 |
21 | public ProfileViewDepthLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
22 |
23 | [JsonConstructor]
24 | public ProfileViewDepthLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
25 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
26 | }
27 |
28 | [NodeName("Profile View Station Elevation Label Styles")]
29 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Profile View")]
30 | [NodeDescription("Select Profile View Station Elevation Label Style.")]
31 | [IsDesignScriptCompatible]
32 | public class ProfileViewStationElevationLabelStylesDropDown : LabelStyleDropDownBase
33 | {
34 | private const string OutputName = "profileViewStationElevationLabelStyle";
35 | private static string LabelStyleCollection = LabelStyleCollections.ProfileViewLabelStyles.ToString() + "." + ProfileViewLabelStyles.StationElevationLabelStyles.ToString();
36 | private static string LabelStyleType = typeof(ProfileViewStationElevationLabelStyle).ToString();
37 |
38 | public ProfileViewStationElevationLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
39 |
40 | [JsonConstructor]
41 | public ProfileViewStationElevationLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
42 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/ProjectionLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | using Camber.Civil.Styles.Labels.Projection;
7 | #endregion
8 |
9 | namespace Camber.UI
10 | {
11 | [NodeName("Profile View Projection Label Styles")]
12 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Projection")]
13 | [NodeDescription("Select Profile View Projection Label Style.")]
14 | [IsDesignScriptCompatible]
15 | public class ProfileViewProjectionLabelStylesDropDown : LabelStyleDropDownBase
16 | {
17 | private const string OutputName = "profileViewProjectionLabelStyle";
18 | private static string LabelStyleCollection = LabelStyleCollections.ProjectionLabelStyles.ToString() + "." + ProjectionLabelStyles.ProfileViewProjectionLabelStyles.ToString();
19 | private static string LabelStyleType = typeof(ProfileViewProjectionLabelStyle).ToString();
20 |
21 | public ProfileViewProjectionLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
22 |
23 | [JsonConstructor]
24 | public ProfileViewProjectionLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
25 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
26 | }
27 |
28 | [NodeName("Section View Projection Label Styles")]
29 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Projection")]
30 | [NodeDescription("Select Section View Projection Label Style.")]
31 | [IsDesignScriptCompatible]
32 | public class SectionViewProjectionLabelStylesDropDown : LabelStyleDropDownBase
33 | {
34 | private const string OutputName = "sectionViewProjectionLabelStyle";
35 | private static string LabelStyleCollection = LabelStyleCollections.ProjectionLabelStyles.ToString() + "." + ProjectionLabelStyles.SectionViewProjectionLabelStyles.ToString();
36 | private static string LabelStyleType = typeof(SectionViewProjectionLabelStyle).ToString();
37 |
38 | public SectionViewProjectionLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
39 |
40 | [JsonConstructor]
41 | public SectionViewProjectionLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
42 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/SampleLineLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | #endregion
7 |
8 | namespace Camber.UI
9 | {
10 | [NodeName("Sample Line Label Styles")]
11 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.SampleLineLabelStyle")]
12 | [NodeDescription("Select Sample Line Label Style.")]
13 | [IsDesignScriptCompatible]
14 | public class SampleLineLabelStylesDropDown : LabelStyleDropDownBase
15 | {
16 | private const string OutputName = "sampleLineLabelStyle";
17 | private static string LabelStyleCollection = LabelStyleCollections.SampleLineLabelStyles.ToString() + ".LabelStyles";
18 | private static string LabelStyleType = typeof(SampleLineLabelStyle).ToString();
19 |
20 | public SampleLineLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
21 |
22 | [JsonConstructor]
23 | public SampleLineLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
24 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/SectionViewLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | using Camber.Civil.Styles.Labels.SectionView;
7 | #endregion
8 |
9 | namespace Camber.UI
10 | {
11 | [NodeName("Section View Depth Label Styles")]
12 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Section View")]
13 | [NodeDescription("Select Section View Depth Label Style.")]
14 | [IsDesignScriptCompatible]
15 | public class SectionViewDepthLabelStylesDropDown : LabelStyleDropDownBase
16 | {
17 | private const string OutputName = "sectionViewDepthLabelStyle";
18 | private static string LabelStyleCollection = LabelStyleCollections.SectionViewLabelStyles.ToString() + "." + SectionViewLabelStyles.GradeLabelStyles.ToString();
19 | private static string LabelStyleType = typeof(SectionViewDepthLabelStyle).ToString();
20 |
21 | public SectionViewDepthLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
22 |
23 | [JsonConstructor]
24 | public SectionViewDepthLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
25 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
26 | }
27 |
28 | [NodeName("Section View Offset Elevation Label Styles")]
29 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.Section View")]
30 | [NodeDescription("Select Section View Offset Elevation Label Style.")]
31 | [IsDesignScriptCompatible]
32 | public class SectionViewOffsetElevationLabelStylesDropDown : LabelStyleDropDownBase
33 | {
34 | private const string OutputName = "sectionViewOffsetElevationLabelStyle";
35 | private static string LabelStyleCollection = LabelStyleCollections.SectionViewLabelStyles.ToString() + "." + SectionViewLabelStyles.OffsetElevationLabelStyles.ToString();
36 | private static string LabelStyleType = typeof(SectionViewOffsetElevationLabelStyle).ToString();
37 |
38 | public SectionViewOffsetElevationLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
39 |
40 | [JsonConstructor]
41 | public SectionViewOffsetElevationLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
42 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/StructureLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | #endregion
7 |
8 | namespace Camber.UI
9 | {
10 | [NodeName("Structure Label Styles")]
11 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.StructureLabelStyle")]
12 | [NodeDescription("Select Structure Label Style.")]
13 | [IsDesignScriptCompatible]
14 | public class StructureLabelStylesDropDown : LabelStyleDropDownBase
15 | {
16 | private const string OutputName = "structureLabelStyle";
17 | private static string LabelStyleCollection = LabelStyleCollections.StructureLabelStyles.ToString() + ".LabelStyles";
18 | private static string LabelStyleType = typeof(StructureLabelStyle).ToString();
19 |
20 | public StructureLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
21 |
22 | [JsonConstructor]
23 | public StructureLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
24 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Label Styles/ViewFrameLabelStyleDropDowns.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using Newtonsoft.Json;
4 | using Dynamo.Graph.Nodes;
5 | using Camber.Civil.Styles.Labels;
6 | #endregion
7 |
8 | namespace Camber.UI
9 | {
10 | [NodeName("View Frame Label Styles")]
11 | [NodeCategory("Camber.Civil 3D.Styles.Label Styles.ViewFrameLabelStyle")]
12 | [NodeDescription("Select View Frame Label Style.")]
13 | [IsDesignScriptCompatible]
14 | public class ViewFrameLabelStylesDropDown : LabelStyleDropDownBase
15 | {
16 | private const string OutputName = "viewFrameLabelStyle";
17 | private static string LabelStyleCollection = LabelStyleCollections.ViewFrameLabelStyles.ToString() + ".LabelStyles";
18 | private static string LabelStyleType = typeof(ViewFrameLabelStyle).ToString();
19 |
20 | public ViewFrameLabelStylesDropDown() : base(OutputName, LabelStyleCollection, LabelStyleType) { }
21 |
22 | [JsonConstructor]
23 | public ViewFrameLabelStylesDropDown(IEnumerable inPorts, IEnumerable outPorts)
24 | : base(OutputName, LabelStyleCollection, LabelStyleType, inPorts, outPorts) { }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/CamberUI/Civil/Styles/Object Styles/Structure Styles/StructureStyleModelOptionsDropDown.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using CoreNodeModels;
4 | using Dynamo.Graph.Nodes;
5 | using Dynamo.Utilities;
6 | using ProtoCore.AST.AssociativeAST;
7 | using Newtonsoft.Json;
8 | using System.Linq;
9 | #endregion
10 |
11 | namespace Camber.UI
12 | {
13 | [NodeName("Structure Style Model Properties")]
14 | [NodeCategory("Camber.Civil 3D.Styles.Object Styles.StructureStyle")]
15 | [NodeDescription("Select Structure Style model property name.")]
16 | [IsDesignScriptCompatible]
17 | public class StructureStyleModelOptionsDropDown : DSDropDownBase
18 | {
19 | public StructureStyleModelOptionsDropDown() : base("propertyName") { }
20 |
21 | [JsonConstructor]
22 | public StructureStyleModelOptionsDropDown(IEnumerable inPorts, IEnumerable outPorts) : base("propertyName", inPorts, outPorts) { }
23 |
24 | protected override SelectionState PopulateItemsCore(string currentSelection)
25 | {
26 | Items.Clear();
27 |
28 | var newItems = new List()
29 | {
30 | new DynamoDropDownItem("Model View Options", "ModelViewOptions"),
31 | new DynamoDropDownItem("Simple Solid Type", "SimpleSolidType")
32 | };
33 |
34 | Items.AddRange(newItems);
35 | Items = Items.OrderBy(x => x.Name).ToObservableCollection();
36 |
37 | SelectedIndex = -1;
38 | return SelectionState.Restore;
39 | }
40 |
41 | public override IEnumerable BuildOutputAst(List inputAstNodes)
42 | {
43 | if (Items.Count == 0 || SelectedIndex == -1)
44 | {
45 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode()) };
46 | }
47 |
48 | var stringNode = AstFactory.BuildStringNode((string)Items[SelectedIndex].Item);
49 | var assign = AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), stringNode);
50 |
51 | return new List { assign };
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/src/CamberUI/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // Setting ComVisible to false makes the types in this assembly not visible
5 | // to COM components. If you need to access a type in this assembly from
6 | // COM, set the ComVisible attribute to true on that type.
7 | [assembly: ComVisible(false)]
8 |
9 | // The following GUID is for the ID of the typelib if this project is exposed to COM
10 | [assembly: Guid("1bc882eb-92d5-43de-bb73-c910dcc78729")]
11 |
--------------------------------------------------------------------------------
/src/CamberUI/Tools/ModelText/TextAlignmentDropDown.cs:
--------------------------------------------------------------------------------
1 | #region references
2 | using System.Collections.Generic;
3 | using CoreNodeModels;
4 | using Dynamo.Graph.Nodes;
5 | using Dynamo.Utilities;
6 | using ProtoCore.AST.AssociativeAST;
7 | using Newtonsoft.Json;
8 |
9 | #endregion
10 |
11 | namespace Camber.UI
12 | {
13 | [NodeName("Text Alignments")]
14 | [NodeDescription("Select text alignment.")]
15 | [NodeCategory("Camber.Tools.ModelText")]
16 | [IsDesignScriptCompatible]
17 | public class TextAlignmentDropDown : DSDropDownBase
18 | {
19 | #region constructors
20 | public TextAlignmentDropDown() : base("textAlignment") { }
21 |
22 | [JsonConstructor]
23 | public TextAlignmentDropDown(IEnumerable inPorts, IEnumerable outPorts) : base("textAlignment", inPorts, outPorts) { }
24 | #endregion
25 |
26 | #region methods
27 | protected override SelectionState PopulateItemsCore(string currentSelection)
28 | {
29 | Items.Clear();
30 | var newItems = new List()
31 | {
32 | new DynamoDropDownItem("Left", 0),
33 | new DynamoDropDownItem("Right", 1),
34 | new DynamoDropDownItem("Center", 2)
35 | //new DynamoDropDownItem("Justify", 3)
36 | };
37 |
38 | Items.AddRange(newItems);
39 |
40 | SelectedIndex = -1;
41 | return SelectionState.Restore;
42 | }
43 |
44 | public override IEnumerable BuildOutputAst(List inputAstNodes)
45 | {
46 | if (Items.Count == 0 || SelectedIndex == -1)
47 | {
48 | return new[] { AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), AstFactory.BuildNullNode()) };
49 | }
50 |
51 | var intNode = AstFactory.BuildIntNode((int)Items[SelectedIndex].Item);
52 | var assign = AstFactory.BuildAssignment(GetAstIdentifierForOutputIndex(0), intNode);
53 |
54 | return new List { assign };
55 | }
56 | #endregion
57 | }
58 | }
--------------------------------------------------------------------------------
/src/MigrationAssistant/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/MigrationAssistant/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Configuration;
2 | using System.Data;
3 | using System.Windows;
4 | using Application = System.Windows.Application;
5 |
6 | namespace Camber.MigrationAssistant
7 | {
8 | ///
9 | /// Interaction logic for App.xaml
10 | ///
11 | public partial class App : Application
12 | {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/MigrationAssistant/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | [assembly: ThemeInfo(
4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5 | //(used if a resource is not found in the page,
6 | // or application resource dictionaries)
7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8 | //(used if a resource is not found in the page,
9 | // app, or any theme specific resource dictionaries)
10 | )]
11 |
--------------------------------------------------------------------------------
/src/MigrationAssistant/GenerateMigrationsXML.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal
3 |
4 | echo Starting to generate migrations XML...
5 |
6 | cd /d "%~dp0"
7 |
8 | python GenerateMigrationsXML.py
9 |
10 | echo Finished generating migrations XML file
11 |
12 | endlocal
13 |
--------------------------------------------------------------------------------
/src/MigrationAssistant/GenerateMigrationsXML.py:
--------------------------------------------------------------------------------
1 | import os
2 | import re
3 |
4 | def extract_migrations(file_path):
5 | migrations = []
6 |
7 | # Regular expression to find the pattern
8 | pattern = re.compile(r'\[NodeMigrationMapping\(\s*"([^"]+)",\s*"([^"]+)"\s*\)\]', re.MULTILINE)
9 |
10 | with open(file_path, 'r') as file:
11 | content = file.read()
12 | matches = pattern.findall(content)
13 |
14 | for old_name, new_name in matches:
15 | migrations.append((old_name, new_name))
16 | print(f"Found migration: oldName = '{old_name}', newName = '{new_name}'")
17 |
18 | return migrations
19 |
20 | def scan_directory(directory):
21 | all_migrations = []
22 |
23 | # Walk through the directory and find .cs files
24 | for root, _, files in os.walk(directory):
25 | for file in files:
26 | if file.endswith(".cs"):
27 | file_path = os.path.join(root, file)
28 | print(f"Scanning file: {file_path}")
29 | migrations = extract_migrations(file_path)
30 | all_migrations.extend(migrations)
31 |
32 | return all_migrations
33 |
34 | def generate_xml(migrations, output_file):
35 | with open(output_file, 'w') as file:
36 | # Write the XML header
37 | file.write('\n')
38 | file.write('\n')
39 |
40 | for old_name, new_name in migrations:
41 | file.write(' \n')
42 | file.write(f' {old_name}\n')
43 | file.write(f' {new_name}\n')
44 | file.write(' \n')
45 |
46 | file.write('\n')
47 |
48 | # Set directories
49 | script_dir = os.path.dirname(os.path.abspath(__file__))
50 | proj_directory = os.path.join(script_dir, '..', 'Camber')
51 | output_xml = os.path.join(script_dir, "Camber.Migrations.xml")
52 |
53 | # Scan project files
54 | migrations = scan_directory(proj_directory)
55 |
56 | # Generate the XML file
57 | generate_xml(migrations, output_xml)
58 |
59 | print(f"Migration XML saved to {output_xml}")
60 |
--------------------------------------------------------------------------------
/src/MigrationAssistant/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/MigrationAssistant/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace Camber.MigrationAssistant
4 | {
5 | public partial class MainWindow : Window
6 | {
7 | public MigrationViewModel ViewModel { get; }
8 |
9 | public MainWindow()
10 | {
11 | InitializeComponent();
12 | ViewModel = new MigrationViewModel();
13 | DataContext = ViewModel;
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/MigrationAssistant/MigrationAssistant.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net8.0-windows
6 | enable
7 | enable
8 | true
9 | true
10 | Camber.MigrationAssistant
11 | $(MSBuildProjectName)
12 | OnBuildSuccess
13 | false
14 | Copyright © 2024
15 | Camber
16 | Migration assistant for Camber nodes.
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | Always
26 |
27 |
28 | PreserveNewest
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/MigrationAssistant/MigrationResult.cs:
--------------------------------------------------------------------------------
1 | namespace Camber.MigrationAssistant
2 | {
3 | public enum MigrationResult
4 | {
5 | Success,
6 | Skipped,
7 | Error
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/MigrationAssistant/RelayCommand.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 |
3 | namespace Camber.MigrationAssistant
4 | {
5 | public class RelayCommand : ICommand
6 | {
7 | private readonly Action execute;
8 | private readonly Func canExecute;
9 |
10 | public RelayCommand(Action execute, Func canExecute = null)
11 | {
12 | this.execute = execute;
13 | this.canExecute = canExecute;
14 | }
15 |
16 | public bool CanExecute(object parameter)
17 | {
18 | return canExecute == null || canExecute();
19 | }
20 |
21 | public void Execute(object parameter)
22 | {
23 | execute();
24 | }
25 |
26 | public event EventHandler CanExecuteChanged
27 | {
28 | add { CommandManager.RequerySuggested += value; }
29 | remove { CommandManager.RequerySuggested -= value; }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/tests/Alignment/AlignmentCreationTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Alignment/AlignmentCreationTests.dwg
--------------------------------------------------------------------------------
/tests/Alignment/AlignmentTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Alignment/AlignmentTests.dwg
--------------------------------------------------------------------------------
/tests/CodeSetStyles/CodeSetStyleTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/CodeSetStyles/CodeSetStyleTests.dwg
--------------------------------------------------------------------------------
/tests/DisplayStyles/DisplayStyleTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/DisplayStyles/DisplayStyleTests.dwg
--------------------------------------------------------------------------------
/tests/Document/DocumentSettingsTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Document/DocumentSettingsTests.dwg
--------------------------------------------------------------------------------
/tests/ExternalBlockReference/ExternalBlockReferenceTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/ExternalBlockReference/ExternalBlockReferenceTests.dwg
--------------------------------------------------------------------------------
/tests/ExternalDBPoint/ExternalDBPointTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/ExternalDBPoint/ExternalDBPointTests.dwg
--------------------------------------------------------------------------------
/tests/ExternalDocument/ExternalDocumentTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/ExternalDocument/ExternalDocumentTests.dwg
--------------------------------------------------------------------------------
/tests/ExternalLayout/ExternalLayoutTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/ExternalLayout/ExternalLayoutTests.dwg
--------------------------------------------------------------------------------
/tests/ExternalMText/ExternalMTextTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/ExternalMText/ExternalMTextTests.dwg
--------------------------------------------------------------------------------
/tests/Fields/FieldTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Fields/FieldTests.dwg
--------------------------------------------------------------------------------
/tests/GridSurface/GridSurfaceTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/GridSurface/GridSurfaceTests.dwg
--------------------------------------------------------------------------------
/tests/LandXML/LandXML_Export.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/LandXML/LandXML_Export.dwg
--------------------------------------------------------------------------------
/tests/LandXML/LandXML_Import.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/LandXML/LandXML_Import.dwg
--------------------------------------------------------------------------------
/tests/Layouts/LayoutTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Layouts/LayoutTests.dwg
--------------------------------------------------------------------------------
/tests/MText/MTextTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/MText/MTextTests.dwg
--------------------------------------------------------------------------------
/tests/MVBlocks/MVBlockTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/MVBlocks/MVBlockTests.dwg
--------------------------------------------------------------------------------
/tests/Parcels/ParcelsTest.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Parcels/ParcelsTest.dwg
--------------------------------------------------------------------------------
/tests/Pipe Networks/PipeNetwork_AddStructure.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Pipe Networks/PipeNetwork_AddStructure.dwg
--------------------------------------------------------------------------------
/tests/Pipe Networks/PipeNetwork_ConnectStructureToPipe.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Pipe Networks/PipeNetwork_ConnectStructureToPipe.dwg
--------------------------------------------------------------------------------
/tests/Polylines/PolylineTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Polylines/PolylineTests.dwg
--------------------------------------------------------------------------------
/tests/Surface/BoundaryTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Surface/BoundaryTests.dwg
--------------------------------------------------------------------------------
/tests/TINVolumeSurface/TINVolumeSurfaceTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/TINVolumeSurface/TINVolumeSurfaceTests.dwg
--------------------------------------------------------------------------------
/tests/Xref/Xref01.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Xref/Xref01.dwg
--------------------------------------------------------------------------------
/tests/Xref/Xref02.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Xref/Xref02.dwg
--------------------------------------------------------------------------------
/tests/Xref/XrefTests.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mzjensen/Camber/edb69d2e76474536f7c51b5ad22be0536d1a005d/tests/Xref/XrefTests.dwg
--------------------------------------------------------------------------------