Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using revitNet DLL, the railing creation fails, and ifailurespreprocessor shows that the sketch is empty

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
1097461414
285 Views, 2 Replies

Using revitNet DLL, the railing creation fails, and ifailurespreprocessor shows that the sketch is empty

When I use a plug-in and use iexternalcommand to implement the following code:

It can succeed!

using (Transaction transaction = new Transaction(RevitDoc))
 {
    transaction.Start("create rallings");
    CurveLoop curveloop = new CurveLoop(); 
    curveloop.Append(Line.CreateBound(new XYZ(),new XYZ(10,0,0));
    Autodesk.Revit.DB.Architecture.Railing.Create(this.RevitDoc, curveloop, railingtype.Id,level.Id);
    transaction.Commit();
 }   

When I use revitNet DLL to create it,It comes the error:sketch is empty.

What is the reason for it. Thanks.

2 REPLIES 2
Message 2 of 3
1097461414
in reply to: 1097461414

My computer uses revit2020

Message 3 of 3
jeremy_tammik
in reply to: 1097461414

I do not know revitNet DLL. I believe it is unsupported. Is it a way to try to use the Revit API without running a Revit session? That is illegal.

  

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

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

Post to forums  

Rail Community


Autodesk Design & Make Report