Hi everyone,
I am trying to export fabrication element to .MAJ. I tried with DynaFabrication 2018,2017 but it is not working. Also, I tried to write Python Script but I am not really good at it.
So I share What I have done so far, I appreciated if you share your ideas.
Thanks
Load the Python Standard and DesignScript Libraries
import clr
import sys
sys.path.append(‘C:\Program Files (x86)\IronPython 2.7\Lib’)
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
clr.AddReference(‘RevitNodes’)
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference(‘RevitServices’)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference(‘RevitAPI’)
import Autodesk
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
The inputs to this node will be stored as a list in the IN variables.
elm_id = IN[0] if isinstance(IN[0], list) else [IN[0]]
fl_nm = IN[1] if isinstance(IN[1], list) else [IN[1]]
sv_opt = IN[2]
Place your code below this line
for id,nm in zip (elm_id, fl_nm):
maj = ISet<ElementId>.SaveAsFabricationJob(doc,id,nm,sv_opt)
Assign your output to the OUT variable.
OUT = maj