Skip to content

How To Write Python Script With OpenMEP Package

Chuong Ho edited this page Feb 21, 2023 · 4 revisions

Interactive with OpenMEP package use Python Script

# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('OpenMEP')
import OpenMEP
from OpenMEP.Element import Duct as d

OUT =dir(d)

image

Example Create a Pipe

# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('OpenMEP')
import OpenMEP
from OpenMEP.Element import Pipe as p
systemType = IN[0]
pipeType = IN[1]
level = IN[2]
line = IN[3]
OUT = p.Create(systemType,pipeType,level,line)

image