Hello,
I try to use the ACA .Net c# API to add a new construct to my project. Currently in 2013.
In the samples I've found one for basic Projetnavigator things, but adding a new construct isn't covered.
Is there any example out there which shows the steps?
THanks,
Tim
ok, found the solution. Here's some code from my method:
ProjectFile info = newProjectFile(_proj);
info.DrawingFullPath =
Path.Combine(Path.GetDirectoryName(item.FullName), filename + ".dwg");
info.FileName =
Path.Combine(Path.GetDirectoryName(item.FullName), filename + ".xml");
info.FileCategory =
FileCategory.Document;
info.Name = filename;
info.Description = filename +
" autogenerated by CadDev ProjectStartup";
//info.Category = new DirectoryInfo(Path.GetDirectoryName(item.FullName)).Name;ProjectRegion reg = newProjectRegion();
reg.Add(
newRegionPair(System.Convert.ToUInt32(level.Id), System.Convert.ToUInt32(wing.Id)));
info.Regions.Add(reg);
//info.Id = level.Id;if (String.IsNullOrEmpty(dirconf.DrawingTemplate))
_proj.AddConstruct(info, _proj.Configuration.DocumentTemplate);
else
{
_proj.AddConstruct(info, dirconf.DrawingTemplate);
}