.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding a Construct via AddConstruct to my ACA project

1 REPLY 1
Reply
Message 1 of 2
THoffeller
329 Views, 1 Reply

Adding a Construct via AddConstruct to my ACA project

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

 

1 REPLY 1
Message 2 of 2
THoffeller
in reply to: THoffeller

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

}

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost