public override bool Execute(ExecutionInfo exInfo = null) { BuildUp = Model.Create.BuildUpFamily(Name, exInfo); BuildUp.Layers.Clear(); BuildUp.Layers.Add(new BuildUpLayer(Thickness, Material)); return(true); }
/// <summary> /// Write a Build-Up property to ETABS /// </summary> /// <param name="buildUp"></param> /// <param name="context"></param> public void WriteBuildUp(BuildUpFamily buildUp, ETABSConversionContext context) { string name = buildUp.Name; string matProp = GetEquivalentMaterial(buildUp.GetPrimaryMaterial()); //SapModel.PropArea.SetDeck(name, eDeckType.SolidSlab, eShellType.ShellThin, matProp, buildUp.Layers.TotalThickness); SapModel.PropArea.SetSlab(name, eSlabType.Slab, eShellType.ShellThin, matProp, buildUp.Layers.TotalThickness); // TODO: Check if working }
public override bool Execute(ExecutionInfo exInfo = null) { Elements = new ElementCollection(); if (Geometry != null) { // Convert each geometry item: foreach (VertexGeometry shape in Geometry) { if (shape is Curve) // Convert to linear element { LinearElement element = Model.Create.LinearElement((Curve)shape, exInfo); if (FamiliesFromLayers && shape.Attributes != null && !string.IsNullOrWhiteSpace(shape.Attributes.LayerName)) { string layerName = shape.Attributes.LayerName; SectionFamily sF = Model.Families.Sections.FindByName(layerName); if (sF == null) { sF = Model.Create.SectionFamily(layerName, exInfo); } element.Family = sF; } Elements.Add(element); } else if (shape is Surface) //Reminder: Meshes are also surfaces! { PanelElement element = Model.Create.PanelElement((Surface)shape, exInfo); if (FamiliesFromLayers && shape.Attributes != null && !string.IsNullOrWhiteSpace(shape.Attributes.LayerName)) { string layerName = shape.Attributes.LayerName; BuildUpFamily fF = Model.Families.PanelFamilies.FindByName(layerName); if (fF == null) { fF = Model.Create.BuildUpFamily(layerName, exInfo); } element.Family = fF; } Elements.Add(element); } } Elements.GenerateNodes(new NodeGenerationParameters()); return(true); } return(false); }
/// <summary> /// Override function which invalidates the representations of objects as necessary when a design update occurs /// In this case, the section representations need to be updated whenever the section geometry changes as well as /// the element geometry (which is done by default) /// </summary> /// <param name="doc"></param> /// <param name="e"></param> public override void InvalidateOnUpdate(object modified, PropertyChangedEventArgs e) { if (modified is BuildUpFamily) { BuildUpFamily sp = (BuildUpFamily)modified; ElementCollection els = sp.Elements(); foreach (PanelElement lEl in els) { InvalidateRepresentation(lEl); } Core.Instance.Host.Refresh(); } else { base.InvalidateOnUpdate(modified, e); if (modified is PanelElement && (e.PropertyName == "Family")) { Core.Instance.Host.Refresh(); } } }
public override bool Execute(ExecutionInfo exInfo = null) { BuildUp = Model.Families.FindByName(Name) as BuildUpFamily; return(true); }
/// <summary> /// Remove a panel family entry /// </summary> /// <param name="family"></param> public void Remove(BuildUpFamily family) { Remove(ThicknessCategory, family.GUID); }
/// <summary> /// Add a new Panel Family entry to this mapping table /// </summary> /// <param name="family"></param> /// <param name="label"></param> public void Add(BuildUpFamily family, IRobotLabel label) { Add(ThicknessCategory, family.GUID, label.Name); }