Message 1 of 4
Problem when mirroring newly modified family instance

Not applicable
08-01-2018
02:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
My situation is this:
- A new family instance is placed
- some instance parameters in the new family instance is modified
- the family instance is mirrored
- the mirrored instance don't inherit the newly modified parameters
Here's my code:
FamilyInstance instance = doc.Create.NewFamilyInstance(somePoint, someSymbol, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); ElementTransformUtils.RotateElement(doc, instance.Id, someLine, someRotation); instance.LookupParameter("Width").Set(someWidth); instance.LookupParameter("Height").Set(someHeight); instance.LookupParameter("Depth").Set(someDepth); ElementTransformUtils.MirrorElement(doc, instance.Id, somePlane);
The weird thing is that if I run the MirrorElement() function twice, it will work the second time! I thought because of this that the first mirror function ran before the parameters were successfully modified, but I've tried different delay tricks, but with no luck.