Message 1 of 22
Revit .Net API has function overloading, however Python doesn't support overloading
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am using this function - NewFamilyInstance Method (Line, FamilySymbol, View). However, this function has overloading in API.
The .net support function overloading, however Python doesn't support that. How can Revit Python API work in this case?
When I use one of these functions and pass the different parameters, how can this work properly?
fis = db.Collector(of_class='FamilyInstance') start_point = XYZ(1, 0, 0) end_point = XYZ(2, 0, 0) line = Line.new(start_point, end_point) views = db.Collector(of_class='View') ItemFactoryBase.NewFamilyInstance(line, fis[1].Symbol, views[1])
The code above gave me the following error in RevitPythonShell
ItemFactoryBase.NewFamilyInstance(line, fis[1].Symbol, views[1])
Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: NewFamilyInstance() takes at least 4 arguments (3 given)