This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Object Layer Settings | |
public void SetAlignmentLayer(string layerName, Autodesk.Civil.Settings.ObjectLayerModifierType modifierType, string modifierValue, Boolean locked) | |
{ | |
civilDoc.Settings.DrawingSettings.ObjectLayerSettings.GetObjectLayerSetting(Autodesk.Civil.Settings.SettingsObjectLayerType.Alignment).LayerName = layerName; | |
civilDoc.Settings.DrawingSettings.ObjectLayerSettings.GetObjectLayerSetting(Autodesk.Civil.Settings.SettingsObjectLayerType.Alignment).Modifier = modifierType; | |
civilDoc.Settings.DrawingSettings.ObjectLayerSettings.GetObjectLayerSetting(Autodesk.Civil.Settings.SettingsObjectLayerType.Alignment).ModifierValue = modifierValue; | |
civilDoc.Settings.DrawingSettings.ObjectLayerSettings.GetObjectLayerSetting(Autodesk.Civil.Settings.SettingsObjectLayerType.Alignment).Locked = locked; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SetAlignmentLayer(string layerName, Autodesk.Civil.Settings.ObjectLayerModifierType modifierType, string modifierValue, Boolean locked) | |
{ | |
civilDoc.Settings.DrawingSettings.ObjectLayerSettings.GetObjectLayerSetting(Autodesk.Civil.Settings.SettingsObjectLayerType.Alignment).LayerName = layerName; | |
civilDoc.Settings.DrawingSettings.ObjectLayerSettings.GetObjectLayerSetting(Autodesk.Civil.Settings.SettingsObjectLayerType.Alignment).Modifier = modifierType; | |
civilDoc.Settings.DrawingSettings.ObjectLayerSettings.GetObjectLayerSetting(Autodesk.Civil.Settings.SettingsObjectLayerType.Alignment).ModifierValue = modifierValue; | |
civilDoc.Settings.DrawingSettings.ObjectLayerSettings.GetObjectLayerSetting(Autodesk.Civil.Settings.SettingsObjectLayerType.Alignment).Locked = locked; | |
} | |
public void SetAlignmentLayer(string layerName) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setInfinityAbv(string abv) | |
{ | |
civilDoc.Settings.DrawingSettings.AbbreviationsSettings.GeneralText.Infinity = abv; | |
} | |
public void setLeftAbv(string abv) | |
{ | |
civilDoc.Settings.DrawingSettings.AbbreviationsSettings.GeneralText.Left = abv; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setAlignmnetAbv(Autodesk.Civil.Land.Settings.AbbreviationAlignmentType abvType, string abv) | |
{ | |
civilDoc.Settings.DrawingSettings.AbbreviationsSettings.AlignmentGeoPointText.SetAlignmentAbbreviation(abvType, abv); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setAlignmentPointEntityData(Autodesk.Civil.Land.Settings.AbbreviationAlignmentEnhancedType abvtype, string abv) | |
{ | |
civilDoc.Settings.DrawingSettings.AbbreviationsSettings.AlignmentGeoPointEntityData.SetAlignmentEnhancedAbbreviation(abvtype, abv); | |
} | |
public void setSuperElevationAbv(Autodesk.Civil.Land.Settings.AbbreviationSuperelevationType abvType, string abv) | |
{ | |
civilDoc.Settings.DrawingSettings.AbbreviationsSettings.Superelevation.SetSuperelevationAbbreviation(abvType, abv); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SetAmbientSettingsElevation(Autodesk.Civil.LinearUnitType unit, int precision, Autodesk.Civil.RoundingType rounding, Autodesk.Civil.SignType sign) | |
{ | |
civilDoc.Settings.DrawingSettings.AmbientSettings.Elevation.Unit.Value = unit; | |
civilDoc.Settings.DrawingSettings.AmbientSettings.Elevation.Precision.Value = precision; | |
civilDoc.Settings.DrawingSettings.AmbientSettings.Elevation.Rounding.Value = rounding; | |
civilDoc.Settings.DrawingSettings.AmbientSettings.Elevation.Sign.Value = sign; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Autodesk.AutoCAD.DatabaseServices.ObjectId CreateMarkerStyle(string msName) | |
{ | |
Autodesk.AutoCAD.ApplicationServices.Document acadDoc = | |
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; | |
Autodesk.Civil.ApplicationServices.CivilDocument civilDoc = | |
Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument; | |
using (Autodesk.AutoCAD.DatabaseServices.Transaction trans = | |
acadDoc.Database.TransactionManager.StartTransaction()) | |
{ | |
Autodesk.Civil.DatabaseServices.Styles.MarkerStyleCollection msCollection = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CommandMethod("CreateMS")] | |
public void CreateMS() | |
{ | |
CreateMarkerStyle("Test Marker Style"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Autodesk.AutoCAD.DatabaseServices.ObjectId getMSId (string msName) | |
{ | |
Autodesk.AutoCAD.ApplicationServices.Document acadDoc = | |
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; | |
Autodesk.Civil.ApplicationServices.CivilDocument civilDoc = | |
Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument; | |
Autodesk.AutoCAD.DatabaseServices.ObjectId msStyleId = Autodesk.AutoCAD.DatabaseServices.ObjectId.Null; | |
bool msExists = civilDoc.Styles.MarkerStyles.Contains(msName); | |
using (Autodesk.AutoCAD.DatabaseServices.Transaction trans = acadDoc.Database.TransactionManager.StartTransaction()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CommandMethod("getMS")] | |
public void GetMS() | |
{ | |
getMSId("Test Marker Style"); | |
} |
OlderNewer