Hi.
If I have this:
ObjectId slgId = SampleLineGroup.Create("My SampleLineGroup", alignment.ObjectId);
I don ´t want ask to user the sampleLineGroup name by prompt. I want to create a new sample line group which its name was default template name.
How can I do this?
Solved! Go to Solution.
Solved by joantopo. Go to Solution.
Solved.
SettingsSampleLine.SettingsNameFormat Members
Autodesk.Civil.ApplicationServices.CivilDocument civDoc = default(Autodesk.Civil.ApplicationServices.CivilDocument);
civDoc = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument; //obtener el documento de Civil
Autodesk.Civil.Settings.SettingsCmdCreateSampleLines comando = civDoc.Settings.GetSettings<Autodesk.Civil.Settings.SettingsCmdCreateSampleLines>() as Autodesk.Civil.Settings.SettingsCmdCreateSampleLines; string NombrePlantilla= comando.NameFormat.SampleLineGroup.Value;
or:
Autodesk.Civil.Settings.SettingsSampleLine format = civDoc.Settings.GetSettings<Autodesk.Civil.Settings.SettingsSampleLine>() as Autodesk.Civil.Settings.SettingsSampleLine;
I would like to know how did you convert provided string to a name. Did you develop a custom function where you parse the string and create a new name? What about NextCounter? I could not find a way to get its current value from C3D API.