Line loads creation via python


#1

Hi guys!

I’m trying to get a script, which will create a line load in Revit. I’ve searched a lot in the API documentation, but I dont get C# examples and I got stuck with the AnalyticalLinkType.
Could somebody help me out with this or at least tell me if I’m going the right way? Here is what I’ve made:

 

loads


Revit Line loads through Dynamo
Revit line load with c#
#2

Hi Pawel,

have a look at the following example:


#3

Thanks a lot for your respond Dimitar! I’ll give it a try as soon as possible!


#4

Well, the script works just fine for beams.

But when I change the input for walls, or curves/lines, it always prompts for an analytical model stick

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “<string>”, line 33, in <module>
TypeError: expected AnalyticalModelStick, got AnalyticalModelSurface

I cant find in the API a creation method, as it creates a lineload directly in Revit by selecting two points


#5

Ok, I think I got it. Thanks again for help.


#6

Yes, as you’ve figured out, you can just use the host-less method. But keep in mind that that line load element will not follow your beams and walls. I suggest something along the lines of this:


#7

Yep, works just perfect! Thanks a lot!