mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-17 10:59:05 +00:00
added Revit 2022 SDK minus except *rvt and *rfa
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.AddElementsToConnection.CS
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
// The transaction and its status. We use Revit's Transaction class for this purpose
|
||||
Autodesk.Revit.DB.Transaction trans = new Autodesk.Revit.DB.Transaction(doc, "Update structural connection");
|
||||
TransactionStatus ts = TransactionStatus.Uninitialized;
|
||||
|
||||
try
|
||||
{
|
||||
// Select the connection to add input elements to, using Revit's StructuralConnectionHandler class
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
StructuralConnectionHandler conn = Utilities.Functions.SelectConnection(activeDoc);
|
||||
|
||||
if (null == conn)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// Select elements to add to connection
|
||||
IList<ElementId> ids = Utilities.Functions.SelectConnectionElements(activeDoc, "Select elements to add to connection :");
|
||||
|
||||
if (ids.Count() <= 0)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// Start the transaction
|
||||
trans.Start();
|
||||
// Add the elements to the connection
|
||||
conn.AddElementIds(ids);
|
||||
// Commit the transaction
|
||||
ts = trans.Commit();
|
||||
|
||||
if (ts != TransactionStatus.Committed)
|
||||
{
|
||||
message = "Failed to commit the current transaction !";
|
||||
trans.RollBack();
|
||||
return Result.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
return Result.Cancelled;
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.ArgumentException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
message = "No or already existing input elements selected!";
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.AddElementsToCustomConnection.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// The transaction and its status. We use Revit's Transaction class for this purpose
|
||||
Autodesk.Revit.DB.Transaction trans = new Autodesk.Revit.DB.Transaction(doc, "Add element(s) to custom connection");
|
||||
TransactionStatus ts = TransactionStatus.Uninitialized;
|
||||
|
||||
try
|
||||
{
|
||||
// Selecting the custom connection, using Revit's StructuralConnectionHandler class
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
StructuralConnectionHandler conn = Utilities.Functions.SelectConnection(activeDoc);
|
||||
|
||||
if (null == conn)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
if (!(conn.IsCustom()))
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
// Select elements to add to connection.
|
||||
IList<Reference> refs = Utilities.Functions.SelectConnectionElementsCustom(activeDoc);
|
||||
|
||||
if (refs.Count() <= 0)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// Start transaction
|
||||
trans.Start();
|
||||
// Adding the elements to the custom connection, using Revit's StructuralConnectionHandlerType class
|
||||
StructuralConnectionHandlerType.AddElementsToCustomConnection(conn, refs);
|
||||
// Commit the transaction
|
||||
ts = trans.Commit();
|
||||
|
||||
if (ts != TransactionStatus.Committed)
|
||||
{
|
||||
message = "Failed to commit the current transaction !";
|
||||
trans.RollBack();
|
||||
return Result.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
return Result.Cancelled;
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.ArgumentException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
message = "Custom connection already contains the selected element(s)!";
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
//
|
||||
// (C) Copyright 2003-2020 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using Autodesk.AdvanceSteel.ApplicabilityRanges;
|
||||
using Autodesk.AdvanceSteel.ConstructionTypes;
|
||||
using Autodesk.AdvanceSteel.DotNetRoots.Units;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.DB.Structure.StructuralSections;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.AddRangesToConnectionType.CS
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
// The transaction and its status. We use Revit's Transaction class for this purpose
|
||||
Autodesk.Revit.DB.Transaction trans = new Autodesk.Revit.DB.Transaction(doc, "Add ranges of applicability");
|
||||
TransactionStatus ts = TransactionStatus.Uninitialized;
|
||||
|
||||
try
|
||||
{
|
||||
// Select the connection to add ranges, using Revit's StructuralConnectionHandler class
|
||||
StructuralConnectionHandler conn = Utilities.Functions.SelectConnection(activeDoc);
|
||||
|
||||
if (null == conn)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
StructuralConnectionHandlerType connectionType = doc.GetElement(conn.GetTypeId()) as StructuralConnectionHandlerType;
|
||||
|
||||
if (null == connectionType)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
RuleApplicabilityRangeTable rangeTable = ApplicabilityRangesAccess.GetRanges(connectionType);
|
||||
|
||||
// Create the rows and add the conditions to them
|
||||
RuleApplicabilityRangeRow rangeRow1 = new RuleApplicabilityRangeRow();
|
||||
rangeRow1.Key = "My new range 1";
|
||||
rangeRow1.Ranges = CreateConditionsForRow1();
|
||||
|
||||
RuleApplicabilityRangeRow rangeRow2 = new RuleApplicabilityRangeRow();
|
||||
rangeRow2.Key = "My new range 2";
|
||||
rangeRow2.Ranges = CreateConditionsForRow2();
|
||||
|
||||
// get existing rows
|
||||
RuleApplicabilityRangeRow[] rows = rangeTable.Rows;
|
||||
RuleApplicabilityRangeRow[] newRows = new RuleApplicabilityRangeRow[] { rangeRow1, rangeRow2 };
|
||||
|
||||
// set back the rows
|
||||
rangeTable.Rows = rows.Concat(newRows).ToArray();
|
||||
|
||||
// we can also verify if the conditions added in the ranges are met. If the result is false it means that the input elements are out of the defined conditions
|
||||
bool validate = ApplicabilityRangeValidator.Validate(conn, rangeTable, "Revit", "");
|
||||
|
||||
// Start the transaction
|
||||
trans.Start();
|
||||
|
||||
// Save the ranges
|
||||
ApplicabilityRangesAccess.SaveRanges(connectionType, rangeTable);
|
||||
|
||||
// Commit the transaction
|
||||
ts = trans.Commit();
|
||||
|
||||
if (ts != TransactionStatus.Committed)
|
||||
{
|
||||
message = "Failed to commit the current transaction !";
|
||||
trans.RollBack();
|
||||
return Result.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
return Result.Cancelled;
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.ArgumentException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
message = "Failed to add ranges";
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
|
||||
private static RuleApplicabilityCondition[] CreateConditionsForRow1()
|
||||
{
|
||||
// the conditions are for the 1st element from the connection
|
||||
int connectionObjectIdx = 0;
|
||||
|
||||
// create a condition for FX parameter
|
||||
RuleApplicabilityConditionRange condition1 = new RuleApplicabilityConditionRange()
|
||||
{
|
||||
Key = "Cond1",
|
||||
MinVal = new RuleApplicabilityData(0.0), // 0 KN
|
||||
MaxVal = new RuleApplicabilityData(5.0), // 5 KN
|
||||
ObjectId = connectionObjectIdx,
|
||||
Unit = Unit.eUnitType.kForce,
|
||||
PropertyId = RuleApplicabilityPropertyId.kFx
|
||||
};
|
||||
|
||||
|
||||
// create a condition for material parameter
|
||||
RuleApplicabilityConditionList condition2 = new RuleApplicabilityConditionList()
|
||||
{
|
||||
Key = "Cond2",
|
||||
Items = new RuleApplicabilityData[2] { new RuleApplicabilityData("some material name 1"), new RuleApplicabilityData("some material name 2") },
|
||||
ObjectId = connectionObjectIdx,
|
||||
PropertyId = RuleApplicabilityPropertyId.kMaterial_Name
|
||||
};
|
||||
|
||||
// create a condition for family name parameter
|
||||
RuleApplicabilityConditionList condition3 = new RuleApplicabilityConditionList()
|
||||
{
|
||||
Key = "Cond3",
|
||||
Items = new RuleApplicabilityData[1] { new RuleApplicabilityData("W Shapes") },
|
||||
ObjectId = connectionObjectIdx,
|
||||
PropertyId = RuleApplicabilityPropertyId.kSection_Class
|
||||
};
|
||||
|
||||
return new RuleApplicabilityCondition[]{condition1, condition2, condition3 };
|
||||
}
|
||||
|
||||
private static RuleApplicabilityCondition[] CreateConditionsForRow2()
|
||||
{
|
||||
// the conditions are for the 1st element from the connection
|
||||
int connectionObjectIdx = 0;
|
||||
|
||||
// create a condition for MX parameter
|
||||
RuleApplicabilityConditionRange condition1 = new RuleApplicabilityConditionRange()
|
||||
{
|
||||
Key = "Cond1",
|
||||
MinVal = new RuleApplicabilityData(0.0), // 0 KN-M
|
||||
MaxVal = new RuleApplicabilityData(5.0), // 5 KN-M
|
||||
ObjectId = connectionObjectIdx,
|
||||
Unit = Unit.eUnitType.kMoment,
|
||||
PropertyId = RuleApplicabilityPropertyId.kMx
|
||||
};
|
||||
|
||||
// create a condition for section shape
|
||||
RuleApplicabilityConditionList condition2 = new RuleApplicabilityConditionList()
|
||||
{
|
||||
Key = "Cond2",
|
||||
Items = new RuleApplicabilityData[1] { new RuleApplicabilityData((int)StructuralSectionShape.IParallelFlange)},
|
||||
ObjectId = connectionObjectIdx,
|
||||
PropertyId = RuleApplicabilityPropertyId.kSection_Shape
|
||||
};
|
||||
|
||||
// create a condition for flange thickness
|
||||
RuleApplicabilityConditionRange condition3 = new RuleApplicabilityConditionRange()
|
||||
{
|
||||
Key = "Cond3",
|
||||
MinVal = new RuleApplicabilityData(10.0), // 10 mm
|
||||
MaxVal = new RuleApplicabilityData(20.0), // 20 mm
|
||||
ObjectId = connectionObjectIdx,
|
||||
Unit = Unit.eUnitType.kDistance,
|
||||
PropertyId = RuleApplicabilityPropertyId.kSection_FlangeThickness
|
||||
};
|
||||
|
||||
return new RuleApplicabilityCondition[] { condition1, condition2, condition3 };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
//
|
||||
// (C) Copyright 2003-2018 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Events;
|
||||
using Autodesk.Revit.DB.Steel;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.AdvanceSteel.CADLink.Database;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.BackgroundCalculation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
// Revit Id of a steel plate.
|
||||
private ElementId _plateId;
|
||||
// Current Revit document.
|
||||
private Document _doc;
|
||||
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
UIApplication uiApp = commandData.Application;
|
||||
//Get the document from external command data.
|
||||
UIDocument uiDoc = commandData.Application.ActiveUIDocument;
|
||||
_doc = uiDoc.Document;
|
||||
|
||||
if (null == _doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Create a steel plate. The view should be in Fine mode to see the plate on screen.
|
||||
// It's better to switch to 3d view (current view could be Level view and the plate could not be visible on that level)
|
||||
_plateId = CreatePlate(XYZ.Zero);
|
||||
|
||||
// This would generate background calculation (You can see the task running in the Revit "Background processes" window).
|
||||
MovePlate();
|
||||
|
||||
// Check for active background calculations.
|
||||
bool backgroundCalc = _doc.IsBackgroundCalculationInProgress(); // It should be true.
|
||||
|
||||
// Try to create another plate while background calculation are in progress. This should not succeed !
|
||||
CreatePlate(new XYZ(10, 10, 0));
|
||||
|
||||
// Register for the idling event and wait for the background calculations to finish.
|
||||
uiApp.Idling += IdlingHandler;
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle the idling event.
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="args"></param>
|
||||
public void IdlingHandler(object sender, IdlingEventArgs args)
|
||||
{
|
||||
UIApplication uiApp = sender as UIApplication;
|
||||
if (uiApp != null)
|
||||
{
|
||||
UIDocument uiDoc = uiApp.ActiveUIDocument;
|
||||
if (uiDoc != null)
|
||||
{
|
||||
Document doc = uiDoc.Document;
|
||||
// If we still have background calculation then return and wait for them to finish.
|
||||
if (!doc.IsBackgroundCalculationInProgress())
|
||||
{
|
||||
// Now we can safely create a new plate.
|
||||
CreatePlate(new XYZ(-10, -10, 0));
|
||||
|
||||
// Deregister from idling event.
|
||||
uiApp.Idling -= IdlingHandler;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates steel plate.
|
||||
/// </summary>
|
||||
/// <returns>Returns Revit id of the created plate.</returns>
|
||||
private ElementId CreatePlate(XYZ plateCenter)
|
||||
{
|
||||
ElementId ret = ElementId.InvalidElementId;
|
||||
|
||||
Guid plateUniqueId = Guid.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(_doc, false, "Create structural plate"))
|
||||
{
|
||||
// Create a plate using Advance Steel API (internal Advance Steel units are in mm)
|
||||
Point3d orig = new Point3d(Utilities.Functions.FEET_TO_MM * plateCenter.X,
|
||||
Utilities.Functions.FEET_TO_MM * plateCenter.Y,
|
||||
Utilities.Functions.FEET_TO_MM * plateCenter.Z);
|
||||
Plate plate = new Plate(new Autodesk.AdvanceSteel.Geometry.Plane(Point3d.kOrigin, Vector3d.kZAxis), orig, 2000, 1000);
|
||||
plate.Thickness = 10;
|
||||
|
||||
// Write plate to database.
|
||||
plate.WriteToDb();
|
||||
|
||||
plateUniqueId = plate.GetUniqueId();
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
catch (System.InvalidOperationException ex)
|
||||
{
|
||||
//Cannot copy plate due to background calculation in progress !
|
||||
System.Diagnostics.Debug.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
// Get Revit element id from Advance Steel plate unique id.
|
||||
Reference elem = SteelElementProperties.GetReference(_doc, plateUniqueId);
|
||||
if(elem != null)
|
||||
{
|
||||
ret = elem.ElementId;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Move steel plate.
|
||||
/// </summary>
|
||||
private void MovePlate()
|
||||
{
|
||||
// Start Revit transaction.
|
||||
using (Autodesk.Revit.DB.Transaction trans = new Autodesk.Revit.DB.Transaction(_doc, "Move plate"))
|
||||
{
|
||||
trans.Start();
|
||||
|
||||
// internal Revit units are in feet
|
||||
ElementTransformUtils.MoveElement(_doc, _plateId, new XYZ(-50, 0, 0));
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreateAnchorPattern.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Selecting the elements to create the anchor pattern on
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Element, "Pick an element to create the anchor pattern on");
|
||||
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(activeDoc.Document, false, "Create anchor pattern"))
|
||||
{
|
||||
// We create the anchor pattern using Advance Steel classes and objects only.
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
List<FilerObject> filerObjectList= new List<FilerObject>();
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
|
||||
if (null == filerObj)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
filerObjectList.Add(filerObj);
|
||||
|
||||
// Point of reference for the anchor pattern. We use GlobalPoint to create the pattern on the plate. GlobalPoint is the point where the plate is being hit when selected.
|
||||
Point3d p1 = new Point3d(eRef.GlobalPoint.X, eRef.GlobalPoint.Y, eRef.GlobalPoint.Z);
|
||||
Point3d p2 = new Point3d(p1.x + 0.5, p1.y + 0.5, p1.z + 0.5);
|
||||
AnchorPattern anchorPattern = new AnchorPattern(p1 * Utilities.Functions.FEET_TO_MM, p2 * Utilities.Functions.FEET_TO_MM, new Vector3d(1, 0, 0), new Vector3d(0, 1, 0));
|
||||
anchorPattern.Connect(filerObjectList.ToArray(), Autodesk.AdvanceSteel.ConstructionTypes.AtomicElement.eAssemblyLocation.kOnSite);
|
||||
anchorPattern.WriteToDb();
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreateBoltPattern.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
//Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Selecting the elements to create the bolt pattern on
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Element, "Pick an element to create the bolt pattern on");
|
||||
|
||||
// Point of reference for the bolt pattern. We use GlobalPoint to create the pattern on the plate. GlobalPoint is the point where the plate is being hit when selected.
|
||||
Point3d p1 = new Point3d(eRef.GlobalPoint.X, eRef.GlobalPoint.Y, eRef.GlobalPoint.Z);
|
||||
Point3d p2 = new Point3d(p1.x + 0.5, p1.y + 0.5, p1.z + 0.5);
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(activeDoc.Document, false, "Create bolt pattern"))
|
||||
{
|
||||
// Creating the bolt pattern using AdvanceSteel's classes and objects.
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
List<FilerObject> filerObjectList = new List<FilerObject>();
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
if (null == filerObj)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
filerObjectList.Add(filerObj);
|
||||
|
||||
FinitRectScrewBoltPattern boltPattern = new FinitRectScrewBoltPattern(p1 * Utilities.Functions.FEET_TO_MM, p2 * Utilities.Functions.FEET_TO_MM, new Vector3d(1, 0, 0), new Vector3d(0, 1, 0));
|
||||
boltPattern.Connect(filerObjectList.ToArray(), Autodesk.AdvanceSteel.ConstructionTypes.AtomicElement.eAssemblyLocation.kOnSite);
|
||||
boltPattern.WriteToDb();
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.Revit.DB.Steel;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreateContourCut.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(doc, false, "Create contour cut"))
|
||||
{
|
||||
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
|
||||
// Selecting the elements to create the contour cut on
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Element, "Please pick an element to create the contour cut on");
|
||||
// getting the selected element
|
||||
Element elem = null;
|
||||
if (eRef != null && eRef.ElementId != ElementId.InvalidElementId)
|
||||
{
|
||||
elem = doc.GetElement(eRef.ElementId);
|
||||
}
|
||||
|
||||
if (null == elem)
|
||||
return Result.Failed;
|
||||
|
||||
|
||||
// ensuring the element has FabricationData
|
||||
SteelElementProperties cell = SteelElementProperties.GetSteelElementProperties(elem);
|
||||
if (null == cell)
|
||||
{
|
||||
List<ElementId> elemsIds = new List<ElementId>();
|
||||
elemsIds.Add(elem.Id);
|
||||
SteelElementProperties.AddFabricationInformationForRevitElements(doc, elemsIds);
|
||||
}
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
if (null == filerObj)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
if (!(filerObj is Plate) && !(filerObj is Beam))
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// The point where the element was hit when selected.
|
||||
Point3d p1 = new Point3d(eRef.GlobalPoint.X, eRef.GlobalPoint.Y, eRef.GlobalPoint.Z);
|
||||
// Contour coordinates, according to the point where the element was hit when selected
|
||||
double x = Utilities.Functions.FEET_TO_MM * p1.x; // x of upper-left corner of the contour;
|
||||
double y = Utilities.Functions.FEET_TO_MM * p1.y; // y of upper-left corner of the contour;
|
||||
double z = Utilities.Functions.FEET_TO_MM * p1.z; // z of upper-left corner of the contour;
|
||||
|
||||
|
||||
// Adding the contour cut, using AdvanceSteel classes.
|
||||
|
||||
Polyline3d plContour;
|
||||
Polyline3d contour = new Polyline3d();
|
||||
|
||||
if (filerObj is Plate)
|
||||
{
|
||||
double w = 500; // width of the contour;
|
||||
double h = 500; // height of the contour;
|
||||
contour.Append(new Point3d(x, y, z));
|
||||
contour.Append(new Point3d(x + w, y, z));
|
||||
contour.Append(new Point3d(x + w, y + h, z));
|
||||
contour.Append(new Point3d(x, y + h, z));
|
||||
if (contour.VertexCount <= 0)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
Plate plate = filerObj as Plate;
|
||||
plate.GetBaseContourPolygon(1, out plContour);
|
||||
plContour.Project(new Autodesk.AdvanceSteel.Geometry.Plane(contour.Vertices[0], contour.PolyNormal), contour.PolyNormal);
|
||||
PlateContourNotch plateContour = new PlateContourNotch(plate, 0, contour, contour.Normal, contour.Normal.GetPerpVector());
|
||||
plate.AddFeature(plateContour);
|
||||
}
|
||||
else if (filerObj is Beam)
|
||||
{
|
||||
double w = 50; // width of the contour;
|
||||
double h = 50; // height of the contour;
|
||||
contour.Append(new Point3d(x, y, z));
|
||||
contour.Append(new Point3d(x + w, y, z));
|
||||
contour.Append(new Point3d(x + w, y, z + h));
|
||||
contour.Append(new Point3d(x, y, z + h));
|
||||
if (contour.VertexCount <= 0)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
Beam beam = filerObj as Beam;
|
||||
Point3d ptClosest = beam.GetClosestPointToSystemline(contour.Vertices[0]);
|
||||
double d1 = ptClosest.DistanceTo(beam.GetPointAtStart());
|
||||
double d2 = ptClosest.DistanceTo(beam.GetPointAtEnd());
|
||||
|
||||
Beam.eEnd beamEnd = d1 > d2 ? Beam.eEnd.kEnd : Beam.eEnd.kStart;
|
||||
|
||||
Vector3d normal = contour.Normal;
|
||||
Vector3d xVec = normal.GetPerpVector();
|
||||
BeamMultiContourNotch beamContour = new BeamMultiContourNotch(beam, beamEnd, contour, normal, xVec);
|
||||
beam.AddFeature(beamContour);
|
||||
}
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.Revit.DB.Steel;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreateCopeSkewed.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
//Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(doc, false, "Create cope skewed"))
|
||||
{
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Element, "Pick a beam");
|
||||
Element elem = null;
|
||||
if (eRef != null && eRef.ElementId != ElementId.InvalidElementId)
|
||||
{
|
||||
elem = doc.GetElement(eRef.ElementId);
|
||||
}
|
||||
|
||||
if (null == elem)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// adding fabrication data, if the element doesn't already have it.
|
||||
SteelElementProperties cell = SteelElementProperties.GetSteelElementProperties(elem);
|
||||
if (null == cell)
|
||||
{
|
||||
List<ElementId> elemsIds = new List<ElementId>();
|
||||
elemsIds.Add(elem.Id);
|
||||
SteelElementProperties.AddFabricationInformationForRevitElements(doc, elemsIds);
|
||||
}
|
||||
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
if (null == filerObj)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
if (!(filerObj is Beam))
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// Creating a beam, using AdvanceSteel classes
|
||||
Beam beam = filerObj as Beam;
|
||||
// Calculating the end and the side of the beam
|
||||
Beam.eEnd end = Utilities.Functions.CalculateBeamEnd(beam, new XYZ(eRef.GlobalPoint.X, eRef.GlobalPoint.Y, eRef.GlobalPoint.Z));
|
||||
Beam.eSide side = Utilities.Functions.CalculateBeamSide(beam, new XYZ(eRef.GlobalPoint.X, eRef.GlobalPoint.Y, eRef.GlobalPoint.Z));
|
||||
double length = 1000;
|
||||
double depth = -50;
|
||||
// Adding the cope feature to the beam, using AdvanceSteel's BeamNotchEx class.
|
||||
BeamNotchEx cope = new BeamNotchEx(end, side, length, depth);
|
||||
beam.AddFeature(cope);
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreateCornerCut.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(doc, false, "Create corner cut"))
|
||||
{
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Element, "Pick a plate");
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
|
||||
if (null == filerObj)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
if (!(filerObj is Plate))
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// Point of reference for the corner cut feature. We use GlobalPoint. GlobalPoint is the point where the plate is being hit when selected.
|
||||
Point3d p1 = new Point3d(eRef.GlobalPoint.X, eRef.GlobalPoint.Y, eRef.GlobalPoint.Z);
|
||||
Plate plate = filerObj as Plate;
|
||||
// Adding the corner cut feature to the plate. Coordinates are scaled from [ft] to [mm]
|
||||
int edgeIndex, vertexIndex;
|
||||
plate.GetEdgeAndVertex(p1 * Utilities.Functions.FEET_TO_MM, out edgeIndex, out vertexIndex);
|
||||
double radius = 35.0;
|
||||
PlateFeatVertFillet plateFillet = new PlateFeatVertFillet(0, (short)vertexIndex, radius);
|
||||
plate.AddFeature(plateFillet);
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.AdvanceSteel.CADLink.Database;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreatePlate.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
//Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(doc, false, "Create structural plate"))
|
||||
{
|
||||
// Creating the plate, using AdvanceSteel's Plate class
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
Point3d ptOrig = new Point3d(20, 30, 40);
|
||||
Plate plate = new Plate(new Autodesk.AdvanceSteel.Geometry.Plane(ptOrig, new Vector3d(0, 0, 1)), ptOrig, 1000, 500);
|
||||
plate.Thickness = 10;
|
||||
ObjectId idPlate = plate.WriteToDb();
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.AdvanceSteel.Arrangement;
|
||||
using Autodesk.AdvanceSteel.Contours;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreatePlateHole.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
//Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(doc, false, "Create hole in plate"))
|
||||
{
|
||||
// Creating a plate, using AdvanceSteel classes and objects
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Element, "Pick a plate");
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
|
||||
if (null == filerObj)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
if (!(filerObj is Plate))
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// Point of reference for the hole in plate feature. We use GlobalPoint. GlobalPoint is the point where the plate is being hit when selected.
|
||||
Point3d p1 = new Point3d(eRef.GlobalPoint.X, eRef.GlobalPoint.Y, eRef.GlobalPoint.Z);
|
||||
Plate plate = filerObj as Plate;
|
||||
// Adding a hole to the plate, using AdvanceSteel classes and objects
|
||||
Matrix3d csHole = new Matrix3d();
|
||||
csHole.SetCoordSystem(p1 * Utilities.Functions.FEET_TO_MM, Vector3d.kXAxis, Vector3d.kYAxis, Vector3d.kZAxis);
|
||||
ConnectionHolePlate hole = new ConnectionHolePlate(plate, csHole);
|
||||
hole.Arranger = new BoundedRectArranger(0, 0);
|
||||
hole.Arranger.Nx = 1;
|
||||
hole.Arranger.Ny = 1;
|
||||
hole.Hole = new Hole(100);
|
||||
plate.AddFeature(hole);
|
||||
hole.updateYourself();
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.AdvanceSteel.Arrangement;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreateShearStudPattern.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
//Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// The list of elements to create the shear stud pattern on
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Face, "Please pick an element to create the shear stud pattern on");
|
||||
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(doc, false, "Create shear stud pattern"))
|
||||
{
|
||||
// Creating the shear stud pattern involves using AdvanceSteel classes and objects only.
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
|
||||
if (null == filerObj)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
Autodesk.AdvanceSteel.Modelling.Connector shearStud = new Autodesk.AdvanceSteel.Modelling.Connector();
|
||||
shearStud.WriteToDb();
|
||||
|
||||
// Creating a rectangle for the shear stud pattern. A Polyline3d is required for the rectangle. We will use it for the Arranger and the Matrix3d objects.
|
||||
Polyline3d polyLine = new Polyline3d();
|
||||
Matrix3d matCS = new Matrix3d();
|
||||
Arranger arranger = null;
|
||||
|
||||
double x = eRef.GlobalPoint.X * Utilities.Functions.FEET_TO_MM;
|
||||
double y = eRef.GlobalPoint.Y * Utilities.Functions.FEET_TO_MM;
|
||||
double z = eRef.GlobalPoint.Z * Utilities.Functions.FEET_TO_MM;
|
||||
double w = 500; // width of the contour;
|
||||
double h = 500; // height of the contour;
|
||||
|
||||
polyLine.Append(new Point3d(x, y, z));
|
||||
polyLine.Append(new Point3d(x + w, y, z));
|
||||
polyLine.Append(new Point3d(x + w, y + h, z));
|
||||
polyLine.Append(new Point3d(x, y + h, z));
|
||||
|
||||
Point3d[] vertices = polyLine.Vertices;
|
||||
|
||||
if (vertices.Length == 4) //rectangular shear stud pattern
|
||||
{
|
||||
Vector3d xAxis1 = vertices[0].Subtract(vertices[1]);
|
||||
Vector3d xAxis2 = vertices[0].Subtract(vertices[3]);
|
||||
Vector3d zAxis = new Vector3d(0, 0, 1);
|
||||
Vector3d vDiag = vertices[0].Subtract(vertices[2]);
|
||||
Point3d orig = new Point3d(vertices[2]);
|
||||
orig = orig.Add(vDiag * 0.5);
|
||||
if (xAxis1.GetLength() > xAxis2.GetLength())
|
||||
{
|
||||
arranger = new BoundedRectArranger(xAxis1.GetLength(), xAxis2.GetLength());
|
||||
matCS.SetCoordSystem(orig, xAxis1.Normalize(), zAxis.CrossProduct(xAxis1).Normalize(), zAxis.Normalize());
|
||||
}
|
||||
else
|
||||
{
|
||||
arranger = new BoundedRectArranger(xAxis2.GetLength(), xAxis1.GetLength());
|
||||
matCS.SetCoordSystem(orig, xAxis2.Normalize(), zAxis.CrossProduct(xAxis2).Normalize(), zAxis.Normalize());
|
||||
}
|
||||
arranger.Nx = 2;
|
||||
arranger.Ny = 2;
|
||||
}
|
||||
|
||||
shearStud.Arranger = arranger;
|
||||
shearStud.SetCS(matCS);
|
||||
shearStud.Connect(filerObj, matCS);
|
||||
shearStud.Material = "Mild Steel";
|
||||
shearStud.Standard = "Nelson S3L-Inch";
|
||||
shearStud.Diameter = 19.05;
|
||||
shearStud.Length = 101.6;
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.Revit.DB.Steel;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreateShortening.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(doc, false, "Create shortening"))
|
||||
{
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Element, "Pick a beam to add shortening on it");
|
||||
Element elem = null;
|
||||
|
||||
if (eRef != null && eRef.ElementId != ElementId.InvalidElementId)
|
||||
{
|
||||
elem = (doc.GetElement(eRef.ElementId));
|
||||
}
|
||||
|
||||
if (null == elem)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// adding fabrication information, if the element doesn't already have it.
|
||||
SteelElementProperties cell = SteelElementProperties.GetSteelElementProperties(elem);
|
||||
if (null == cell)
|
||||
{
|
||||
List<ElementId> elemsIds = new List<ElementId>();
|
||||
elemsIds.Add(elem.Id);
|
||||
SteelElementProperties.AddFabricationInformationForRevitElements(doc, elemsIds);
|
||||
}
|
||||
|
||||
// Create the modifier using AdvanceSteel API.
|
||||
// For more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
if (null != filerObj)
|
||||
{
|
||||
if (!(filerObj is Beam))
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
Beam beam = filerObj as Beam;
|
||||
Beam.eEnd end = Utilities.Functions.CalculateBeamEnd(beam, new XYZ(10, 20, 20));
|
||||
BeamShortening beamShort = new BeamShortening(end, 150.0);
|
||||
beam.AddFeature(beamShort);
|
||||
}
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.Revit.DB.Steel;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.CreateWeldPoint.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
try
|
||||
{
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(doc, false, "Create weld point"))
|
||||
{
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Edge, "Pick an edge");
|
||||
|
||||
Element elem = null;
|
||||
if (eRef != null && eRef.ElementId != ElementId.InvalidElementId)
|
||||
{
|
||||
elem = (doc.GetElement(eRef.ElementId));
|
||||
}
|
||||
|
||||
if (null == elem)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// adding fabrication data, if the element doesn't already have it.
|
||||
SteelElementProperties cell = SteelElementProperties.GetSteelElementProperties(elem);
|
||||
if (null == cell)
|
||||
{
|
||||
List<ElementId> elemsIds = new List<ElementId>();
|
||||
elemsIds.Add(elem.Id);
|
||||
SteelElementProperties.AddFabricationInformationForRevitElements(doc, elemsIds);
|
||||
}
|
||||
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
|
||||
if (null == filerObj)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// Point of reference for the weld point. We use GlobalPoint to create the weld point on the selected edge. GlobalPoint is the point where the edge is being hit when selected.
|
||||
Point3d p1 = new Point3d(eRef.GlobalPoint.X, eRef.GlobalPoint.Y, eRef.GlobalPoint.Z);
|
||||
// Creating a weld point, using AdvanceSteel's WeldPoint class
|
||||
Vector3d vX = new Vector3d(100, 100, 100);
|
||||
Vector3d vY = new Vector3d(100, 100, 100);
|
||||
WeldPoint weld = new WeldPoint(p1 * Utilities.Functions.FEET_TO_MM, vX, vY);
|
||||
|
||||
if (null != weld)
|
||||
{
|
||||
weld.WriteToDb();
|
||||
List<FilerObject> objsToConnect = new List<FilerObject>();
|
||||
objsToConnect.Add(filerObj);
|
||||
weld.Connect(objsToConnect.ToArray(), Autodesk.AdvanceSteel.ConstructionTypes.AtomicElement.eAssemblyLocation.kInShop);
|
||||
}
|
||||
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.DeleteConnection.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// The transaction and its status, using Revit's Transaction class
|
||||
Autodesk.Revit.DB.Transaction trans = new Autodesk.Revit.DB.Transaction(doc, "Delete structural connection");
|
||||
TransactionStatus ts = TransactionStatus.Uninitialized;
|
||||
try
|
||||
{
|
||||
// We get the connection to be deleted. We use Revit's StructuralConnectionHandler class
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
StructuralConnectionHandler conn = Utilities.Functions.SelectConnection(activeDoc);
|
||||
if (null == conn)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
// Start the transaction.
|
||||
trans.Start();
|
||||
// Delete selected structural connection.
|
||||
doc.Delete(conn.Id);
|
||||
// Commit the transaction
|
||||
ts = trans.Commit();
|
||||
if (ts != TransactionStatus.Committed)
|
||||
{
|
||||
message = "Failed to commit the current transaction !";
|
||||
trans.RollBack();
|
||||
return Result.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using System.Collections.Generic;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Linq;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.Revit.DB.Steel;
|
||||
using System;
|
||||
using RvtDocument = Autodesk.Revit.DB.Document;
|
||||
using Autodesk.AdvanceSteel.DocumentManagement;
|
||||
using ASDocument = Autodesk.AdvanceSteel.DocumentManagement.Document;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
|
||||
namespace Utilities
|
||||
{
|
||||
/// <summary>
|
||||
/// Various useful functions
|
||||
/// </summary>
|
||||
public static class Functions
|
||||
{
|
||||
/// <summary>
|
||||
/// Feet to mm factor
|
||||
/// </summary>
|
||||
public static double FEET_TO_MM = 304.8;
|
||||
|
||||
/// <summary>
|
||||
/// Structural connection selection function. It uses a customizable filter, so the user can only select connections
|
||||
/// </summary>
|
||||
public static StructuralConnectionHandler SelectConnection(UIDocument document)
|
||||
{
|
||||
StructuralConnectionHandler conn = null;
|
||||
// Create a filter for structural connections.
|
||||
LogicalOrFilter types = new LogicalOrFilter(new List<ElementFilter> { new ElementCategoryFilter(BuiltInCategory.OST_StructConnections) });
|
||||
StructuralConnectionSelectionFilter filter = new StructuralConnectionSelectionFilter(types);
|
||||
Reference target = document.Selection.PickObject(ObjectType.Element, filter, "Select connection element :");
|
||||
if (target != null)
|
||||
{
|
||||
Element targetElement = document.Document.GetElement(target);
|
||||
if (targetElement != null)
|
||||
{
|
||||
conn = targetElement as StructuralConnectionHandler;
|
||||
}
|
||||
}
|
||||
return conn;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Structural connection elements selection function. It uses a customizable filter, so the user can only select allowed elements
|
||||
/// </summary>
|
||||
public static List<ElementId> SelectConnectionElements(UIDocument document, string prompt)
|
||||
{
|
||||
List<ElementId> elemIds = new List<ElementId>();
|
||||
|
||||
// Create a filter for the allowed structural connection inputs.
|
||||
LogicalOrFilter connElemTypes = new LogicalOrFilter(new List<ElementFilter>{
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructuralFraming),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructuralColumns),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructuralFoundation),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_Floors),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_Walls),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructConnectionPlates)});
|
||||
StructuralConnectionSelectionFilter elemFilter = new StructuralConnectionSelectionFilter(connElemTypes);
|
||||
List<Reference> refs = document.Selection.PickObjects(ObjectType.Element, elemFilter, prompt).ToList();
|
||||
elemIds = refs.Select(e => e.ElementId).ToList();
|
||||
return elemIds;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Custom connection elements selection function. It uses a customizable filter, so the user can only select allowed elements
|
||||
/// </summary>
|
||||
public static List<Reference> SelectConnectionElementsCustom(UIDocument document)
|
||||
{
|
||||
List<ElementId> elemIds = new List<ElementId>();
|
||||
|
||||
// Create a filter for the allowed structural connection inputs.
|
||||
LogicalOrFilter connElemTypes = new LogicalOrFilter(new List<ElementFilter>{
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructuralFraming),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructuralColumns),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructConnectionBolts),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructConnectionHoles),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructConnectionAnchors),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructConnectionShearStuds),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructConnectionWelds),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructConnectionModifiers),
|
||||
new ElementCategoryFilter(BuiltInCategory.OST_StructConnectionPlates)});
|
||||
StructuralConnectionSelectionFilter elemFilter = new StructuralConnectionSelectionFilter(connElemTypes);
|
||||
List<Reference> refs = document.Selection.PickObjects(ObjectType.Element, elemFilter, "Select elements to add to connection :").ToList();
|
||||
return refs;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function that returns the AS Filer Object from the selected reference object
|
||||
/// </summary>
|
||||
public static FilerObject GetFilerObject(RvtDocument doc, Reference eRef)
|
||||
{
|
||||
FilerObject filerObject = null;
|
||||
ASDocument curDocAS = DocumentManager.GetCurrentDocument();
|
||||
if (null != curDocAS)
|
||||
{
|
||||
OpenDatabase currentDatabase = curDocAS.CurrentDatabase;
|
||||
if (null != currentDatabase)
|
||||
{
|
||||
Guid uid = SteelElementProperties.GetFabricationUniqueID(doc, eRef);
|
||||
string asHandle = currentDatabase.getUidDictionary().GetHandle(uid);
|
||||
filerObject = FilerObject.GetFilerObjectByHandle(asHandle);
|
||||
}
|
||||
}
|
||||
return filerObject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function that returns an AS Filer Object list from the selected reference list
|
||||
/// </summary>
|
||||
public static List<FilerObject> GetFilerObjectList(RvtDocument doc, IList<Reference> eRefList)
|
||||
{
|
||||
List<FilerObject> filerObjectList = new List<FilerObject>();
|
||||
foreach (Reference eRef in eRefList)
|
||||
{
|
||||
FilerObject fo = GetFilerObject(doc, eRef);
|
||||
if (fo != null)
|
||||
{
|
||||
filerObjectList.Add(fo);
|
||||
}
|
||||
}
|
||||
return filerObjectList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function that computes the end of a beam. Useful in applying modifiers to beams
|
||||
/// </summary>
|
||||
public static Beam.eEnd CalculateBeamEnd(Beam asBeam, XYZ pickPoint)
|
||||
{
|
||||
Beam.eEnd end = Beam.eEnd.kStart;
|
||||
Point3d pickPnt3d = XYZtoPoint3d(pickPoint);
|
||||
Point3d startPoint = asBeam.GetPointAtStart();
|
||||
Point3d endPoint = asBeam.GetPointAtEnd();
|
||||
|
||||
if (pickPnt3d.DistanceTo(startPoint) > pickPnt3d.DistanceTo(endPoint))
|
||||
{
|
||||
end = Beam.eEnd.kEnd;
|
||||
}
|
||||
return end;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function that computes the side of a beam. Useful in applying modifiers to beams
|
||||
/// </summary>
|
||||
public static Beam.eSide CalculateBeamSide(Beam asBeam, Autodesk.Revit.DB.XYZ pickPoint)
|
||||
{
|
||||
Point3d origin;
|
||||
Vector3d xAxis, yAxis, zAxis;
|
||||
asBeam.PhysCSStart.GetCoordSystem(out origin, out xAxis, out yAxis, out zAxis);
|
||||
Point3d pickPnt3d = XYZtoPoint3d(pickPoint);
|
||||
asBeam.SetUpDownTag(pickPnt3d, Beam.eTag.kThisSide);
|
||||
return asBeam.GetTaggedUpDown(Beam.eTag.kThisSide);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Function that computes the end of a beam. Useful in applying modifiers to beams
|
||||
/// </summary>
|
||||
public static Point3d XYZtoPoint3d(XYZ p)
|
||||
{
|
||||
Point3d result = new Point3d(0, 0, 0);
|
||||
result.x = FEET_TO_MM * p.X;
|
||||
result.y = FEET_TO_MM * p.Y;
|
||||
result.z = FEET_TO_MM * p.Z;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
//implementation of ISelectionFilter. Needed for connection deletion
|
||||
class StructuralConnectionSelectionFilter : ISelectionFilter
|
||||
{
|
||||
LogicalOrFilter _filter;
|
||||
/// <summary>
|
||||
/// Initialize the filter with the accepted element types.
|
||||
/// </summary>
|
||||
/// <param name="elemTypesAllowed">Logical filter containing accepted element types.</param>
|
||||
/// <returns></returns>
|
||||
public StructuralConnectionSelectionFilter(LogicalOrFilter elemTypesAllowed)
|
||||
{
|
||||
_filter = elemTypesAllowed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows an element to be selected
|
||||
/// </summary>
|
||||
/// <param name="element">A candidate element in the selection operation.</param>
|
||||
/// <returns>Return true to allow the user to select this candidate element.</returns>
|
||||
public bool AllowElement(Element element)
|
||||
{
|
||||
return _filter.PassesFilter(element);
|
||||
}
|
||||
/// <summary>
|
||||
/// Allows a reference to be selected.
|
||||
/// </summary>
|
||||
/// <param name="refer"> A candidate reference in the selection operation.</param>
|
||||
/// <param name="point">The 3D position of the mouse on the candidate reference.</param>
|
||||
/// <returns>Return true to allow the user to select this candidate reference.</returns>
|
||||
public bool AllowReference(Reference refer, XYZ point)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// (C) Copyright 2003-2016 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SampleCommandsSteelElements")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("88adf43c-1067-4be2-8f8f-e1a7dbe68f2c")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,299 @@
|
||||
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
|
||||
{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}
|
||||
{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}
|
||||
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
|
||||
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f545\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f546\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\f548\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f549\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f550\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f551\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\f552\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f553\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f555\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f556\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
|
||||
{\f558\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f559\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f560\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f561\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
|
||||
{\f562\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f563\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f565\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f566\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;}
|
||||
{\f568\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f569\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f570\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f571\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}
|
||||
{\f572\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f573\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f885\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f886\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}
|
||||
{\f888\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f889\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f892\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f893\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}
|
||||
{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||
{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
||||
{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||
{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||
{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}
|
||||
{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}
|
||||
{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}
|
||||
{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||
{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
||||
{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||
{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||
{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||
{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
|
||||
{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
|
||||
{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
|
||||
{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||
{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
|
||||
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
|
||||
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap
|
||||
\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1
|
||||
\af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
|
||||
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1
|
||||
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused
|
||||
Normal Table;}}{\*\listtable{\list\listtemplateid-1952441930\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}
|
||||
\f3\fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0
|
||||
\fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0
|
||||
\fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0
|
||||
\fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li3600\lin3600 }
|
||||
{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li4320\lin4320 }{\listlevel
|
||||
\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23
|
||||
\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0
|
||||
\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li6480\lin6480 }{\listname ;}\listid430273505}}{\*\listoverridetable
|
||||
{\listoverride\listid430273505\listoverridecount0\ls1}}{\*\rsidtbl \rsid1599461\rsid1984517\rsid3030006\rsid5122316\rsid5643312\rsid6765692\rsid6837865\rsid9381469\rsid9646196\rsid9700337\rsid10518441\rsid10751990\rsid15948161\rsid16285540}{\mmathPr
|
||||
\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Vlad Pavel}{\creatim\yr2017\mo12\dy13\hr11\min18}{\revtim\yr2020\mo11\dy4\hr12\min5}{\version12}{\edmins41}{\nofpages2}
|
||||
{\nofwords425}{\nofchars2425}{\nofcharsws2845}{\vern123}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
|
||||
\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701
|
||||
\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot10751990 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2
|
||||
\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6
|
||||
\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
|
||||
{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1
|
||||
\ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 SampleCommandsSteelElements\line }{\rtlch\fcs1 \ab\af1\afs20
|
||||
\ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161
|
||||
\hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 20}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9700337 \hich\af1\dbch\af31505\loch\f1 21}{\rtlch\fcs1
|
||||
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 .0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161
|
||||
\hich\af1\dbch\af31505\loch\f1 2019.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161
|
||||
\hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 }{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6765692 \hich\af1\dbch\af31505\loch\f1 High}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161
|
||||
\hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Structure\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Type:}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Sample}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6765692 \hich\af1\dbch\af31505\loch\f1 c}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161
|
||||
\hich\af1\dbch\af31505\loch\f1 ommands}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6765692 \hich\af1\dbch\af31505\loch\f1 f}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 or}{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \f1\fs20\insrsid6765692 \hich\af1\dbch\af31505\loch\f1 s}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 teel}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6765692
|
||||
\hich\af1\dbch\af31505\loch\f1 e}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 lements\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Summary:}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 \line Sample commands for steel elements. These API samples allow for creation, modification and deletion of steel elements.}{\rtlch\fcs1 \ai\af0\afs20
|
||||
\ltrch\fcs0 \i\f0\fs20\insrsid15948161
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid15948161
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1
|
||||
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161\charrsid5643312 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.IExternalCommand
|
||||
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid5643312 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5643312\charrsid5643312 \hich\af1\dbch\af31505\loch\f1
|
||||
Autodesk.Revit.DB.Structure.StructuralConnectionHandler
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Structure.StructuralConnectionHandlerType
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Steel.SteelElementProperties
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Transaction
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Element
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Au\hich\af1\dbch\af31505\loch\f1 todesk.Revit.DB.ElementId
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Reference
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe1033\langnp1036\insrsid5643312\charrsid9381469 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Document}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\lang1036\langfe1033\langnp1036\insrsid5643312
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe1033\langnp1036\insrsid5122316\charrsid5122316 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.Events}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\lang1036\langfe1033\langnp1036\insrsid5122316\charrsid9381469
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe1033\langnp1036\insrsid5643312\charrsid9381469 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.UIDocument}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\lang1036\langfe1033\langnp1036\insrsid15948161\charrsid9381469
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe1033\langnp1036\insrsid5643312
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161
|
||||
\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\insrsid15948161
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3030006 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006\charrsid3030006 \hich\af1\dbch\af31505\loch\f1 AddElementsToConnection.cs}{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \hich\af1\dbch\af31505\loch\f1 command which adds elements to a structural connection element.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 AddElementsToCustomConnection.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 command which adds elements to a custom connection.
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf1\insrsid10518441\charrsid10518441 \hich\af1\dbch\af31505\loch\f1 AddRangesToConnectionType}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf1\insrsid10518441 \hich\af1\dbch\af31505\loch\f1 .cs
|
||||
\loch\af1\dbch\af31505\hich\f1 \endash \hich\af1\dbch\af31505\loch\f1 command \hich\af1\dbch\af31505\loch\f1 which adds ranges o\hich\af1\dbch\af31505\loch\f1 f applicability to a connection type.}{\rtlch\fcs1 \af1 \ltrch\fcs0
|
||||
\f1\insrsid10518441\charrsid10518441
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006\charrsid3030006 \hich\af1\dbch\af31505\loch\f1 CreateAnchorPattern.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1
|
||||
command which creates an anchor pattern.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 CreateBoltPattern.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - command which c\hich\af1\dbch\af31505\loch\f1 reates a bolt pattern.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 CreateContourCut.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - command which creates a contour cut modifier.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 CreateCopeSkewed.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - command which creates a cope modifier.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 CreateCornerCut.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - {\*\bkmkstart _Hlk504035675}\hich\af1\dbch\af31505\loch\f1 command which creates a corner cut modifier.}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006\charrsid3030006 {\*\bkmkend _Hlk504035675}
|
||||
\par \hich\af1\dbch\af31505\loch\f1 CreatePlate.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - command which creates a plate element.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006\charrsid3030006
|
||||
|
||||
\par \hich\af1\dbch\af31505\loch\f1 CreatePlateHole.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - command which creates some holes in a plate element.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 CreateShearStudPattern.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - command which creates a shear stud patte\hich\af1\dbch\af31505\loch\f1 rn.}{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 CreateShortening.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - command which creates a shortening modifier on a structural framing or structural column.}{\rtlch\fcs1
|
||||
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 CreateWeldPoint.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - command which creates a weld.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006\charrsid3030006
|
||||
|
||||
\par \hich\af1\dbch\af31505\loch\f1 DeleteConnection.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 - command which deletes a structural connection.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Functions.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 this file contains some utilities methods.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 RemoveElementsFromConnection.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 command which removes elements from a structural connection.}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006\charrsid3030006
|
||||
\par \hich\af1\dbch\af31505\loch\f1 RemoveSubelementsFromCustomConnection.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3030006 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 command wh\hich\af1\dbch\af31505\loch\f1
|
||||
ich removes elements from a custom connection.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf1\insrsid1599461\charrsid1599461 \hich\af1\dbch\af31505\loch\f1 UpdateConnectionDetailedParameters}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9381469\charrsid16285540 \hich\af1\dbch\af31505\loch\f1
|
||||
.cs \hich\f1 \endash \loch\f1 command which reads detailed connection parameters}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9381469
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5122316\charrsid5122316 \hich\af1\dbch\af31505\loch\f1 BackgroundCalculation.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5122316 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1
|
||||
command which shows how to check for background calculations and how to handle exceptions t\hich\af1\dbch\af31505\loch\f1 hrown when trying to start fabrication transaction during background calculations.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid5122316\charrsid16285540
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\f0\fs20\insrsid15948161
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
|
||||
\f0\fs20\insrsid15948161
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161\charrsid6837865 \hich\af1\dbch\af31505\loch\f1 This sample pro}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6837865 \hich\af1\dbch\af31505\loch\f1 vides following functionalities:}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161\charrsid6837865
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid6837865\charrsid6837865 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx360\wrapdefault\faauto\ls1\rin0\lin720\itap0\pararsid6837865
|
||||
{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6837865\charrsid6837865 \hich\af1\dbch\af31505\loch\f1 How }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6837865 \hich\af1\dbch\af31505\loch\f1
|
||||
to create different kind of steel elements using Revit and Advance Steel API (plates, bolts, anchors, welds)}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15948161
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid6837865 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6837865 \hich\af1\dbch\af31505\loch\f1
|
||||
How to add different kind of modifiers on steel elements using Revit and Advance Steel API}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9646196 \hich\af1\dbch\af31505\loch\f1 (shortening, contour cut, corner cut, holes)}{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \f1\fs20\insrsid6837865
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid6837865 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}\hich\af1\dbch\af31505\loch\f1 How to \hich\af1\dbch\af31505\loch\f1 add and remove elements }{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \f1\fs20\insrsid9646196 \hich\af1\dbch\af31505\loch\f1 from}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6837865 \hich\af1\dbch\af31505\loch\f1 a custom connection
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid6837865 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}\hich\af1\dbch\af31505\loch\f1 How to add and remove elements from a structural connection
|
||||
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid10518441 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10518441 \hich\af1\dbch\af31505\loch\f1 How to add ranges of
|
||||
\hich\af1\dbch\af31505\loch\f1 applicability to a connection type}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10518441\charrsid6837865
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid15948161
|
||||
\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
|
||||
9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
|
||||
5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
|
||||
b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
|
||||
0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
|
||||
a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
|
||||
c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
|
||||
0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
|
||||
a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
|
||||
6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
|
||||
4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
|
||||
4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100b6f4679893070000c9200000160000007468656d652f7468656d652f
|
||||
7468656d65312e786d6cec59cd8b1bc915bf07f23f347d97f5d5ad8fc1f2a24fcfda33b6b164873dd648a5eef2547789aad28cc56208de532e81c026e49085bd
|
||||
ed21842cecc22eb9e48f31d8249b3f22afaa5bdd5552c99e191c3061463074977eefd5afde7bf5de53d5ddcf5e26d4bbc05c1096f6fcfa9d9aefe174ce16248d
|
||||
7afeb3d9a4d2f13d2151ba4094a5b8e76fb0f03fbbf7eb5fdd454732c609f6403e1547a8e7c752ae8eaa5531876124eeb0154ee1bb25e30992f0caa3ea82a34b
|
||||
d09bd06aa3566b55134452df4b51026a1f2f97648ebd9952e9dfdb2a1f53784da5500373caa74a35b6243476715e5708b11143cabd0b447b3eccb3609733fc52
|
||||
fa1e4542c2173dbfa6fffceabdbb5574940b517940d6909be8bf5c2e17589c37f49c3c3a2b260d823068f50bfd1a40e53e6edc1eb7c6ad429f06a0f91c569a71
|
||||
b175b61bc320c71aa0ecd1a17bd41e35eb16ded0dfdce3dc0fd5c7c26b50a63fd8c34f2643b0a285d7a00c1feee1c3417730b2f56b50866fede1dbb5fe28685b
|
||||
fa3528a6243ddf43d7c25673b85d6d0159327aec8477c360d26ee4ca4b144443115d6a8a254be5a1584bd00bc6270050408a24493db959e1259a43140f112567
|
||||
9c7827248a21f056286502866b8ddaa4d684ffea13e827ed5174849121ad780113b137a4f87862cec94af6fc07a0d537206f7ffef9cdeb1fdfbcfee9cd575fbd
|
||||
79fdf77c6eadca923b466964cafdf2dd1ffef3cd6fbd7ffff0ed2f5fff319b7a172f4cfcbbbffdeedd3ffef93ef5b0e2d2146ffff4fdbb1fbf7ffbe7dfffebaf
|
||||
5f3bb4f7393a33e1339260e13dc297de5396c0021dfcf119bf9ec42c46c494e8a791402952b338f48f656ca11f6d10450edc00db767cce21d5b880f7d72f2cc2
|
||||
d398af2571687c182716f094313a60dc6985876a2ec3ccb3751ab927e76b13f714a10bd7dc43945a5e1eaf579063894be530c616cd2714a5124538c5d253dfb1
|
||||
738c1dabfb8210cbaea764ce99604be97d41bc01224e93ccc899154da5d03149c02f1b1741f0b7659bd3e7de8051d7aa47f8c246c2de40d4417e86a965c6fb68
|
||||
2d51e252394309350d7e8264ec2239ddf0b9891b0b099e8e3065de78818570c93ce6b05ec3e90f21cdb8dd7e4a37898de4929cbb749e20c64ce4889d0f6394ac
|
||||
5cd829496313fbb938871045de13265df05366ef10f50e7e40e941773f27d872f787b3c133c8b026a53240d4376beef0e57dccacf89d6ee8126157aae9f3c44a
|
||||
b17d4e9cd131584756689f604cd1255a60ec3dfbdcc160c05696cd4bd20f62c82ac7d815580f901dabea3dc5027a25d5dcece7c91322ac909de2881de073bad9
|
||||
493c1b9426881fd2fc08bc6eda7c0ca52e7105c0633a3f37818f08f480102f4ea33c16a0c308ee835a9fc4c82a60ea5db8e375c32dff5d658fc1be7c61d1b8c2
|
||||
be04197c6d1948eca6cc7b6d3343d49aa00c9819822ec3956e41c4727f29a28aab165b3be596f6a62ddd00dd91d5f42424fd6007b4d3fb84ffbbde073a8cb77f
|
||||
f9c6b10f3e4ebfe3566c25ab6b763a8792c9f14e7f7308b7dbd50c195f904fbfa919a175fa04431dd9cf58b73dcd6d4fe3ffdff73487f6f36d2773a8dfb8ed64
|
||||
7ce8306e3b99fc70e5e3743265f3027d8d3af0c80e7af4b14f72f0d46749289dca0dc527421ffc08f83db398c0a092d3279eb838055cc5f0a8ca1c4c60e1228e
|
||||
b48cc799fc0d91f134462b381daafb4a492472d591f0564cc0a1911e76ea5678ba4e4ed9223becacd7d5c16656590592e5782d2cc6e1a04a66e856bb3cc02bd4
|
||||
6bb6913e68dd1250b2d721614c6693683a48b4b783ca48fa58178ce620a157f65158741d2c3a4afdd6557b2c805ae115f8c1edc1cff49e1f06200242701e07cd
|
||||
f942f92973f5d6bbda991fd3d3878c69450034d8db08283ddd555c0f2e4fad2e0bb52b78da2261849b4d425b46377822869fc17974aad1abd0b8aeafbba54b2d
|
||||
7aca147a3e08ad9246bbf33e1637f535c8ede6069a9a9982a6de65cf6f35430899395af5fc251c1ac363b282d811ea3717a211dcbccc25cf36fc4d32cb8a0b39
|
||||
4222ce0cae934e960d122231f728497abe5a7ee1069aea1ca2b9d51b90103e59725d482b9f1a3970baed64bc5ce2b934dd6e8c284b67af90e1b35ce1fc568bdf
|
||||
1cac24d91adc3d8d1797de195df3a708422c6cd795011744c0dd413db3e682c0655891c8caf8db294c79da356fa3740c65e388ae62945714339967709dca0b3a
|
||||
faadb081f196af190c6a98242f8467912ab0a651ad6a5a548d8cc3c1aafb6121653923699635d3ca2aaa6abab39835c3b60cecd8f26645de60b53531e434b3c2
|
||||
67a97b37e576b7b96ea74f28aa0418bcb09fa3ea5ea12018d4cac92c6a8af17e1a56393b1fb56bc776811fa07695226164fdd656ed8edd8a1ae19c0e066f54f9
|
||||
416e376a6168b9ed2bb5a5f5adb979b1cdce5e40f2184197bba6526857c2c92e47d0104d754f92a50dd8222f65be35e0c95b73d2f3bfac85fd60d80887955a27
|
||||
1c57826650ab74c27eb3d20fc3667d1cd66ba341e31514161927f530bbb19fc00506dde4f7f67a7cefee3ed9ded1dc99b3a4caf4dd7c5513d777f7f5c6e1bb7b
|
||||
8f40d2f9b2d598749bdd41abd26df627956034e854bac3d6a0326a0ddba3c9681876ba9357be77a1c141bf390c5ae34ea5551f0e2b41aba6e877ba9576d068f4
|
||||
8376bf330efaaff23606569ea58fdc16605ecdebde7f010000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d65
|
||||
2f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d36
|
||||
3f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e
|
||||
3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d985
|
||||
0528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000000000
|
||||
0000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000
|
||||
000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019020000
|
||||
7468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d0014000600080000002100b6f4679893070000c92000001600000000000000
|
||||
000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027000000
|
||||
000000000000000000009d0a00007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000980b00000000}
|
||||
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
|
||||
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
|
||||
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
|
||||
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
|
||||
{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;
|
||||
\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid;
|
||||
\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;
|
||||
\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;
|
||||
\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;
|
||||
\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;
|
||||
\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;
|
||||
\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;
|
||||
\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
|
||||
\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;
|
||||
\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;
|
||||
\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4;
|
||||
\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;
|
||||
\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5;
|
||||
\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
|
||||
\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6;
|
||||
\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;
|
||||
\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;
|
||||
\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
|
||||
\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4;
|
||||
\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4;
|
||||
\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1;
|
||||
\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1;
|
||||
\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2;
|
||||
\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2;
|
||||
\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3;
|
||||
\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4;
|
||||
\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4;
|
||||
\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5;
|
||||
\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5;
|
||||
\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6;
|
||||
\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6;
|
||||
\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark;
|
||||
\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1;
|
||||
\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1;
|
||||
\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2;
|
||||
\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3;
|
||||
\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3;
|
||||
\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4;
|
||||
\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4;
|
||||
\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5;
|
||||
\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5;
|
||||
\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6;
|
||||
\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention;
|
||||
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore 01050000
|
||||
02000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
|
||||
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000b0e5
|
||||
a2fa91b2d601feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000105000000000000}}
|
||||
@@ -0,0 +1,130 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.RemoveElementsFromConnection.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
// The transaction and its status, using Revit's Transaction class
|
||||
Autodesk.Revit.DB.Transaction trans = new Autodesk.Revit.DB.Transaction(doc, "Remove element(s) from structural connection");
|
||||
TransactionStatus ts = TransactionStatus.Uninitialized;
|
||||
|
||||
try
|
||||
{
|
||||
// Select the connection we need to remove elements from.
|
||||
// We use Revit's StructuralConnectionHandler class for the connection.
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
StructuralConnectionHandler conn = Utilities.Functions.SelectConnection(activeDoc);
|
||||
|
||||
if (null == conn)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
// Select elements to remove from connection.
|
||||
IList<ElementId> ids = Utilities.Functions.SelectConnectionElements(activeDoc, "Select elements to remove from connection :");
|
||||
|
||||
if (ids.Count() <= 0)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// Starting the transaction
|
||||
trans.Start();
|
||||
// Removing the elements from the connection
|
||||
conn.RemoveElementIds(ids);
|
||||
// Committing the transaction
|
||||
ts = trans.Commit();
|
||||
|
||||
if (ts != TransactionStatus.Committed)
|
||||
{
|
||||
message = "Failed to commit the current transaction !";
|
||||
if (ts != TransactionStatus.Uninitialized) trans.RollBack();
|
||||
return Result.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
return Result.Cancelled;
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.ArgumentException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
message = "Invalid elements selected!";
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.UI;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.RemoveSubelementsFromCustomConnection.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData
|
||||
, ref string message, ElementSet elements)
|
||||
{
|
||||
// Get the document from external command data.
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
|
||||
if (null == doc)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
// The transaction and its status, using Revit's Transaction class
|
||||
Autodesk.Revit.DB.Transaction trans = new Autodesk.Revit.DB.Transaction(doc, "Remove subelements from custom connection");
|
||||
TransactionStatus ts = TransactionStatus.Uninitialized;
|
||||
|
||||
try
|
||||
{
|
||||
// Selecting the custom connection, using Revit's StructuralConnectionHandler class
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
StructuralConnectionHandler conn = Utilities.Functions.SelectConnection(activeDoc);
|
||||
|
||||
// If the connection is not a custom one
|
||||
if (!(conn.IsCustom()))
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
IList<Subelement> ide = new List<Subelement>();
|
||||
// Prompt to select subelements
|
||||
IList<Reference> refs = activeDoc.Selection.PickObjects(ObjectType.Subelement, "Select subelements:").ToList();
|
||||
// Populate the reference list
|
||||
foreach (Reference eRef in refs)
|
||||
{
|
||||
ide.Add(doc.GetSubelement(eRef));
|
||||
}
|
||||
|
||||
if (ide.Count <= 0)
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
// Start the transaction
|
||||
trans.Start();
|
||||
// Removing the subelements from the custom connection
|
||||
StructuralConnectionHandlerType.RemoveMainSubelementsFromCustomConnection(conn, ide);
|
||||
// Committing the transaction
|
||||
ts = trans.Commit();
|
||||
|
||||
if (ts != TransactionStatus.Committed)
|
||||
{
|
||||
message = "Failed to commit the current transaction !";
|
||||
trans.RollBack();
|
||||
return Result.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
return Result.Cancelled;
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.ArgumentException)
|
||||
{
|
||||
if (ts != TransactionStatus.Uninitialized)
|
||||
{
|
||||
trans.RollBack();
|
||||
}
|
||||
trans.Dispose();
|
||||
message = "Custom connection already contains the selected element(s)! / Can't delete all subelements!";
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RevitAddIns>
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>D48CB6FC-E73D-4BD6-AF09-6135E6633A22</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.AddElementsToConnection.CS.Command</FullClassName>
|
||||
<Text>Add elements to connection</Text>
|
||||
<Description>Add elements to existing structural connection</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>121000FA-B6A3-4A96-BB08-477C8CEFC14C</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.AddElementsToCustomConnection.CS.Command</FullClassName>
|
||||
<Text>Add elements to custom connection</Text>
|
||||
<Description>Add elements to existing custom connection</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>A13B3804-8BE8-4F95-91DD-595D4F9EC85A</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.AddRangesToConnectionType.CS.Command</FullClassName>
|
||||
<Text>Add ranges of applicability to a connection type</Text>
|
||||
<Description>Add ranges of applicability to a connection type</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>4F3AF82D-D128-48F7-AEBE-9BFF75CEC61C</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreateAnchorPattern.CS.Command</FullClassName>
|
||||
<Text>Create anchor pattern</Text>
|
||||
<Description>Create anchor pattern</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>29A76DF5-EEF9-44C7-9792-59ED6F640DDB</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreateBoltPattern.CS.Command</FullClassName>
|
||||
<Text>Create bolt pattern</Text>
|
||||
<Description>Create bolt pattern</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>F22CA96D-C942-4DF7-B9DB-E499FCEAF104</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreateContourCut.CS.Command</FullClassName>
|
||||
<Text>Create contour cut</Text>
|
||||
<Description>Create contour cut</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>4E36041A-428D-4DB8-ACF5-6579E48F3252</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreateCopeSkewed.CS.Command</FullClassName>
|
||||
<Text>Create cope skewed</Text>
|
||||
<Description>Create cope skewed</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>C506A1A3-55AB-4A83-A7DE-6558EAF07DF8</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreateCornerCut.CS.Command</FullClassName>
|
||||
<Text>Create corner cut</Text>
|
||||
<Description>Create corner cut</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>97128B57-DFB8-4F78-93DD-B1107BCF3E1E</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreatePlate.CS.Command</FullClassName>
|
||||
<Text>Create plate</Text>
|
||||
<Description>Create plate</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>17346721-9E33-4BAC-9AFF-6C3E0F76FDC9</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreatePlateHole.CS.Command</FullClassName>
|
||||
<Text>Create plate hole</Text>
|
||||
<Description>Create plate hole</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>1E953BC8-C586-47E5-8F2E-1817227D4790</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreateShearStudPattern.CS.Command</FullClassName>
|
||||
<Text>Create shear stud pattern</Text>
|
||||
<Description>Create shear stud pattern</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>53C37040-6DC6-46DE-8B94-7D73C8518FFE</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreateShortening.CS.Command</FullClassName>
|
||||
<Text>Create shortening</Text>
|
||||
<Description>Create shortening</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>7D3894B0-770A-4553-AF72-AB32091F3BA2</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.CreateWeldPoint.CS.Command</FullClassName>
|
||||
<Text>Create weld point</Text>
|
||||
<Description>Create weld point</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>6F56CBDD-8ACC-4232-ACC7-FF8947623D8F</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.DeleteConnection.CS.Command</FullClassName>
|
||||
<Text>Delete connection</Text>
|
||||
<Description>Delete connection</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>368F13A1-419C-44D6-9220-5EE87DEB2DEB</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.RemoveElementsFromConnection.CS.Command</FullClassName>
|
||||
<Text>Remove elements from structural connection</Text>
|
||||
<Description>Remove elements from structural connection</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>52D7D8F7-2D1D-4F6B-A876-5DA2CBE2FB0F</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.RemoveSubelementsFromCustomConnection.CS.Command</FullClassName>
|
||||
<Text>Remove subelements from custom connection</Text>
|
||||
<Description>Remove subelements from custom connection</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>708B29F3-3D6C-4165-B656-257B4DB0414A</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.UpdateConnectionDetailedParameters.CS.Command</FullClassName>
|
||||
<Text>Print connection detailed parameters</Text>
|
||||
<Description>Print connection detailed parameters</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
|
||||
<AddIn Type="Command">
|
||||
<Assembly>SampleCommandsSteelElements.dll</Assembly>
|
||||
<ClientId>AB463066-608E-488B-B1E6-03204D259D1D</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.SampleCommandsSteelElements.BackgroundCalculation.CS.Command</FullClassName>
|
||||
<Text>Fabrication transaction and background calculation</Text>
|
||||
<Description>Shows how to handle "Background calculation in progress" exception when trying to start fabrication transaction</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
</RevitAddIns>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{D0222DA2-F296-4644-A26E-F9EB3B2BBAF4}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Revit.SDK.Samples.SampleCommandsSteelElements.CS</RootNamespace>
|
||||
<AssemblyName>SampleCommandsSteelElements</AssemblyName>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DocumentationFile>bin\Debug\SampleCommandsSteelElements.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>4.7</RequiredTargetFramework>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AddRangesToConnectionType.cs" />
|
||||
<Compile Include="BackgroundCalculation.cs" />
|
||||
<Compile Include="RemoveSubelementsFromCustomConnection.cs" />
|
||||
<Compile Include="RemoveElementsFromConnection.cs" />
|
||||
<Compile Include="DeleteConnection.cs" />
|
||||
<Compile Include="CreateWeldPoint.cs" />
|
||||
<Compile Include="CreateShortening.cs" />
|
||||
<Compile Include="CreateShearStudPattern.cs" />
|
||||
<Compile Include="CreatePlateHole.cs" />
|
||||
<Compile Include="CreatePlate.cs" />
|
||||
<Compile Include="CreateCornerCut.cs" />
|
||||
<Compile Include="CreateCopeSkewed.cs" />
|
||||
<Compile Include="CreateContourCut.cs" />
|
||||
<Compile Include="CreateBoltPattern.cs" />
|
||||
<Compile Include="CreateAnchorPattern.cs" />
|
||||
<Compile Include="AddElementsToCustomConnection.cs" />
|
||||
<Compile Include="AddElementsToConnection.cs" />
|
||||
<Compile Include="Functions.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="UpdateConnectionDetailedParameters.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(SolutionDir)VSProps\SDKSamples.targets" />
|
||||
<Import Project="$(SolutionDir)VSProps\SDKSamples.Steel.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
|
||||
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Diagnostics;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.AdvanceSteel.CADAccess;
|
||||
using Autodesk.AdvanceSteel.Geometry;
|
||||
using Autodesk.AdvanceSteel.Modelling;
|
||||
using Autodesk.SteelConnectionsDB;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.AdvanceSteel.ConstructionTypes;
|
||||
|
||||
namespace Revit.SDK.Samples.SampleCommandsSteelElements.UpdateConnectionDetailedParameters.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// This command shows how you can modify detailed connection parameters. I choose a base plate connection for this test.
|
||||
/// In order to run this command, you need a model with a base plate connection.
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
||||
{
|
||||
UIDocument activeDoc = commandData.Application.ActiveUIDocument;
|
||||
Autodesk.Revit.DB.Document doc = activeDoc.Document;
|
||||
if (null == doc)
|
||||
return Result.Failed;
|
||||
|
||||
try
|
||||
{
|
||||
// Start detailed steel modeling transaction
|
||||
using (FabricationTransaction trans = new FabricationTransaction(doc, false, "Update connection parameters"))
|
||||
{
|
||||
// for more details, please consult http://www.autodesk.com/adv-steel-api-walkthroughs-2019-enu
|
||||
Reference eRef = activeDoc.Selection.PickObject(ObjectType.Element, "Pick a base plate connection");
|
||||
|
||||
Element elem = doc.GetElement(eRef.ElementId);
|
||||
if (null == elem || !(elem is StructuralConnectionHandler))
|
||||
return Result.Failed;
|
||||
|
||||
StructuralConnectionHandler rvtConnection = (StructuralConnectionHandler)elem;
|
||||
|
||||
FilerObject filerObj = Utilities.Functions.GetFilerObject(doc, eRef);
|
||||
|
||||
if (null == filerObj || !(filerObj is UserAutoConstructionObject))
|
||||
return Result.Failed;
|
||||
|
||||
UserAutoConstructionObject asConnection = (UserAutoConstructionObject)filerObj;
|
||||
//
|
||||
//read connection parameters
|
||||
IFiler connectionFiler = asConnection.Save();
|
||||
|
||||
if(connectionFiler != null)
|
||||
{
|
||||
//I choose to modify thickess of the base plate
|
||||
connectionFiler.WriteItem(Convert.ToDouble(50.0), "BaseThickness"); //units must be milimmeters;
|
||||
asConnection.Load(connectionFiler); //update connection parameters
|
||||
asConnection.Update();
|
||||
//
|
||||
//if the connection parameters are modified, than we have to set this flag to true,
|
||||
//meaning that this connection has different parameters than it's connection type.
|
||||
rvtConnection.OverrideTypeParams = true;
|
||||
}
|
||||
trans.Commit();
|
||||
}
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user