Buckets:
kuklev9797/revit-ckpts / assets /samples /Samples /ContextualAnalyticalModel /CS /CreateAnalyticalCurvedPanel.cs
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Autodesk.Revit; | |
| using Autodesk.Revit.DB; | |
| using Autodesk.Revit.UI; | |
| using Autodesk.Revit.DB.Structure; | |
| namespace ContextualAnalyticalModel | |
| { | |
| /// <summary> | |
| /// Implements the Revit add-in interface IExternalCommand | |
| /// </summary> | |
| [] | |
| [] | |
| class CreateAnalyticalCurvedPanel : IExternalCommand | |
| { | |
| public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) | |
| { | |
| try | |
| { | |
| Document revitDoc = commandData.Application.ActiveUIDocument.Document; | |
| using (Transaction transaction = new Transaction(revitDoc, "Create Analytical Curved Panel")) | |
| { | |
| transaction.Start(); | |
| Arc arc = Arc.Create(new XYZ(10, 10, 0), new XYZ(0, 0, 0), new XYZ(15, 10, 0)); | |
| //create a curved AnalyticalPanel | |
| AnalyticalPanel analyticalCrvPanel = AnalyticalPanel.Create(revitDoc, arc, new XYZ(0, 0, 1)); | |
| analyticalCrvPanel.StructuralRole = AnalyticalStructuralRole.StructuralRoleFloor; | |
| analyticalCrvPanel.AnalyzeAs = AnalyzeAs.SlabOneWay; | |
| transaction.Commit(); | |
| } | |
| return Result.Succeeded; | |
| } | |
| catch (Exception ex) | |
| { | |
| message = ex.Message; | |
| return Result.Failed; | |
| } | |
| } | |
| } | |
| } | |
Xet Storage Details
- Size:
- 1.71 kB
- Xet hash:
- 93e0056390f22894cafd10341aa5765c9b2d0847344fff6ebbbbeea019c1993d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.