« What Next? | Main | Units »

September 16, 2008

Comments

Hi Jeremy, I don't know if that's the right place to ask but I have a problem with wall brutto area. I'm using the methode with deleting the wall and reverting the changes to determine all the elements that are placed on the wall. Then, I'm removing the wall's id from the ElementSet getting the value of HOST_AREA_COMPUTED in a variable and reverting the changes again. The result, however, is the wall netto area :( Does the parameter or wall needs any kind of reload? Or maybe there's a easier way to get the brutto area? Any help would be appreciated as I can't find anything related to that problem. Thanks in advance!

foreach (Wall wallElem in elems)
{
try
{
Double brutto = 0.0;
ICollection delIds = null;

using (SubTransaction t = new SubTransaction(doc))
{
try
{
t.Start();

delIds = doc.Delete(wallElem);

t.RollBack();

}
catch (Exception ex)
{
message = "Deletion failed: " + ex.Message;
t.RollBack();
}
}

using (SubTransaction u = new SubTransaction(doc))
{
try
{
u.Start();

delIds.Remove(wallElem.Id);
ICollection ie = doc.Delete(delIds);
brutto = wallElem.get_Parameter(BuiltInParameter.HOST_AREA_COMPUTED).AsDouble();
u.RollBack();
}
catch (Exception ex)
{
message = "Deletion failed: " + ex.Message;
u.RollBack();
}
}
wallElem.get_Parameter("Wall Area Bruto").Set(brutto);
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
}

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource