Document.Create.NewFamilyInstance not working generate in Design Automation For Revit

Document.Create.NewFamilyInstance not working generate in Design Automation For Revit

tan.phanviet
Observer Observer
533 Views
4 Replies
Message 1 of 5

Document.Create.NewFamilyInstance not working generate in Design Automation For Revit

tan.phanviet
Observer
Observer

I want to generate scaffolding automatically by Design Automation but i have a trouble in Create.NewFamilyInstance.

So i'm using BuiltInCategory.OST_SpecialityEquipment into get FilteredElementCollector collector

FilteredElementCollector elementCollector = (new FilteredElementCollector(doc));
// Get Speciality Equipment
FilteredElementCollector col = elementCollector.OfCategory(BuiltInCategory.OST_SpecialityEquipment).OfClass(typeof(FamilySymbol));

And get FamilySymbol SpecialityEquipment to element Id

ScaffoldInfor scaffoldInfor = new ScaffoldInfor
                {
                    Symbol = doc.GetElement(scaffoldId) as FamilySymbol
                };

get the currently defined XYZ coordinates and use NewFamilyInstance(XYZ, FamilySymbol, StructuralType) to insert a new instance of a family into the document

FamilyInstance instance = doc.Create.NewFamilyInstance(currentPosition, scaffoldInfor.Symbol, StructuralType.NonStructural);

 So when i started debug DesignAutomationFramework in local , it worked. But when i pushed on Design Automation API, it failed to create the NewFamilyInstance element i created.

Question : Why is it not working with Design Automation API but still working properly on local ?

Thanks!

0 Likes
534 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

In general, this forum is dedicated to the pure Windows desktop Revit API, and not to Forge related issues.

   

All Forge-related questions are discussed better through the dedicated Forge help channels:

   

https://forge.autodesk.com/en/support/get-help

   

Still, I passed on your question to the development team right now, so we may hear back from them soon if lucky.

 

In future, please ask all Forge related questions via the Forge help channels only.

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

jeremy_tammik
Alumni
Alumni

I heard back from the development team. They say: 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 4 of 5

tan.phanviet
Observer
Observer
0 Likes
Message 5 of 5

jeremy_tammik
Alumni
Alumni

Ok, thanks. I'll pick it up there.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes