Exemplo n.º 1
0
def parameter_value_provider(base_class, built_in_parameter):
    # type: (type, str) -> ParameterValueProvider
    element = FilteredElementCollector(doc).OfClass(base_class).FirstElement()
    system_type_parameter_id = element.get_Parameter(built_in_parameter).Id
    return ParameterValueProvider(system_type_parameter_id)
Exemplo n.º 2
0
                            str(name))
                        try:
                            v2 = doc.GetElement(ele).LookupParameter(
                                "Comments").Set(str(struDescription))
                        except:
                            print("Description cannot be found")

                else:
                    print("Creation Error")
        # Error Message
        else:
            print(name + " not built")

    basePoint = FilteredElementCollector(doc).OfCategory(
        BuiltInCategory.OST_ProjectBasePoint).ToElements()[0]
    basePoint.get_Parameter(BuiltInParameter.BASEPOINT_NORTHSOUTH_PARAM).Set(
        yAdjust * -1)
    basePoint.get_Parameter(BuiltInParameter.BASEPOINT_EASTWEST_PARAM).Set(
        xAdjust * -1)
    basePoint.get_Parameter(BuiltInParameter.BASEPOINT_ELEVATION_PARAM).Set(
        zAdjust * -1)
    '''
    surveyPoint = FilteredElementCollector(doc).OfClass(BasePoint).ToElements()[1]
    surveyPoint.get_Parameter(BuiltInParameter.BASEPOINT_NORTHSOUTH_PARAM).Set(ySurveyAdjust*-1)
    surveyPoint.get_Parameter(BuiltInParameter.BASEPOINT_EASTWEST_PARAM).Set(xSurveyAdjust*-1)
    surveyPoint.get_Parameter(BuiltInParameter.BASEPOINT_ELEVATION_PARAM).Set(zSurveyAdjust*-1)
    '''
    projectLocation = uidoc.Document.ActiveProjectLocation
    projectPosition = projectLocation.GetProjectPosition(XYZ(0, 0, 0))

    projectPosition.NorthSouth = ySurveyAdjust * -1
    projectPosition.EastWest = xSurveyAdjust * -1