Adding a Construct via AddConstruct to my ACA project

Adding a Construct via AddConstruct to my ACA project

Anonymous
Not applicable
450 Views
1 Reply
Message 1 of 2

Adding a Construct via AddConstruct to my ACA project

Anonymous
Not applicable

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

 

0 Likes
451 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

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);

}

0 Likes