Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66694

Re: finding and modifying Repeating Detail type

$
0
0

Weird that code shows colored in the preview, but not after posting...

public static void ShowRepeatingDetailInfo(ElementType elementType) { Parameter parameter = null; string infotext = null; // REPEATING_DETAIL_NUMBER // not a type property (instance) // why is AsString() empty for all? probably cuz the value isn't a "string" - "AsValueString()" is what actually converts it to a string... but that formats it also infotext = "element.Name: " + elementType.Name + "\n\nId: " + elementType.Id + "\n\nFamily Name: " + elementType.FamilyName; parameter = elementType.get_Parameter(BuiltInParameter.REPEATING_DETAIL_SPACING); // length in feet if (parameter != null) infotext = infotext + "\n\nREPEATING_DETAIL_SPACING:" + "\n- AsDouble():" + parameter.AsDouble() + "\n- AsValueString():" + parameter.AsValueString() + "\n- GetAssociatedGlobalParameter():" + parameter.GetAssociatedGlobalParameter(); // -1 means unassigned parameter = elementType.get_Parameter(BuiltInParameter.REPEATING_DETAIL_LAYOUT); // 1=Fixed Distance, 2=Fixed Number, 3=Maximum Spacing, 4=Fill Available Space if (parameter != null) infotext = infotext + "\n\nREPEATING_DETAIL_LAYOUT:" + "\n- AsInteger():" + parameter.AsInteger() + "\n- AsValueString():" + parameter.AsValueString() + "\n- GetAssociatedGlobalParameter():" + parameter.GetAssociatedGlobalParameter(); // -1 means unassigned parameter = elementType.get_Parameter(BuiltInParameter.REPEATING_DETAIL_ELEMENT); // -1=<none> if (parameter != null) infotext = infotext + "\n\nREPEATING_DETAIL_ELEMENT:" + "\n- AsElementId():" + parameter.AsElementId() + "\n- AsValueString():" + parameter.AsValueString() + "\n- GetAssociatedGlobalParameter():" + parameter.GetAssociatedGlobalParameter(); // -1 means unassigned parameter = elementType.get_Parameter(BuiltInParameter.REPEATING_DETAIL_INSIDE); // 0=No, 1=Yes if (parameter != null) infotext = infotext + "\n\nREPEATING_DETAIL_INSIDE:" + "\n- AsInteger():" + parameter.AsInteger() + "\n- AsValueString():" + parameter.AsValueString() + "\n- GetAssociatedGlobalParameter():" + parameter.GetAssociatedGlobalParameter(); // -1 means unassigned parameter = elementType.get_Parameter(BuiltInParameter.REPEATING_DETAIL_ROTATION); // 0=None, 1=90° Clockwise, 2=180°, 3=90° Counterclockwise if (parameter != null) infotext = infotext + "\n\nREPEATING_DETAIL_ROTATION:" + "\n- AsInteger():" + parameter.AsInteger() + "\n- AsValueString():" + parameter.AsValueString() + "\n- GetAssociatedGlobalParameter():" + parameter.GetAssociatedGlobalParameter(); // -1 means unassigned TaskDialog.Show("Test", infotext); return; }

 


Viewing all articles
Browse latest Browse all 66694

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>