added Revit 2020 SDK files

This commit is contained in:
Jeremy Tammik
2019-09-11 14:43:53 +02:00
parent fbb29172ed
commit 8b8832b7be
2956 changed files with 938523 additions and 0 deletions
@@ -0,0 +1,145 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using Autodesk.Revit.UI.Selection;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class Ancillaries : 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)
{
Document doc = commandData.Application.ActiveUIDocument.Document;
UIDocument uidoc = commandData.Application.ActiveUIDocument;
FabricationPart fabPart = null;
FabricationConfiguration config = null;
try
{
// check for a load fabrication config
config = FabricationConfiguration.GetFabricationConfiguration(doc);
if (config == null)
{
message = "No fabrication configuration loaded.";
return Result.Failed;
}
// pick a fabrication part
Reference refObj = uidoc.Selection.PickObject(ObjectType.Element, "Pick a fabrication part to start.");
fabPart = doc.GetElement(refObj) as FabricationPart;
}
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
{
return Result.Cancelled;
}
if (fabPart == null)
{
message = "The selected element is not a fabrication part.";
return Result.Failed;
}
else
{
// get ancillary data from selected part and report to user
IList<FabricationAncillaryUsage> ancillaries = fabPart.GetPartAncillaryUsage();
List<string> ancillaryDescriptions = new List<string>();
// create list of ancillary descriptions using the Ancillary UseageType and Name
foreach (var ancillaryUsage in ancillaries)
{
FabricationAncillaryType ancilType = ancillaryUsage.Type;
FabricationAncillaryUsageType usageType = ancillaryUsage.UsageType;
ancillaryDescriptions.Add($"{ancilType.ToString()}: {usageType.ToString()} - "
+ $"{config.GetAncillaryName(ancillaryUsage.AncillaryId)}");
}
string results = string.Empty;
// group and quantify
if (ancillaryDescriptions.Count > 0)
{
ancillaryDescriptions.Sort();
StringBuilder resultsBuilder = new StringBuilder();
string currentAncillary = string.Empty;
foreach (var ancillaryName in ancillaryDescriptions)
{
if (ancillaryName != currentAncillary)
{
resultsBuilder.AppendLine($"{ancillaryName} x {ancillaryDescriptions.Count(x => x == ancillaryName)}");
currentAncillary = ancillaryName;
}
}
results = resultsBuilder.ToString();
}
TaskDialog td = new TaskDialog("Ancillaries")
{
MainIcon = TaskDialogIcon.TaskDialogIconInformation,
TitleAutoPrefix = false,
MainInstruction = ancillaryDescriptions.Count > 0 ?
$"{ancillaryDescriptions.Count} ancillaries found on selected part"
: $"No ancillaries found on selected part",
MainContent = results
};
td.Show();
}
return Result.Succeeded;
}
}
}
@@ -0,0 +1,168 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class ButtonGroupExclusions : 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)
{
try
{
Document doc = commandData.Application.ActiveUIDocument.Document;
using (Transaction tr = new Transaction(doc, "Set button and group exclusions"))
{
tr.Start();
FabricationConfiguration config = FabricationConfiguration.GetFabricationConfiguration(doc);
if (config == null)
{
message = "No fabrication configuration loaded.";
return Result.Failed;
}
// get all loaded fabrication services
IList<FabricationService> allLoadedServices = config.GetAllLoadedServices();
// get the "ADSK - HVAC:Supply Air" service
string serviceName = "ADSK - HVAC: Supply Air";
FabricationService selectedService = allLoadedServices.FirstOrDefault(x => x.Name == serviceName);
if (selectedService == null)
{
message = $"Could not find fabrication service {serviceName}";
return Result.Failed;
}
string rectangularGroupName = "Rectangular";
string roundGroupName = "Round Bought Out";
string excludeButtonName = "Square Bend";
int rectangularGroupIndex = -1;
int roundGroupIndex = -1;
// find Rectangular and Round groups in service
for (int i = 0; i < selectedService.GroupCount; i++)
{
if (selectedService.GetGroupName(i) == rectangularGroupName)
{
rectangularGroupIndex = i;
}
if (selectedService.GetGroupName(i) == roundGroupName)
{
roundGroupIndex = i;
}
if (rectangularGroupIndex > -1 && roundGroupIndex > -1)
{
break;
}
}
if (rectangularGroupIndex > -1)
{
// exclude square bend in Rectangular group
for (int i = 0; i < selectedService.GetButtonCount(rectangularGroupIndex); i++)
{
if (selectedService.GetButton(rectangularGroupIndex, i).Name == excludeButtonName)
{
selectedService.OverrideServiceButtonExclusion(rectangularGroupIndex, i, true);
break;
}
}
}
else
{
message = $"Unable to locate {excludeButtonName} button to exclude.";
return Result.Failed;
}
// exclude entire Round Bought Out service group
if (roundGroupIndex > -1)
{
selectedService.SetServiceGroupExclusions(new List<int>() { roundGroupIndex });
}
else
{
message = $"Unable to locate {roundGroupName} service group to exclude.";
return Result.Failed;
}
tr.Commit();
TaskDialog td = new TaskDialog("Button and Group Exclsuions")
{
MainIcon = TaskDialogIcon.TaskDialogIconInformation,
TitleAutoPrefix = false,
MainInstruction = "Operation Successful",
MainContent = $"Excluded {excludeButtonName} button from {serviceName} {rectangularGroupName} Group {Environment.NewLine}"
+ $"Excluded {roundGroupName} Group from {serviceName}"
};
td.Show();
}
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
}
@@ -0,0 +1,348 @@
//
// (C) Copyright 2003-2011 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 System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class ChangeService : 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)
{
try
{
Document doc = commandData.Application.ActiveUIDocument.Document;
// get the user selection
UIDocument uidoc = commandData.Application.ActiveUIDocument;
ICollection<ElementId> collection = uidoc.Selection.GetElementIds();
if (collection.Count > 0)
{
// FabricationNetworkChangeService needs an ISet<ElementId>
ISet<ElementId> selIds = new HashSet<ElementId>();
foreach (ElementId id in collection)
{
selIds.Add(id);
}
using (Transaction tr = new Transaction(doc, "Change Service of Fabrication Parts"))
{
tr.Start();
FabricationConfiguration config = FabricationConfiguration.GetFabricationConfiguration(doc);
// Get all loaded fabrication services
IList<FabricationService> allLoadedServices = config.GetAllLoadedServices();
FabricationNetworkChangeService changeservice = new FabricationNetworkChangeService(doc);
// Change the fabrication parts to the first loaded service and group
FabricationNetworkChangeServiceResult result = changeservice.ChangeService(selIds, allLoadedServices[0].ServiceId, 0);
if (result != FabricationNetworkChangeServiceResult.Success)
{
message = "There was a problem with the change service.";
return Result.Failed;
}
doc.Regenerate();
tr.Commit();
}
return Result.Succeeded;
}
else
{
// inform user they need to select at least one element
message = "Please select at least one element.";
}
return Result.Failed;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
/// <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)]
public class ChangeSize : 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)
{
try
{
Document doc = commandData.Application.ActiveUIDocument.Document;
// get the user selection
UIDocument uidoc = commandData.Application.ActiveUIDocument;
ICollection<ElementId> collection = uidoc.Selection.GetElementIds();
if (collection.Count > 0)
{
// FabricationNetworkChangeService needs an ISet<ElementId>
ISet<ElementId> selIds = new HashSet<ElementId>();
foreach (ElementId id in collection)
{
selIds.Add(id);
}
using (Transaction tr = new Transaction(doc, "Change Size of Fabrication Parts"))
{
tr.Start();
FabricationConfiguration config = FabricationConfiguration.GetFabricationConfiguration(doc);
// Get all loaded fabrication services
IList<FabricationService> allLoadedServices = config.GetAllLoadedServices();
// Create a map of sizes to swap the current sizes to a new size
var sizeMappings = new HashSet<Autodesk.Revit.DB.Fabrication.FabricationPartSizeMap>();
var mapping = new Autodesk.Revit.DB.Fabrication.FabricationPartSizeMap("12x12", 1.0, 1.0, false, ConnectorProfileType.Rectangular, allLoadedServices[0].ServiceId, 0 );
mapping.MappedWidthDiameter = 1.5;
mapping.MappedDepth = 1.5;
sizeMappings.Add( mapping );
var mapping1 = new Autodesk.Revit.DB.Fabrication.FabricationPartSizeMap("18x18", 1.5, 1.5, false, ConnectorProfileType.Rectangular, allLoadedServices[0].ServiceId, 0 );
mapping1.MappedWidthDiameter = 2.0;
mapping1.MappedDepth = 2.0;
sizeMappings.Add( mapping1 );
FabricationNetworkChangeService changesize = new FabricationNetworkChangeService(doc);
// Change the size of the fabrication parts in the selection to the new sizes
FabricationNetworkChangeServiceResult result = changesize.ChangeSize(selIds, sizeMappings );
if (result != FabricationNetworkChangeServiceResult.Success)
{
// Get the collection of element identifiers for parts that had errors posted against them
ICollection<ElementId> errorIds = changesize.GetElementsThatFailed();
if ( errorIds.Count > 0 )
{
message = "There was a problem with the change size.";
return Result.Failed;
}
}
doc.Regenerate();
tr.Commit();
}
return Result.Succeeded;
}
else
{
// inform user they need to select at least one element
message = "Please select at least one element.";
}
return Result.Failed;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
/// <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)]
public class ApplyChange : 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)
{
try
{
Document doc = commandData.Application.ActiveUIDocument.Document;
// get the user selection
UIDocument uidoc = commandData.Application.ActiveUIDocument;
ICollection<ElementId> collection = uidoc.Selection.GetElementIds();
if (collection.Count > 0)
{
// FabricationNetworkChangeService needs an ISet<ElementId>
ISet<ElementId> selIds = new HashSet<ElementId>();
foreach (ElementId id in collection)
{
selIds.Add(id);
}
using (Transaction tr = new Transaction(doc, "Appply Change Service and Size of Fabrication Parts"))
{
tr.Start();
FabricationConfiguration config = FabricationConfiguration.GetFabricationConfiguration(doc);
// Get all loaded fabrication services
IList<FabricationService> allLoadedServices = config.GetAllLoadedServices();
FabricationNetworkChangeService applychange = new FabricationNetworkChangeService(doc);
// Set the selection of element identifiers to be changed
applychange.SetSelection( selIds );
// Set the service to the second service in the list (ductwork exhaust service)
applychange.SetServiceId( allLoadedServices[1].ServiceId );
// Set the group to the second in the list (round)
applychange.SetGroupId( 1 );
// Get the sizes of all the straights that was in the selection of elements that was added to FabricationNetworkChangeService
ISet<Autodesk.Revit.DB.Fabrication.FabricationPartSizeMap> sizeMappings = applychange.GetMapOfAllSizesForStraights();
foreach (Autodesk.Revit.DB.Fabrication.FabricationPartSizeMap sizemapping in sizeMappings)
{
if (sizemapping != null)
{
// Testing round so ignoring the depth and adding 6" to the current size so all straights will be updated to a new size
var widthDia = sizemapping.WidthDiameter + 0.5;
sizemapping.MappedWidthDiameter = widthDia;
}
}
applychange.SetMapOfSizesForStraights( sizeMappings );
// Get the in-line element type identiers
var inlineRevIds = new HashSet<Autodesk.Revit.DB.ElementId>();
ISet<Autodesk.Revit.DB.ElementId> inlineIds = applychange.GetInLinePartTypes();
for ( var ii = inlineIds.Count() - 1; ii > -1; ii-- )
{
var elemId = inlineIds.ElementAt( ii );
if (elemId != null)
inlineRevIds.Add(elemId);
}
// Set the in-line element type identiers by swapping them out by reversing the order to keep it simple but still exercise the code
IDictionary<ElementId, ElementId> swapinlineIds = new Dictionary<ElementId, ElementId>();
for ( var ii = inlineIds.Count() - 1; ii > -1; ii-- )
{
var elemId = inlineIds.ElementAt( ii );
var elemIdother = inlineRevIds.ElementAt( ii );
if ((elemId != null) && (elemId != null))
swapinlineIds.Add(elemId, elemIdother);
}
applychange.SetMapOfInLinePartTypes( swapinlineIds );
// Apply the changes
FabricationNetworkChangeServiceResult result = applychange.ApplyChange();
if (result != FabricationNetworkChangeServiceResult.Success)
{
message = "There was a problem with the apply change.";
return Result.Failed;
}
doc.Regenerate();
tr.Commit();
}
return Result.Succeeded;
}
else
{
// inform user they need to select at least one element
message = "Please select at least one element.";
}
return Result.Failed;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
}
@@ -0,0 +1,119 @@
//
// (C) Copyright 2003-2011 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 System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class ConvertToFabrication : 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)
{
try
{
Document doc = commandData.Application.ActiveUIDocument.Document;
// get the user selection
UIDocument uidoc = commandData.Application.ActiveUIDocument;
ICollection<ElementId> collection = uidoc.Selection.GetElementIds();
if (collection.Count > 0)
{
// DesignToFabrication needs an ISet<ElementId>
ISet<ElementId> selIds = new HashSet<ElementId>();
foreach (ElementId id in collection)
{
selIds.Add(id);
}
using (Transaction tr = new Transaction(doc, "Convert To Fabrication Parts"))
{
tr.Start();
FabricationConfiguration config = FabricationConfiguration.GetFabricationConfiguration(doc);
// get all loaded fabrication services and attempt to convert the design elements
// to the first loaded service
IList<FabricationService> allLoadedServices = config.GetAllLoadedServices();
DesignToFabricationConverter converter = new DesignToFabricationConverter(doc);
DesignToFabricationConverterResult result = converter.Convert(selIds, allLoadedServices[0].ServiceId);
if (result != DesignToFabricationConverterResult.Success)
{
message = "There was a problem with the conversion.";
return Result.Failed;
}
doc.Regenerate();
tr.Commit();
}
return Result.Succeeded;
}
else
{
// inform user they need to select at least one element
message = "Please select at least one element.";
}
return Result.Failed;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
}
@@ -0,0 +1,258 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using Autodesk.Revit.UI.Selection;
namespace Revit.SDK.Samples.FabricationPartLayout.CS
{
/// <summary>
/// Helper class to report custom data from fabrication part selection.
/// </summary>
public class CustomDataHelper
{
/// <summary>
/// Report the custom data.
/// </summary>
/// <param name="doc"></param>
/// <param name="uiDoc"></param>
/// <param name="setNewValues"></param>
/// <param name="message"></param>
/// <returns></returns>
public static Result ReportCustomData(Document doc, UIDocument uiDoc, bool setNewValues, ref string message)
{
FabricationPart fabPart = null;
FabricationConfiguration config = null;
try
{
// check for a load fabrication config
config = FabricationConfiguration.GetFabricationConfiguration(doc);
if (config == null)
{
message = "No fabrication configuration loaded.";
return Result.Failed;
}
// pick a fabrication part
Reference refObj = uiDoc.Selection.PickObject(ObjectType.Element, "Pick a fabrication part to start.");
fabPart = doc.GetElement(refObj) as FabricationPart;
}
catch (Autodesk.Revit.Exceptions.OperationCanceledException)
{
return Result.Cancelled;
}
if (fabPart == null)
{
message = "The selected element is not a fabrication part.";
return Result.Failed;
}
else
{
// get custom data from loaded fabrication config
IList<int> customDataIds = config.GetAllPartCustomData();
int customDataCount = customDataIds.Count;
string results = string.Empty;
// report custom data info
if (customDataCount > 0)
{
StringBuilder resultsBuilder = new StringBuilder();
resultsBuilder.AppendLine($"Fabrication config contains {customDataCount} custom data entries {Environment.NewLine}");
foreach (var customDataId in customDataIds)
{
FabricationCustomDataType customDataType = config.GetPartCustomDataType(customDataId);
string customDataName = config.GetPartCustomDataName(customDataId);
resultsBuilder.AppendLine($"Type: {customDataType.ToString()} Name: {customDataName}");
// check custom data exists on selected part
if (fabPart.HasCustomData(customDataId))
{
string fabPartCurrentValue = string.Empty;
string fabPartNewValue = string.Empty;
switch (customDataType)
{
case FabricationCustomDataType.Text:
fabPartCurrentValue = $"\"{fabPart.GetPartCustomDataText(customDataId)}\"";
if (setNewValues)
{
string installDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
fabPart.SetPartCustomDataText(customDataId, installDateTime);
fabPartNewValue = installDateTime;
}
break;
case FabricationCustomDataType.Integer:
fabPartCurrentValue = fabPart.GetPartCustomDataInteger(customDataId).ToString();
if (setNewValues)
{
int installHours = new Random().Next(1, 10);
fabPart.SetPartCustomDataInteger(customDataId, installHours);
fabPartNewValue = installHours.ToString();
}
break;
case FabricationCustomDataType.Real:
fabPartCurrentValue = $"{fabPart.GetPartCustomDataReal(customDataId):0.##}";
if (setNewValues)
{
double installCost = new Random().NextDouble() * new Random().Next(100, 1000);
fabPart.SetPartCustomDataReal(customDataId, installCost);
fabPartNewValue = $"{installCost:0.##}";
}
break;
}
resultsBuilder.AppendLine("Current custom data entry value = "
+ $"{fabPartCurrentValue} {Environment.NewLine}");
if (setNewValues)
{
resultsBuilder.AppendLine("New custom data entry value = "
+ $"{fabPartNewValue} {Environment.NewLine}");
}
}
else
{
resultsBuilder.AppendLine($"Custom data entry is not set on the part {Environment.NewLine}");
}
}
results = resultsBuilder.ToString();
}
TaskDialog td = new TaskDialog("Custom Data")
{
MainIcon = TaskDialogIcon.TaskDialogIconInformation,
TitleAutoPrefix = false,
MainInstruction = $"{customDataCount} custom data entries found in the loaded fabrication config",
MainContent = results
};
td.Show();
}
return Result.Succeeded;
}
}
/// <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)]
public class GetCustomData : 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)
{
Document doc = commandData.Application.ActiveUIDocument.Document;
UIDocument uidoc = commandData.Application.ActiveUIDocument;
return CustomDataHelper.ReportCustomData(doc, uidoc, false, ref message);
}
}
/// <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)]
public class SetCustomData : 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)
{
Document doc = commandData.Application.ActiveUIDocument.Document;
UIDocument uidoc = commandData.Application.ActiveUIDocument;
Result result;
using (Transaction tr = new Transaction(doc, "Setting Custom Data"))
{
tr.Start();
result = CustomDataHelper.ReportCustomData(doc, uidoc, true, ref message);
if (result == Result.Succeeded)
{
tr.Commit();
}
else
{
tr.RollBack();
}
}
return result;
}
}
}
@@ -0,0 +1,124 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using System.IO;
using System.Reflection;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class ExportToMAJ : 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)
{
try
{
// check user selection
var uidoc = commandData.Application.ActiveUIDocument;
var doc = uidoc.Document;
var elementIds = new HashSet<ElementId>();
uidoc.Selection.GetElementIds().ToList().ForEach( x => elementIds.Add(x) );
var hasFabricationParts = false;
foreach (var elementId in elementIds)
{
var part = doc.GetElement(elementId) as FabricationPart;
if (part != null)
{
hasFabricationParts = true;
break;
}
}
if (hasFabricationParts == false)
{
message = "Select at least one fabrication part";
return Result.Failed;
}
var callingFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var saveAsDlg = new FileSaveDialog("MAJ Files (*.maj)|*.maj");
saveAsDlg.InitialFileName = callingFolder + "\\majExport";
saveAsDlg.Title = "Export To MAJ";
var result = saveAsDlg.Show();
if (result == ItemSelectionDialogResult.Canceled)
return Result.Cancelled;
string filename = ModelPathUtils.ConvertModelPathToUserVisiblePath(saveAsDlg.GetSelectedModelPath());
ISet<ElementId> exported = FabricationPart.SaveAsFabricationJob(doc, elementIds, filename, new FabricationSaveJobOptions(true));
if (exported.Count > 0)
{
TaskDialog td = new TaskDialog("Export to MAJ")
{
MainIcon = TaskDialogIcon.TaskDialogIconInformation,
TitleAutoPrefix = false,
MainInstruction = string.Concat("Export to MAJ was successful - ", exported.Count.ToString(), " Parts written"),
MainContent = filename,
AllowCancellation = false,
CommonButtons = TaskDialogCommonButtons.Ok
};
td.Show();
}
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
}
@@ -0,0 +1,133 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using System.Windows.Forms;
using System.IO;
using System.Reflection;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class ExportToPCF : 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)
{
try
{
// check user selection
var uidoc = commandData.Application.ActiveUIDocument;
var doc = uidoc.Document;
var collection = uidoc.Selection.GetElementIds();
var hasFabricationPart = false;
using (var trans = new Transaction(doc, "Change Spool Name"))
{
trans.Start();
foreach (var elementId in collection)
{
var part = doc.GetElement(elementId) as FabricationPart;
if (part != null)
{
hasFabricationPart = true;
part.SpoolName = "My Spool";
}
}
trans.Commit();
}
if (hasFabricationPart == false)
{
message = "Select at least one fabrication part";
return Result.Failed;
}
var callingFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var saveAsDlg = new FileSaveDialog("PCF Files (*.pcf)|*.pcf");
saveAsDlg.InitialFileName = callingFolder + "\\pcfExport";
saveAsDlg.Title = "Export To PCF";
var result = saveAsDlg.Show();
if (result == ItemSelectionDialogResult.Canceled)
return Result.Cancelled;
var fabParts = collection.ToList();
string filename = ModelPathUtils.ConvertModelPathToUserVisiblePath(saveAsDlg.GetSelectedModelPath());
FabricationUtils.ExportToPCF(doc, fabParts, filename);
TaskDialog td = new TaskDialog("Export to PCF")
{
MainIcon = TaskDialogIcon.TaskDialogIconInformation,
TitleAutoPrefix = false,
MainInstruction = "Export to PCF was successful",
MainContent = filename,
AllowCancellation = false,
CommonButtons = TaskDialogCommonButtons.Ok
};
td.Show();
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
}
@@ -0,0 +1,219 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using System.Windows.Forms;
using System.IO;
using System.Reflection;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class FabPartGeometry : IExternalCommand
{
private IList<Mesh> getMeshes(GeometryElement ge)
{
IList<Mesh> rv = new List<Mesh>();
if (ge != null)
{
foreach (GeometryObject g in ge)
{
GeometryInstance i = g as GeometryInstance;
if (i != null)
{
GeometryElement ge2 = i.GetInstanceGeometry();
if (ge2 != null)
rv = rv.Concat(getMeshes(ge2)).ToList();
}
else
{
Mesh mesh = g as Mesh;
if (mesh != null && mesh.Vertices.Count > 0)
rv.Add(mesh);
}
}
}
return rv;
}
private bool exportMesh(String filename, Mesh mesh)
{
bool bSaved = false;
try
{
StreamWriter sout = new StreamWriter(filename, false);
sout.WriteLine("P1X, P1Y, P1Z, P2X, P2Y, P2Z, P3X, P3Y, P3Z");
for (int tlp = 0; tlp < mesh.NumTriangles; tlp++)
{
MeshTriangle tri = mesh.get_Triangle(tlp);
XYZ p1 = mesh.Vertices[(int)tri.get_Index(0)];
XYZ p2 = mesh.Vertices[(int)tri.get_Index(1)];
XYZ p3 = mesh.Vertices[(int)tri.get_Index(2)];
String tstr = String.Format("{0:0.000}, {1:0.000}, {2:0.000}, {3:0.000}, {4:0.000}, {5:0.000}, {6:0.000}, {7:0.000}, {8:0.000}", new object[] { p1.X, p1.Y, p1.Z, p2.X, p2.Y, p2.Z, p3.X, p3.Y, p3.Z });
sout.WriteLine(tstr);
}
sout.Close();
bSaved = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Unable to write file", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return bSaved;
}
/// <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)
{
try
{
// check user selection
var uidoc = commandData.Application.ActiveUIDocument;
var doc = uidoc.Document;
ISet<ElementId> parts = null;
using (Transaction tr = new Transaction(doc, "Optimise Preselection"))
{
tr.Start();
ICollection<ElementId> selElems = uidoc.Selection.GetElementIds();
if (selElems.Count > 0)
{
parts = new HashSet<ElementId>(selElems);
}
tr.Commit();
}
if (parts == null)
{
MessageBox.Show("Select parts to export.");
return Result.Failed;
}
var callingFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var saveAsDlg = new FileSaveDialog("CSV Files (*.csv)|*.csv");
saveAsDlg.InitialFileName = callingFolder + "\\geomExport";
saveAsDlg.Title = "Save Part Geometry As";
var result = saveAsDlg.Show();
if (result == ItemSelectionDialogResult.Canceled)
return Result.Cancelled;
string filename = ModelPathUtils.ConvertModelPathToUserVisiblePath(saveAsDlg.GetSelectedModelPath());
string ext = Path.GetExtension(filename);
filename = Path.GetFileNameWithoutExtension(filename);
int partcount = 1, exported = 0;
foreach (ElementId eid in parts)
{
            // get all rods and kist with rods
            FabricationPart part = doc.GetElement(eid) as FabricationPart;
if (part != null)
{
Options options = new Options();
options.DetailLevel = ViewDetailLevel.Coarse;
IList<Mesh> main = getMeshes(part.get_Geometry(options));
IList<Mesh> ins = getMeshes(part.GetInsulationLiningGeometry());
int mlp = 0;
foreach (Mesh mesh in main)
{
String file = String.Concat( filename, partcount.ToString(), "-main-", (++mlp).ToString(), ext);
if (exportMesh(file, mesh))
exported++;
}
int ilp = 0;
foreach (Mesh mesh in ins)
{
String file = String.Concat(filename, partcount.ToString(), "-ins-", (++ilp).ToString(), ext);
if (exportMesh(file, mesh))
exported++;
}
}
partcount++;
}
String res = (exported > 0) ? "Export was successful" : "Nothing was exported";
String manywritten = String.Format("{0} Parts were exported", exported);
TaskDialog td = new TaskDialog("Export Part Mesh Geometry")
{
MainIcon = TaskDialogIcon.TaskDialogIconInformation,
TitleAutoPrefix = false,
MainInstruction = res,
MainContent = manywritten,
AllowCancellation = false,
CommonButtons = TaskDialogCommonButtons.Ok
};
td.Show();
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
}
@@ -0,0 +1,267 @@
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>399fe985-0175-42c0-98a2-ce1469d2a592</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.FabricationPartLayout</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Fabrication Part Layout</Text>
<Description>Fabrication Part Layout Sample</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>dece0d9a-51eb-48cd-b260-dd7e4373ffee</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.OptimizeStraights</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Optimize Straights</Text>
<Description>Optimize Straights</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>21ec0e70-7a8a-4852-853a-d1163f4fe256</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.StretchAndFit</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Stretch and Fit</Text>
<Description>Stretch and fit</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>78e2660c-497e-4b5b-9e69-e094f1620bc0</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.ConvertToFabrication</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Convert To Fabrication</Text>
<Description>Convert Design Elements To Fabrication Parts</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>01710049-182d-442a-a5f3-6bc88142a69c</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.ButtonGroupExclusions</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Buttons and Group Exclusions</Text>
<Description>Exclude Fabrication Service Buttons and Groups for Routing Operations</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>b083fe9b-dd69-43f9-b4ba-71d83e783825</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.Ancillaries</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Ancillaries</Text>
<Description>Discover the Ancillaries Associated with a Fabrication Part</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>c7ed9947-fd8a-4902-b4ab-70a8768f7994</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.GetCustomData</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Get Custom Data</Text>
<Description>Discover the Custom data Associated with a Fabrication Config and Part</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>fd062a9b-b1f6-4238-8099-072b75168565</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.SetCustomData</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Set Custom Data</Text>
<Description>Set Custom data Associated with a Fabrication Config to a Selected Part</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>4FED7AA3-1934-492F-B65C-F1E07D1717F0</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.ExportToPCF</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Export to PCF</Text>
<Description>Exports fabrication parts to a PCF file</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>B38DDFE1-4218-4B4B-9D88-FB89AE69B5AE</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.FabPartGeometry</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Export Part Geometry</Text>
<Description>Exports fabrication part geometry to a CSV file</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>D10B0B0E-5CB1-47A2-96C0-0007F4B8A610</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.PartInfo</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Display Part Info</Text>
<Description>Displays fabrication part information</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>857F26D5-AA39-4DC1-8ED7-35886D082DA9</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.DetachRods</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Detach Hanger Rods</Text>
<Description>Detaches hanger rods from their structural host</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>7478836E-55CD-4870-81EF-31A6BBA56B1C</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.DoubleRodLength</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Double Rod Lengths</Text>
<Description>Doubles the length of the picked hanger rods</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>19850600-D546-4B3B-90FF-7A8C8D263A7E</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.HalveRodLength</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Halve Rod Lengths</Text>
<Description>Halves the length of the picked hanger rods</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>C74A04FD-8767-4AA7-9176-52732134D5BB</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.IncreaseRodStructureExtension</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Increase Rod Structure Extension</Text>
<Description>Increase the length of the rod as an extension from its hosted structure (by 1ft)</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>7404BDC0-98AE-4E77-B85C-0EB3E4CE8E7B</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.DecreaseRodStructureExtension</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Decrease Rod Structure Extension</Text>
<Description>Decrease the length of the rod as an extension from its hosted structure (by 1ft)</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>44F05E94-6646-45C3-A855-26B0BB0A34D1</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.PartRenumber</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Part Renumber</Text>
<Description>Renumbers a selection of fabrication parts</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>5444859C-A7C2-45D1-A527-AFE269EB2275</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.SplitStraight</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Split Straight</Text>
<Description>Splits a fabrication part straight into two equal pieces</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>328E8863-D396-44F0-A429-3862D222C287</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.LoadAndPlaceNextItemFile</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Load and Place Next Item File</Text>
<Description>Reloads the fabrication configuration and then iterates the item folders and finds the next unloaded item file and lets a user place it in the model</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>6FC9FEB1-EA83-4C5B-B663-EDBCCC58D427</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.UnloadUnusedItemFiles</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Unload Unused Item Files</Text>
<Description>Unloads item files that are loaded but are not used in the model</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>970D8022-3085-4CC8-9C47-262C33652AB3</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.ExportToMAJ</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Export to MAJ</Text>
<Description>Export Fabrication Parts to a fabrication job (MAJ) file</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>6A812363-55D1-4E6E-9D92-31293032D0EA</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.ChangeService</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Change Service</Text>
<Description>Change the service of a selection of Fabrication Parts</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>103490FA-DE09-407D-90E6-255BF4C320B5</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.ChangeSize</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Change Size</Text>
<Description>Change the size of a selection of Fabrication Parts</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
<AddIn Type="Command">
<Assembly>FabricationPartLayout.dll</Assembly>
<AddInId>9F159E47-EDD6-4727-B9EE-5992F05057CB</AddInId>
<FullClassName>Revit.SDK.Samples.FabricationPartLayout.CS.ApplyChange</FullClassName>
<VendorId>ADSK</VendorId>
<Text>Apply Change</Text>
<Description>Apply change to the service and the size of a selection of Fabrication Parts</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<Discipline>Any</Discipline>
<LanguageType>Unknown</LanguageType>
</AddIn>
</RevitAddIns>
@@ -0,0 +1,995 @@
//
// (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 System;
using System.Windows.Forms;
using System.Collections;
using System.Collections.Generic;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using System.Linq;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class FabricationPartLayout : IExternalCommand
{
Document m_doc { get; set; }
IList<FabricationService> m_services { get; set; }
// kept in sync
IList<int> m_materialIds { get; set; }
IList<string> m_materialGroups { get; set; }
IList<string> m_materialNames { get; set; }
// kept in sync
IList<int> m_specIds { get; set; }
IList<string> m_specGroups { get; set; }
IList<string> m_specNames { get; set; }
// kept in sync
IList<int> m_insSpecIds { get; set; }
IList<string> m_insSpecGroups { get; set; }
IList<string> m_insSpecNames { get; set; }
// kept in sync
IList<int> m_connIds { get; set; }
IList<string> m_connGroups { get; set; }
IList<string> m_connNames { get; set; }
/// <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)
{
try
{
m_doc = commandData.Application.ActiveUIDocument.Document;
FilteredElementCollector cl = new FilteredElementCollector(m_doc);
cl.OfClass(typeof(Level));
IList<Element> levels = cl.ToElements();
Level levelOne = null;
foreach (Level level in levels)
{
if (level != null && level.Name.Equals("Level 1"))
{
levelOne = level;
break;
}
}
if (levelOne == null)
return Result.Failed;
// locate the AHU in the model - should only be one instance in the model.
FilteredElementCollector c2 = new FilteredElementCollector(m_doc);
c2.OfClass(typeof(FamilyInstance));
IList<Element> families = c2.ToElements();
if (families.Count != 1)
return Result.Failed;
FamilyInstance fam_ahu = families[0] as FamilyInstance;
if (fam_ahu == null)
return Result.Failed;
// locate the proper connector - rectangular 40"x40" outlet
Connector conn_ahu = null;
ConnectorSet conns_ahu = fam_ahu.MEPModel.ConnectorManager.UnusedConnectors;
double lengthInFeet = 40.0 / 12.0;
foreach (Connector conn in conns_ahu)
{
// Revit units measured in feet, so dividing the width and height by 12
if (conn.Shape == ConnectorProfileType.Rectangular && conn.Width == lengthInFeet && conn.Height == lengthInFeet)
conn_ahu = conn;
}
if (conn_ahu == null)
return Result.Failed;
// get the current fabrication configuration
FabricationConfiguration config = FabricationConfiguration.GetFabricationConfiguration(m_doc);
if (config == null)
return Result.Failed;
// create materials look-up tables
GetMaterials(config);
// create specs look-up tables
GetSpecs(config);
// create insulation specs look-up tables
GetInsulationSpecs(config);
// create fabrication configuration look-up tables
GetFabricationConnectors(config);
// get all the loaded services
m_services = config.GetAllLoadedServices();
if (m_services.Count == 0)
return Result.Failed;
FabricationService havcService = m_services.FirstOrDefault(x => x.Name.Contains("HVAC"));
FabricationService pipeService = m_services.FirstOrDefault(x => x.Name.Contains("Plumbing"));
FabricationServiceButton bt_transition = locateButton(havcService, 0, "Transition");
FabricationServiceButton bt_sqBend = locateButton(havcService, 0, "Square Bend");
FabricationServiceButton bt_tap = locateButton(havcService, 0, "Tap");
FabricationServiceButton bt_rectStraight = locateButton(havcService, 0, "Straight");
FabricationServiceButton bt_radBend = locateButton(havcService, 0, "Radius Bend");
FabricationServiceButton bt_flatShoe = locateButton(havcService, 1, "Flat Shoe");
FabricationServiceButton bt_tube = locateButton(havcService, 1, "Tube");
FabricationServiceButton bt_90bend = locateButton(havcService, 1, "Bend - 90");
FabricationServiceButton bt_45bend = locateButton(havcService, 1, "Bend - 45");
FabricationServiceButton bt_rectTee = locateButton(havcService, 0, "Tee");
FabricationServiceButton bt_sqToRound = locateButton(havcService, 0, "Square to Round");
FabricationServiceButton bt_reducer = locateButton(havcService, 1, "Reducer - C");
FabricationServiceButton bt_curvedBoot = locateButton(havcService, 1, "Curved Boot");
FabricationServiceButton bt_hangerBearer = locateButton(havcService, 4, "Rectangular Bearer");
FabricationServiceButton bt_hangerRound = locateButton(havcService, 4, "Round Duct Hanger");
FabricationServiceButton bt_valve = locateButton(pipeService, 2, "Globe Valve");
FabricationServiceButton bt_groovedPipe = locateButton(pipeService, 1, "Type L Hard Copper");
FabricationServiceButton bt_90elbow = locateButton(pipeService, 1, "No610 - 90 Elbow");
using (Transaction tr = new Transaction(m_doc, "Create Layout"))
{
tr.Start();
// connect a square bend to the ahu
FabricationPart pt_sqBend1 = FabricationPart.Create(m_doc, bt_sqBend, 0, levelOne.Id);
Connector conn1_sqBend1 = GetPrimaryConnector(pt_sqBend1.ConnectorManager);
Connector conn2_sqBend1 = GetSecondaryConnector(pt_sqBend1.ConnectorManager);
SizeAlignCoupleConnect(conn1_sqBend1, conn_ahu, 3.0 * Math.PI / 2.0);
// add a 15' straight to the square bend
FabricationPart pt_rectStraight1 = CreateStraightPart(bt_rectStraight, 0, levelOne.Id, 15.0);
Connector conn1_straight1 = GetPrimaryConnector(pt_rectStraight1.ConnectorManager);
Connector conn2_straight1 = GetSecondaryConnector(pt_rectStraight1.ConnectorManager);
SizeAlignCoupleConnect(conn1_straight1, conn2_sqBend1, 0);
// add two Rectangular Bearer hangers at 5' to each end of the 15' straight
FabricationPart.CreateHanger(m_doc, bt_hangerBearer, pt_rectStraight1.Id, conn1_straight1, 5.0, true);
FabricationPart.CreateHanger(m_doc, bt_hangerBearer, pt_rectStraight1.Id, conn2_straight1, 5.0, true);
// connect a tap to the straight half way along
FabricationPart pt_tap1 = FabricationPart.Create(m_doc, bt_tap, 0, levelOne.Id);
Connector conn1_tap1 = GetPrimaryConnector(pt_tap1.ConnectorManager);
Connector conn2_tap1 = GetSecondaryConnector(pt_tap1.ConnectorManager);
FabricationPart.PlaceAsTap(m_doc, conn1_tap1, conn1_straight1, 7.5, 3.0 * Math.PI / 2.0, 0);
// connect a square to round to the tap, with an outlet of 10"
FabricationPart pt_sqToRound1 = FabricationPart.Create(m_doc, bt_sqToRound, 0, levelOne.Id);
Connector conn1_sqToRound1 = GetPrimaryConnector(pt_sqToRound1.ConnectorManager);
Connector conn2_sqToRound1 = GetSecondaryConnector(pt_sqToRound1.ConnectorManager);
conn2_sqToRound1.Radius = 5.0 / 12.0; // convert to feet
SizeAlignCoupleConnect(conn1_sqToRound1, conn2_tap1, 0);
// connect a bend 90, based on the condition (converting 10" into feet)
FabricationPart pt_90bend1 = FabricationPart.Create(m_doc, bt_90bend, 10.0 / 12.0, 10.0 / 12.0, levelOne.Id);
Connector conn1_90bend1 = GetPrimaryConnector(pt_90bend1.ConnectorManager);
Connector conn2_90bend1 = GetSecondaryConnector(pt_90bend1.ConnectorManager);
SizeAlignCoupleConnect(conn1_90bend1, conn2_sqToRound1, 0);
FabricationPart pt_90bend2 = FabricationPart.Create(m_doc, bt_90bend, 0, levelOne.Id);
Connector conn1_90bend2 = GetPrimaryConnector(pt_90bend2.ConnectorManager);
Connector conn2_90bend2 = GetSecondaryConnector(pt_90bend2.ConnectorManager);
SizeAlignCoupleConnect(conn1_90bend2, conn2_90bend1, 0);
// now let's add a tube in
FabricationPart pt_tube1 = CreateStraightPart(bt_tube, 0, levelOne.Id, 5.0);
Connector conn1_tube1 = GetPrimaryConnector(pt_tube1.ConnectorManager);
Connector conn2_tube1 = GetSecondaryConnector(pt_tube1.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube1, conn2_90bend2, 0);
// and now add a square to round, connecting by round end
// change the spec to undefined, change material, add insulation, change a connector
FabricationPart pt_sqToRound2 = FabricationPart.Create(m_doc, bt_sqToRound, 0, levelOne.Id);
Connector conn1_sqToRound2 = GetPrimaryConnector(pt_sqToRound2.ConnectorManager);
Connector conn2_sqToRound2 = GetSecondaryConnector(pt_sqToRound2.ConnectorManager); // round end
SizeAlignCoupleConnect(conn2_sqToRound2, conn2_tube1, 0);
// set the spec to none
pt_sqToRound2.Specification = 0; // none
// now locate specific material, insulation spec and fabrication connector
//int specId = config.LocateSpecification("Ductwork", "+6 WG");
int materialId = config.LocateMaterial("Ductwork", "Mild Steel");
int insSpecId = config.LocateInsulationSpecification("Ductwork", "Acoustic Liner 1''");
int connId = config.LocateFabricationConnector("Duct - S&D", "S&D", ConnectorDomainType.Undefined, ConnectorProfileType.Rectangular);
// now set the material, insulation spec and one of the connectors
if (materialId >= 0)
pt_sqToRound2.Material = materialId;
if (insSpecId >= 0)
pt_sqToRound2.InsulationSpecification = insSpecId;
if (connId >= 0)
conn1_sqToRound2.GetFabricationConnectorInfo().BodyConnectorId = connId;
// connect a 2' 6" transition to the square bend
FabricationPart pt_transition1 = FabricationPart.Create(m_doc, bt_transition, 0, levelOne.Id);
SetDimValue(pt_transition1, "Length", 2.5); // set length of transition to 2' 6"
Connector conn1_transition1 = GetPrimaryConnector(pt_transition1.ConnectorManager);
Connector conn2_transition1 = GetSecondaryConnector(pt_transition1.ConnectorManager);
conn2_transition1.Width = 2.0;
conn2_transition1.Height = 2.0;
SizeAlignCoupleConnect(conn1_transition1, conn2_straight1, 0);
// connect a rising square bend to the transition
FabricationPart pt_sqBend2 = FabricationPart.Create(m_doc, bt_sqBend, 0, levelOne.Id);
Connector conn1_sqBend2 = GetPrimaryConnector(pt_sqBend2.ConnectorManager);
Connector conn2_sqBend2 = GetSecondaryConnector(pt_sqBend2.ConnectorManager);
SizeAlignCoupleConnect(conn1_sqBend2, conn2_transition1, 0);
// connect a 4' 5" straight to the square bend
FabricationPart pt_rectStraight2 = CreateStraightPart(bt_rectStraight, 0, levelOne.Id, (4.0 + (5.0 / 12.0)));
Connector conn1_straight2 = GetPrimaryConnector(pt_rectStraight2.ConnectorManager);
Connector conn2_straight2 = GetSecondaryConnector(pt_rectStraight2.ConnectorManager);
SizeAlignCoupleConnect(conn1_straight2, conn2_sqBend2, 0);
// connect a square bend to the straight
FabricationPart pt_sqBend3 = FabricationPart.Create(m_doc, bt_sqBend, 0, levelOne.Id);
Connector conn1_sqBend3 = GetPrimaryConnector(pt_sqBend3.ConnectorManager);
Connector conn2_sqBend3 = GetSecondaryConnector(pt_sqBend3.ConnectorManager);
SizeAlignCoupleConnect(conn1_sqBend3, conn2_straight2, Math.PI);
// add a 5' straight
FabricationPart pt_rectStraight3 = CreateStraightPart(bt_rectStraight, 0, levelOne.Id, 5.0);
Connector conn1_straight3 = GetPrimaryConnector(pt_rectStraight3.ConnectorManager);
Connector conn2_straight3 = GetSecondaryConnector(pt_rectStraight3.ConnectorManager);
SizeAlignCoupleConnect(conn1_straight3, conn2_sqBend3, 0);
//add a Bearer hanger in middle of straight3
FabricationPart.CreateHanger(m_doc, bt_hangerBearer, pt_rectStraight3.Id, conn1_straight3, 2.5, true);
// add a 45 degree radius bend
FabricationPart pt_radBend1 = FabricationPart.Create(m_doc, bt_radBend, 0, levelOne.Id);
Connector conn1_radBend1 = GetPrimaryConnector(pt_radBend1.ConnectorManager);
Connector conn2_radBend1 = GetSecondaryConnector(pt_radBend1.ConnectorManager);
SizeAlignCoupleConnect(conn1_radBend1, conn2_straight3, 3.0 * Math.PI / 2.0);
SetDimValue(pt_radBend1, "Angle", Math.PI / 4.0);
// add a 1' 8" straight
FabricationPart pt_rectStraight4 = CreateStraightPart(bt_rectStraight, 0, levelOne.Id, 1.0 + (8.0 / 12.0));
Connector conn1_straight4 = GetPrimaryConnector(pt_rectStraight4.ConnectorManager);
Connector conn2_straight4 = GetSecondaryConnector(pt_rectStraight4.ConnectorManager);
SizeAlignCoupleConnect(conn1_straight4, conn2_radBend1, 0);
// add a 45 degree radius bend
FabricationPart pt_radBend2 = FabricationPart.Create(m_doc, bt_radBend, 0, levelOne.Id);
Connector conn1_radBend2 = GetPrimaryConnector(pt_radBend2.ConnectorManager);
Connector conn2_radBend2 = GetSecondaryConnector(pt_radBend2.ConnectorManager);
SizeAlignCoupleConnect(conn1_radBend2, conn2_straight4, Math.PI);
SetDimValue(pt_radBend2, "Angle", Math.PI / 4.0);
// add a 5' straight
FabricationPart pt_rectStraight5 = CreateStraightPart(bt_rectStraight, 0, levelOne.Id, 5.0);
Connector conn1_straight5 = GetPrimaryConnector(pt_rectStraight5.ConnectorManager);
Connector conn2_straight5 = GetSecondaryConnector(pt_rectStraight5.ConnectorManager);
SizeAlignCoupleConnect(conn1_straight5, conn2_radBend2, 0);
//add a Bearer hanger in middle of straight5
FabricationPart.CreateHanger(m_doc, bt_hangerBearer, pt_rectStraight5.Id, conn1_straight5, 2.5, true);
// add a 2' 6" straight
FabricationPart pt_rectStraight6 = CreateStraightPart(bt_rectStraight, 0, levelOne.Id, 2.5);
Connector conn1_straight6 = GetPrimaryConnector(pt_rectStraight6.ConnectorManager);
Connector conn2_straight6 = GetSecondaryConnector(pt_rectStraight6.ConnectorManager);
SizeAlignCoupleConnect(conn1_straight6, conn2_straight5, 0);
// add an 8" tap to the last straight - half way along the straight - using parameter to set the product entry
// could also set the radius directly.
FabricationPart pt_flatShoe1 = FabricationPart.Create(m_doc, bt_flatShoe, 0, levelOne.Id);
Parameter prodEntry_flatShoe1 = pt_flatShoe1.get_Parameter(BuiltInParameter.FABRICATION_PRODUCT_ENTRY);
prodEntry_flatShoe1.Set("8''");
Connector conn1_flatShoe1 = GetPrimaryConnector(pt_flatShoe1.ConnectorManager);
Connector conn2_flatShoe1 = GetSecondaryConnector(pt_flatShoe1.ConnectorManager);
FabricationPart.PlaceAsTap(m_doc, conn1_flatShoe1, conn1_straight6, 1.25, Math.PI, 0);
// add a 16' 8 long tube
double length_tube2 = 16.0 + (8.0 / 12.0);
FabricationPart pt_tube2 = CreateStraightPart(bt_tube, 0, levelOne.Id, length_tube2);
Connector conn1_tube2 = GetPrimaryConnector(pt_tube2.ConnectorManager);
Connector conn2_tube2 = GetSecondaryConnector(pt_tube2.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube2, conn2_flatShoe1, 0);
//add 3 hangers for tube2 , with specified button condition
for (int i = 0; i < 3; i++)
{
FabricationPart.CreateHanger(m_doc, bt_hangerRound, 1, pt_tube2.Id, conn1_tube2, (i + 1) * length_tube2 / 4, true);
}
// add a 90 degree bend
FabricationPart pt_90bend3 = FabricationPart.Create(m_doc, bt_90bend, 0, levelOne.Id);
Connector conn1_90bend3 = GetPrimaryConnector(pt_90bend3.ConnectorManager);
Connector conn2_90bend3 = GetSecondaryConnector(pt_90bend3.ConnectorManager);
SizeAlignCoupleConnect(conn1_90bend3, conn2_tube2, Math.PI);
// add a 10' long tube
FabricationPart pt_tube3 = CreateStraightPart(bt_tube, 0, levelOne.Id, 10.0);
Connector conn1_tube3 = GetPrimaryConnector(pt_tube3.ConnectorManager);
Connector conn2_tube3 = GetSecondaryConnector(pt_tube3.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube3, conn2_90bend3, 0);
//add one hangers in middle of tube3, by default button condition
FabricationPart.CreateHanger(m_doc, bt_hangerRound, pt_tube3.Id, conn1_tube3, 5.0, true);
// add a 45 degree bend
FabricationPart pt_45Bend1 = FabricationPart.Create(m_doc, bt_45bend, 0, levelOne.Id);
Connector conn1_45Bend1 = GetPrimaryConnector(pt_45Bend1.ConnectorManager);
Connector conn2_45Bend1 = GetSecondaryConnector(pt_45Bend1.ConnectorManager);
SizeAlignCoupleConnect(conn1_45Bend1, conn2_tube3, Math.PI);
// add a 2' long tube
FabricationPart pt_tube4 = CreateStraightPart(bt_tube, 0, levelOne.Id, 2.0);
Connector conn1_tube4 = GetPrimaryConnector(pt_tube4.ConnectorManager);
Connector conn2_tube4 = GetSecondaryConnector(pt_tube4.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube4, conn2_45Bend1, 0);
// add a 45 degree bend
FabricationPart pt_45Bend2 = FabricationPart.Create(m_doc, bt_45bend, 0, levelOne.Id);
Connector conn1_45Bend2 = GetPrimaryConnector(pt_45Bend2.ConnectorManager);
Connector conn2_45Bend2 = GetSecondaryConnector(pt_45Bend2.ConnectorManager);
SizeAlignCoupleConnect(conn1_45Bend2, conn2_tube4, Math.PI);
// add a 10' long tube
FabricationPart pt_tube5 = CreateStraightPart(bt_tube, 0, levelOne.Id, 10.0);
Connector conn1_tube5 = GetPrimaryConnector(pt_tube5.ConnectorManager);
Connector conn2_tube5 = GetSecondaryConnector(pt_tube5.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube5, conn2_45Bend2, 0);
//add one hangers in middle of tube5, by default button condition
FabricationPart.CreateHanger(m_doc, bt_hangerRound, pt_tube5.Id, conn1_tube5, 5.0, true);
// now go back to the straight (pt_rectStraight5) with the tap and add a square bend
FabricationPart pt_sqBend4 = FabricationPart.Create(m_doc, bt_sqBend, 0, levelOne.Id);
Connector conn1_sqBend4 = GetPrimaryConnector(pt_sqBend4.ConnectorManager);
Connector conn2_sqBend4 = GetSecondaryConnector(pt_sqBend4.ConnectorManager);
SizeAlignCoupleConnect(conn1_sqBend4, conn2_straight6, Math.PI);
// add a 5' straight
FabricationPart pt_rectStraight7 = CreateStraightPart(bt_rectStraight, 0, levelOne.Id, 5.0);
Connector conn1_straight7 = GetPrimaryConnector(pt_rectStraight7.ConnectorManager);
Connector conn2_straight7 = GetSecondaryConnector(pt_rectStraight7.ConnectorManager);
SizeAlignCoupleConnect(conn1_straight7, conn2_sqBend4, 0);
//add a Bearer hanger in middle of straight7, by default condition
FabricationPart.CreateHanger(m_doc, bt_hangerBearer, pt_rectStraight7.Id, conn1_straight7, 2.5, true);
// add a modified tee
FabricationPart pt_rectTee1 = FabricationPart.Create(m_doc, bt_rectTee, 0, levelOne.Id);
// Set the size prior to connecting the part. Template parts with more than 2 connectors will disable editing of sizes once one of the connectors is connected to something.
SetDimValue(pt_rectTee1, "Right Width", 16.0 / 12.0); // set right width dimension to 16" (converted to feet)
SetDimValue(pt_rectTee1, "Btm Width", 20.0 / 12.0); // set bottom width dimension to 20" (converted to feet)
Connector conn1_rectTee1 = GetPrimaryConnector(pt_rectTee1.ConnectorManager);
Connector conn2_rectTee1 = GetSecondaryConnector(pt_rectTee1.ConnectorManager);
Connector conn3_rectTee1 = GetFirstNonPrimaryOrSecondaryConnector(pt_rectTee1.ConnectorManager);
SizeAlignCoupleConnect(conn3_rectTee1, conn2_straight7, Math.PI);
// add a square to round to the tee (conn2)
FabricationPart pt_sqToRound3 = FabricationPart.Create(m_doc, bt_sqToRound, 0, levelOne.Id);
Connector conn1_sqToRound3 = GetPrimaryConnector(pt_sqToRound3.ConnectorManager);
Connector conn2_sqToRound3 = GetSecondaryConnector(pt_sqToRound3.ConnectorManager);
SizeAlignCoupleConnect(conn1_sqToRound3, conn2_rectTee1, 0);
SetDimValue(pt_sqToRound3, "Length", 1.0 + (8.5 / 12.0)); // set length dimension to 1' 8 1/2" (converted to feet)
SetDimValue(pt_sqToRound3, "Diameter", 1.0); // set diameter dimension to 1'
// add a 22' 4" long tube
double length_tube6 = 22.0 + (4.0 / 12.0);
FabricationPart pt_tube6 = CreateStraightPart(bt_tube, 0, levelOne.Id, length_tube6);
Connector conn1_tube6 = GetPrimaryConnector(pt_tube6.ConnectorManager);
Connector conn2_tube6 = GetSecondaryConnector(pt_tube6.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube6, conn2_sqToRound3, 0);
//add 3 hangers for tube6, by default condition
for (int i = 0; i < 3; i++)
{
FabricationPart.CreateHanger(m_doc, bt_hangerRound, 1, pt_tube6.Id, conn1_tube6, (i + 1) * length_tube6 / 4, true);
}
// add a reducer, reducing to 8"
FabricationPart pt_reducer1 = FabricationPart.Create(m_doc, bt_reducer, 0, levelOne.Id);
Connector conn1_reducer1 = GetPrimaryConnector(pt_reducer1.ConnectorManager);
Connector conn2_reducer1 = GetSecondaryConnector(pt_reducer1.ConnectorManager);
SizeAlignCoupleConnect(conn1_reducer1, conn2_tube6, 0);
Parameter prodEntry_reducer1 = pt_reducer1.get_Parameter(BuiltInParameter.FABRICATION_PRODUCT_ENTRY);
prodEntry_reducer1.Set("12''x8''");
// add a 10' long tube
FabricationPart pt_tube7 = CreateStraightPart(bt_tube, 0, levelOne.Id, 10.0);
Connector conn1_tube7 = GetPrimaryConnector(pt_tube7.ConnectorManager);
Connector conn2_tube7 = GetSecondaryConnector(pt_tube7.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube7, conn2_reducer1, 0);
//add one hangers in middle of tube7, by default button condition
FabricationPart.CreateHanger(m_doc, bt_hangerRound, pt_tube7.Id, conn1_tube7, 5.0, true);
// add a curved boot tap to the 22' 4" tube (pt_tube6) 1' 2" from the end, reducing to 8"
FabricationPart pt_curvedBoot1 = FabricationPart.Create(m_doc, bt_curvedBoot, 0, levelOne.Id);
Parameter prodEntry_curvedBoot1 = pt_curvedBoot1.get_Parameter(BuiltInParameter.FABRICATION_PRODUCT_ENTRY);
prodEntry_curvedBoot1.Set("12''x8''");
Connector conn1_curvedBoot1 = GetPrimaryConnector(pt_curvedBoot1.ConnectorManager);
Connector conn2_curvedBoot1 = GetSecondaryConnector(pt_curvedBoot1.ConnectorManager);
FabricationPart.PlaceAsTap(m_doc, conn1_curvedBoot1, conn2_tube6, 1.0 + (2.0 / 12.0), Math.PI, Math.PI);
// add a 16' 8" long tube to the curved boot
double length_tube8 = 16.0 + (8.0 / 12.0);
FabricationPart pt_tube8 = CreateStraightPart(bt_tube, 0, levelOne.Id, length_tube8);
Connector conn1_tube8 = GetPrimaryConnector(pt_tube8.ConnectorManager);
Connector conn2_tube8 = GetSecondaryConnector(pt_tube8.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube8, conn2_curvedBoot1, 0);
//add 3 hangers for tube8, with specified condition
for (int i = 0; i < 3; i++)
{
FabricationPart.CreateHanger(m_doc, bt_hangerRound, 0, pt_tube8.Id, conn1_tube8, (i + 1) * length_tube8 / 4, true);
}
// going back to the modified tee
// add a square to round to the tee (conn2)
FabricationPart pt_sqToRound4 = FabricationPart.Create(m_doc, bt_sqToRound, 0, levelOne.Id);
Connector conn1_sqToRound4 = GetPrimaryConnector(pt_sqToRound4.ConnectorManager);
Connector conn2_sqToRound4 = GetSecondaryConnector(pt_sqToRound4.ConnectorManager);
SizeAlignCoupleConnect(conn1_sqToRound4, conn1_rectTee1, 0);
SetDimValue(pt_sqToRound4, "Length", 1.0 + (8.5 / 12.0)); // set length dimension to 1' 8 1/2" (converted to feet)
SetDimValue(pt_sqToRound4, "Diameter", 1.0); // set diameter dimension to 1'
// add a 10' long tube
FabricationPart pt_tube9 = CreateStraightPart(bt_tube, 0, levelOne.Id, 10.0);
Connector conn1_tube9 = GetPrimaryConnector(pt_tube9.ConnectorManager);
Connector conn2_tube9 = GetSecondaryConnector(pt_tube9.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube9, conn2_sqToRound4, 0);
//add one hangers in middle of tube9, by default button condition
FabricationPart.CreateHanger(m_doc, bt_hangerRound, pt_tube9.Id, conn1_tube9, 5.0, true);
// add a curved boot to the tube 3/4 way along, reducing to 10"
FabricationPart pt_curvedBoot2 = FabricationPart.Create(m_doc, bt_curvedBoot, 0, levelOne.Id);
Parameter prodEntry_curvedBoot2 = pt_curvedBoot2.get_Parameter(BuiltInParameter.FABRICATION_PRODUCT_ENTRY);
prodEntry_curvedBoot2.Set("12''x8''");
Connector conn1_curvedBoot2 = GetPrimaryConnector(pt_curvedBoot2.ConnectorManager);
Connector conn2_curvedBoot2 = GetSecondaryConnector(pt_curvedBoot2.ConnectorManager);
FabricationPart.PlaceAsTap(m_doc, conn1_curvedBoot2, conn1_tube9, 7.5, Math.PI, 0);
// add 8' 1" long tube to the curved boot
double length_tube10 = 8.0 + (1.0 / 12.0);
FabricationPart pt_tube10 = CreateStraightPart(bt_tube, 0, levelOne.Id, length_tube10);
Connector conn1_tube10 = GetPrimaryConnector(pt_tube10.ConnectorManager);
Connector conn2_tube10 = GetSecondaryConnector(pt_tube10.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube10, conn2_curvedBoot2, 0);
//add one hangers in middle of tube10, by default button condition
FabricationPart.CreateHanger(m_doc, bt_hangerRound, pt_tube10.Id, conn1_tube10, length_tube10 / 2, true);
// add a 45 degree bend
FabricationPart pt_45Bend3 = FabricationPart.Create(m_doc, bt_45bend, 0, levelOne.Id);
Connector conn1_45Bend3 = GetPrimaryConnector(pt_45Bend3.ConnectorManager);
Connector conn2_45Bend3 = GetSecondaryConnector(pt_45Bend3.ConnectorManager);
SizeAlignCoupleConnect(conn1_45Bend3, conn2_tube10, 0);
// add 20' long tube
FabricationPart pt_tube11 = CreateStraightPart(bt_tube, 0, levelOne.Id, 20.0);
Connector conn1_tube11 = GetPrimaryConnector(pt_tube11.ConnectorManager);
Connector conn2_tube11 = GetSecondaryConnector(pt_tube11.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube11, conn2_45Bend3, 0);
// add a 45 degree bend
FabricationPart pt_45Bend4 = FabricationPart.Create(m_doc, bt_45bend, 0, levelOne.Id);
Connector conn1_45Bend4 = GetPrimaryConnector(pt_45Bend4.ConnectorManager);
Connector conn2_45Bend4 = GetSecondaryConnector(pt_45Bend4.ConnectorManager);
SizeAlignCoupleConnect(conn1_45Bend4, conn2_tube11, 0);
// add 1' 8" long tube
FabricationPart pt_tube12 = CreateStraightPart(bt_tube, 0, levelOne.Id, 1.0 + (8.0 / 12.0));
Connector conn1_tube12 = GetPrimaryConnector(pt_tube12.ConnectorManager);
Connector conn2_tube12 = GetSecondaryConnector(pt_tube12.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube12, conn2_45Bend4, 0);
// add a reducer (to 10") on the tube with the curved boot (pt_tube12)
FabricationPart pt_reducer2 = FabricationPart.Create(m_doc, bt_reducer, 0, levelOne.Id);
Connector conn1_reducer2 = GetPrimaryConnector(pt_reducer2.ConnectorManager);
Connector conn2_reducer2 = GetSecondaryConnector(pt_reducer2.ConnectorManager);
SizeAlignCoupleConnect(conn1_reducer2, conn2_tube9, 0);
Parameter prodEntry_reducer2 = pt_reducer2.get_Parameter(BuiltInParameter.FABRICATION_PRODUCT_ENTRY);
prodEntry_reducer2.Set("12''x10''");
// add a 10' long tube
FabricationPart pt_tube13 = CreateStraightPart(bt_tube, 0, levelOne.Id, 10.0);
Connector conn1_tube13 = GetPrimaryConnector(pt_tube13.ConnectorManager);
Connector conn2_tube13 = GetSecondaryConnector(pt_tube13.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube13, conn2_reducer2, 0);
//add one hangers for tube13, by default button condition
FabricationPart.CreateHanger(m_doc, bt_hangerRound, pt_tube13.Id, conn1_tube13, 5.0, true);
// add a 90 bend, going 45 degrees down
FabricationPart pt_90bend4 = FabricationPart.Create(m_doc, bt_90bend, 0, levelOne.Id);
Connector conn1_90bend4 = GetPrimaryConnector(pt_90bend4.ConnectorManager);
Connector conn2_90bend4 = GetSecondaryConnector(pt_90bend4.ConnectorManager);
SizeAlignCoupleConnect(conn1_90bend4, conn2_tube13, 3.0 * Math.PI / 4.0);
// add a 1' 2.5" long tube
FabricationPart pt_tube14 = CreateStraightPart(bt_tube, 0, levelOne.Id, 1.0 + (2.5 / 12.0));
Connector conn1_tube14 = GetPrimaryConnector(pt_tube14.ConnectorManager);
Connector conn2_tube14 = GetSecondaryConnector(pt_tube14.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube14, conn2_90bend4, 0);
// add a 45 bend
FabricationPart pt_45bend5 = FabricationPart.Create(m_doc, bt_45bend, 0, levelOne.Id);
Connector conn1_45bend5 = GetPrimaryConnector(pt_45bend5.ConnectorManager);
Connector conn2_45bend5 = GetSecondaryConnector(pt_45bend5.ConnectorManager);
SizeAlignCoupleConnect(conn1_45bend5, conn2_tube14, Math.PI / 2.0);
// add a 20' long tube
FabricationPart pt_tube15 = CreateStraightPart(bt_tube, 0, levelOne.Id, 20.0);
Connector conn1_tube15 = GetPrimaryConnector(pt_tube15.ConnectorManager);
Connector conn2_tube15 = GetSecondaryConnector(pt_tube15.ConnectorManager);
SizeAlignCoupleConnect(conn1_tube15, conn2_45bend5, 0);
//add 4 hangers for tube15, by default button condition
for (int i = 0; i < 4; i++)
{
FabricationPart.CreateHanger(m_doc, bt_hangerRound, pt_tube15.Id, conn1_tube15, (i + 1) * (20.0 / 5), true);
}
// now let's place a 6" valve by its insertion point in free space
FabricationPart pt_valve1 = FabricationPart.Create(m_doc, bt_valve, 1, levelOne.Id);
Parameter prodEntry_pt_valve1 = pt_valve1.get_Parameter(BuiltInParameter.FABRICATION_PRODUCT_ENTRY);
prodEntry_pt_valve1.Set("6''");
FabricationPart.AlignPartByInsertionPoint(m_doc, pt_valve1.Id, new XYZ(16, -10, 0), 0, 0, 0, FabricationPartJustification.Middle, null);
m_doc.Regenerate();
Connector conn2_valve1 = GetSecondaryConnector(pt_valve1.ConnectorManager);
// add 10' copper pipe to the valve
FabricationPart pt_pipe1 = CreateStraightPart(bt_groovedPipe, 0, levelOne.Id, 10.0);
Connector conn1_pipe1 = GetPrimaryConnector(pt_pipe1.ConnectorManager);
Connector conn2_pipe1 = GetSecondaryConnector(pt_pipe1.ConnectorManager);
SizeAlignSlopeJustifyCoupleConnect(conn1_pipe1, conn2_valve1, 0, 0, FabricationPartJustification.Middle);
// insert a valve into the middle of the copper pipe - it will size automatically
XYZ pipe1_pos = (conn1_pipe1.Origin + conn2_pipe1.Origin) / 2.0;
FabricationPart pt_valve2 = FabricationPart.Create(m_doc, bt_valve, 1, levelOne.Id);
FabricationPart.AlignPartByInsertionPointAndCutInToStraight(m_doc, pt_pipe1.Id, pt_valve2.Id, pipe1_pos, Math.PI / 2.0, 0, false);
m_doc.Regenerate();
// add a 90 elbow and slope it
FabricationPart pt_90elbow1 = FabricationPart.Create(m_doc, bt_90elbow, 0, levelOne.Id);
Connector conn1_90elbow1 = GetPrimaryConnector(pt_90elbow1.ConnectorManager);
Connector conn2_90elbow1 = GetSecondaryConnector(pt_90elbow1.ConnectorManager);
SizeAlignSlopeJustifyCoupleConnect(conn1_90elbow1, conn2_pipe1, Math.PI, 0.02, FabricationPartJustification.Middle);
// add a copper pipe
FabricationPart pt_pipe2 = CreateStraightPart(bt_groovedPipe, 0, levelOne.Id, 10.0);
Connector conn1_pipe2 = GetPrimaryConnector(pt_pipe2.ConnectorManager);
Connector conn2_pipe2 = GetSecondaryConnector(pt_pipe2.ConnectorManager);
SizeAlignSlopeJustifyCoupleConnect(conn1_pipe2, conn2_90elbow1, 0, 0, FabricationPartJustification.Middle);
tr.Commit();
}
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
return Result.Succeeded;
}
/// <summary>
/// Convenience method to get fabrication part's dimension value, specified by the dimension name.
/// </summary>
/// <param name="part">
/// The fabrication part to be queried.
/// </param>
/// <param name="dimName">
/// The name of the fabrication dimension.
/// </param>
/// <returns>
/// Returns the fabrication dimension value for the fabrication part, as specified by the dimension name.
/// </returns>
double GetDimValue(FabricationPart part, string dimName)
{
double value = 0;
if (part != null)
{
IList<FabricationDimensionDefinition> dims = part.GetDimensions();
foreach (FabricationDimensionDefinition def in dims)
{
if (def.Name.Equals(dimName))
{
value = part.GetDimensionValue(def);
break;
}
}
}
return value;
}
/// <summary>
/// Convenience method to set fabrication part's dimension value, specified by the dimension name.
/// </summary>
/// <param name="part">
/// The fabrication part.
/// </param>
/// <param name="dimName">
/// The name of the fabrication dimension.
/// </param>
/// <param name="dimValue">
/// The value of the fabrication dimension to set to.
/// </param>
/// <returns>
/// Returns the fabrication dimension value for the fabrication part, as specified by the dimension name.
/// </returns>
bool SetDimValue(FabricationPart part, string dimName, double dimValue)
{
IList<FabricationDimensionDefinition> dims = part.GetDimensions();
FabricationDimensionDefinition dim = null;
foreach (FabricationDimensionDefinition def in dims)
{
if (def.Name.Equals(dimName))
{
dim = def;
break;
}
}
if (dim == null)
return false;
part.SetDimensionValue(dim, dimValue);
m_doc.Regenerate();
return true;
}
/// <summary>
/// Convenience method to automatically size, align, couple (if needed) and connect two fabrication part
/// by the specified connectors.
/// </summary>
/// <param name="conn_from">
/// The connector to align by of the fabrication part to move.
/// </param>
/// <param name="conn_to">
/// The connector to align to.
/// </param>
/// <param name="rotation">
/// Rotation around the direction of connection - angle between width vectors in radians.
/// </param>
/// <returns>
/// Returns the fabrication dimension value for the fabrication part, as specified by the dimension name.
/// </returns>
void SizeAlignCoupleConnect(Connector conn_from, Connector conn_to, double rotation)
{
if (conn_from.Shape == ConnectorProfileType.Rectangular || conn_from.Shape == ConnectorProfileType.Oval)
{
conn_from.Height = conn_to.Height;
conn_from.Width = conn_to.Width;
}
else
{
conn_from.Radius = conn_to.Radius;
}
m_doc.Regenerate();
FabricationPart.AlignPartByConnectors(m_doc, conn_from, conn_to, rotation);
m_doc.Regenerate();
FabricationPart.ConnectAndCouple(m_doc, conn_from, conn_to);
m_doc.Regenerate();
}
/// <summary>
/// Convenience method to automatically size, align, slope, justification couple (if needed) and connect two fabrication parts
/// by the specified connectors.
/// </summary>
/// <param name="conn_from">
/// The connector to align by of the fabrication part to move.
/// </param>
/// <param name="conn_to">
/// The connector to align to.
/// </param>
/// <param name="rotation">
/// Rotation around the direction of connection - angle between width vectors in radians.
/// </param>
/// <param name="slope">
/// The slope value to flex to match if possible in fractional units (eg.1/50). Positive values are up, negative are down. Slopes can only be applied
/// to fittings, whilst straights will inherit the slope from the piece it is connecting to.
/// </param>
/// <param name="justification">
/// The justification to align eccentric parts.
/// </param>
/// <returns>
/// Returns the fabrication dimension value for the fabrication part, as specified by the dimension name.
/// </returns>
void SizeAlignSlopeJustifyCoupleConnect(Connector conn_from, Connector conn_to, double rotation, double slope, FabricationPartJustification justification)
{
if (conn_from.Shape == ConnectorProfileType.Rectangular || conn_from.Shape == ConnectorProfileType.Oval)
{
conn_from.Height = conn_to.Height;
conn_from.Width = conn_to.Width;
}
else
{
conn_from.Radius = conn_to.Radius;
}
m_doc.Regenerate();
FabricationPart.AlignPartByConnectorToConnector(m_doc, conn_from, conn_to, rotation, slope, justification);
m_doc.Regenerate();
FabricationPart.ConnectAndCouple(m_doc, conn_from, conn_to);
m_doc.Regenerate();
}
/// <summary>
/// Convenience method to locate a fabrication service button specified by group and name.
/// </summary>
/// <param name="service">
/// The fabrication service.
/// </param>
/// <param name="group">
/// The fabrication service group index.
/// </param>
/// <param name="name">
/// The fabrication service button name.
/// </param>
/// <returns>
/// Returns the fabrication service button as specified by the fabrication service, group and name.
/// </returns>
FabricationServiceButton locateButton(FabricationService service, int group, string name)
{
FabricationServiceButton button = null;
if (service != null && group >= 0 && group < service.GroupCount)
{
int buttonCount = service.GetButtonCount(group);
for (int i = 0; button == null && i < buttonCount; i++)
{
FabricationServiceButton bt = service.GetButton(group, i);
if (bt != null && bt.Name.Equals(name))
button = bt;
}
}
return button;
}
/// <summary>
/// Convenience method to create a straight fabrication part.
/// </summary>
/// <param name="fsb">
/// The FabricationServiceButton used to create the fabrication part from.
/// </param>
/// <param name="condition">
/// The condition index of the fabrication service button.
/// </param>
/// <param name="levelId">
/// The element identifier belonging to the level on which to create this fabrication part.
/// </param>
/// <param name="length">
/// The length, in feet, of the fabrication part to be created.
/// </param>
/// <returns>
/// Returns a straight fabrication part, as specified by the fabrication service button, condition, level id and length.
/// </returns>
FabricationPart CreateStraightPart(FabricationServiceButton fsb, int condition, ElementId levelId, double length)
{
FabricationPart straight = FabricationPart.Create(m_doc, fsb, condition, levelId);
Parameter length_option = straight.LookupParameter("Length Option");
length_option.Set("Value");
Parameter lengthParam = straight.LookupParameter("Length");
lengthParam.Set(length);
m_doc.Regenerate();
return straight;
}
/// <summary>
/// Convenience method to get the primary connector from the specified connector manager.
/// </summary>
/// <param name="cm">
/// The connector manager.
/// </param>
/// <returns>
/// Returns the primary connector from the connector manager.
/// </returns>
Connector GetPrimaryConnector(ConnectorManager cm)
{
foreach (Connector cn in cm.Connectors)
{
MEPConnectorInfo info = cn.GetMEPConnectorInfo();
if (info.IsPrimary)
return cn;
}
return null;
}
/// <summary>
/// Convenience method to get the secondary connector from the specified connector manager.
/// </summary>
/// <param name="cm">
/// The connector manager.
/// </param>
/// <returns>
/// Returns the secondary connector from the connector manager.
/// </returns>
Connector GetSecondaryConnector(ConnectorManager cm)
{
foreach (Connector cn in cm.Connectors)
{
MEPConnectorInfo info = cn.GetMEPConnectorInfo();
if (info.IsSecondary)
return cn;
}
return null;
}
/// <summary>
/// Convenience method to get the first non-primary and non-secondary connector from the specified connector manager.
/// </summary>
/// <param name="cm">
/// The connector manager.
/// </param>
/// <returns>
/// Returns the first non-primary and non-secondary connector from the connector manager.
/// </returns>
Connector GetFirstNonPrimaryOrSecondaryConnector(ConnectorManager cm)
{
foreach (Connector cn in cm.Connectors)
{
MEPConnectorInfo info = cn.GetMEPConnectorInfo();
if (!info.IsPrimary && !info.IsSecondary)
return cn;
}
return null;
}
/// <summary>
/// Convenience method to get all fabrication material identifiers from the
/// specified fabrication configuration.
/// </summary>
/// <param name="config">
/// The fabrication configuration.
/// </param>
/// <returns>
/// Returns a list of all the fabrication material identifiers for this
/// fabrication configuration.
/// </returns>
void GetMaterials(FabricationConfiguration config)
{
m_materialIds = config.GetAllMaterials(null);
m_materialGroups = new List<string>();
m_materialNames = new List<string>();
for (int i = 0; i < m_materialIds.Count; i++)
{
m_materialGroups.Add(config.GetMaterialGroup(m_materialIds[i]));
m_materialNames.Add(config.GetMaterialName(m_materialIds[i]));
}
}
/// <summary>
/// Convenience method to get all fabrication specification identifiers from the
/// specified fabrication configuration.
/// </summary>
/// <param name="config">
/// The fabrication configuration.
/// </param>
/// <returns>
/// Returns a list of all the fabrication specification identifiers for this
/// fabrication configuration.
/// </returns>
void GetSpecs(FabricationConfiguration config)
{
m_specIds = config.GetAllSpecifications(null);
m_specGroups = new List<string>();
m_specNames = new List<string>();
for (int i = 0; i < m_specIds.Count; i++)
{
m_specGroups.Add(config.GetSpecificationGroup(m_specIds[i]));
m_specNames.Add(config.GetSpecificationName(m_specIds[i]));
}
}
/// <summary>
/// Convenience method to get all fabrication insulation specification identifiers from the
/// specified fabrication configuration.
/// </summary>
/// <param name="config">
/// The fabrication configuration.
/// </param>
/// <returns>
/// Returns a list of all the fabrication insulation specification identifiers for this
/// fabrication configuration.
/// </returns>
void GetInsulationSpecs(FabricationConfiguration config)
{
m_insSpecIds = config.GetAllInsulationSpecifications(null);
m_insSpecGroups = new List<string>();
m_insSpecNames = new List<string>();
for (int i = 0; i < m_insSpecIds.Count; i++)
{
m_insSpecGroups.Add(config.GetInsulationSpecificationGroup(m_insSpecIds[i]));
m_insSpecNames.Add(config.GetInsulationSpecificationName(m_insSpecIds[i]));
}
}
/// <summary>
/// Convenience method to get all fabrication connector identifiers from the
/// specified fabrication configuration.
/// </summary>
/// <param name="config">
/// The fabrication configuration.
/// </param>
/// <returns>
/// Returns a list of all the fabrication connector identifiers for this
/// fabrication configuration.
/// </returns>
void GetFabricationConnectors(FabricationConfiguration config)
{
m_connIds = config.GetAllFabricationConnectorDefinitions(ConnectorDomainType.Undefined, ConnectorProfileType.Invalid);
m_connGroups = new List<string>();
m_connNames = new List<string>();
for (int i = 0; i < m_connIds.Count; i++)
{
m_connGroups.Add(config.GetFabricationConnectorGroup(m_connIds[i]));
m_connNames.Add(config.GetFabricationConnectorName(m_connIds[i]));
}
}
}
}
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.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>{806D4F74-F72D-40C2-BA7F-4DF99980D601}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.FabricationPartLayout.CS</RootNamespace>
<AssemblyName>FabricationPartLayout</AssemblyName>
<StartupObject>
</StartupObject>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<TargetFrameworkProfile />
</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\FabricationPartLayout.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>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Release\FabricationPartLayout.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>bin\x64\Debug\FabricationPartLayout.XML</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\x64\Release\FabricationPartLayout.XML</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</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>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ChangeService.cs" />
<Compile Include="ExportToMAJ.cs" />
<Compile Include="FabPartGeometry.cs" />
<Compile Include="ItemFile.cs" />
<Compile Include="SplitStraight.cs" />
<Compile Include="PartRenumber.cs" />
<Compile Include="HangerRods.cs" />
<Compile Include="PartInfo.cs" />
<Compile Include="ExportToPCF.cs" />
<Compile Include="CustomData.cs" />
<Compile Include="Ancillaries.cs" />
<Compile Include="ButtonGroupExclusions.cs" />
<Compile Include="ConvertToFabrication.cs" />
<Compile Include="FabricationPartLayout.cs" />
<Compile Include="OptimizeStraights.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StretchAndFit.cs" />
</ItemGroup>
<Import Project="$(SolutionDir)VSProps\SDKSamples.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,387 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using System.Windows.Forms;
using Autodesk.Revit.UI.Selection;
namespace Revit.SDK.Samples.FabricationPartLayout.CS
{
#region Detach Rods
/// <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)]
public class DetachRods : 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)
{
try
{
// check user selection
var uiDoc = commandData.Application.ActiveUIDocument;
var doc = uiDoc.Document;
Reference refObj = uiDoc.Selection.PickObject(ObjectType.Element, "Pick a fabrication part hanger to start.");
var part = doc.GetElement(refObj) as FabricationPart;
if (part == null || part.IsAHanger() == false)
{
message = "The selected element is not a fabrication part hanger.";
return Result.Failed;
}
var rodInfo = part.GetRodInfo();
using (var trans = new Transaction(doc, "Detach Rods"))
{
trans.Start();
rodInfo.CanRodsBeHosted = false;
trans.Commit();
}
message = "Detach successful";
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
#endregion
#region Increase Rod Length (x2)
/// <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)]
public class DoubleRodLength : 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)
{
try
{
// check user selection
var uiDoc = commandData.Application.ActiveUIDocument;
var doc = uiDoc.Document;
Reference refObj = uiDoc.Selection.PickObject(ObjectType.Element, "Pick a fabrication part hanger to start.");
var part = doc.GetElement(refObj) as FabricationPart;
if (part == null || part.IsAHanger() == false)
{
message = "The selected element is not a fabrication part hanger.";
return Result.Failed;
}
var rodInfo = part.GetRodInfo();
if (rodInfo.IsAttachedToStructure == true)
{
message = "The hanger rods must be detached from their host first";
return Result.Failed;
}
using (var trans = new Transaction(doc, "Double Rod Length"))
{
trans.Start();
for (int i = 0; i < rodInfo.RodCount; i++)
{
var originalLength = rodInfo.GetRodLength(i);
rodInfo.SetRodLength(i, originalLength * 2.0);
}
trans.Commit();
}
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
#endregion
#region Decrease Rod Length (x2)
/// <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)]
public class HalveRodLength : 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)
{
try
{
// check user selection
var uiDoc = commandData.Application.ActiveUIDocument;
var doc = uiDoc.Document;
Reference refObj = uiDoc.Selection.PickObject(ObjectType.Element, "Pick a fabrication part hanger to start.");
var part = doc.GetElement(refObj) as FabricationPart;
if (part == null || part.IsAHanger() == false)
{
message = "The selected element is not a fabrication part hanger.";
return Result.Failed;
}
var rodInfo = part.GetRodInfo();
if (rodInfo.IsAttachedToStructure == true)
{
message = "The hanger rods must be detached from their host first";
return Result.Failed;
}
using (var trans = new Transaction(doc, "Halve Rod Length"))
{
trans.Start();
for (int i = 0; i < rodInfo.RodCount; i++)
{
var originalLength = rodInfo.GetRodLength(i);
rodInfo.SetRodLength(i, originalLength / 2.0);
}
trans.Commit();
}
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
#endregion
#region Increase Rod Strcuture Extension (by 1ft)
/// <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)]
public class IncreaseRodStructureExtension : 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)
{
try
{
// check user selection
var uiDoc = commandData.Application.ActiveUIDocument;
var doc = uiDoc.Document;
Reference refObj = uiDoc.Selection.PickObject(ObjectType.Element, "Pick a fabrication part hanger to start.");
var part = doc.GetElement(refObj) as FabricationPart;
if (part == null || part.IsAHanger() == false)
{
message = "The selected element is not a fabrication part hanger.";
return Result.Failed;
}
var rodInfo = part.GetRodInfo();
if (rodInfo.IsAttachedToStructure == false)
{
message = "The hanger rods must be attached to structure.";
return Result.Failed;
}
using (var trans = new Transaction(doc, "Increase Rod Structure Extension"))
{
trans.Start();
for (int i = 0; i < rodInfo.RodCount; i++)
{
var originalExtension = rodInfo.GetRodStructureExtension(i);
rodInfo.SetRodStructureExtension(i, originalExtension + 1.0);
}
trans.Commit();
}
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
#endregion
#region Decrease Rod Strcuture Extension (by 1ft)
/// <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)]
public class DecreaseRodStructureExtension : 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)
{
try
{
// check user selection
var uiDoc = commandData.Application.ActiveUIDocument;
var doc = uiDoc.Document;
Reference refObj = uiDoc.Selection.PickObject(ObjectType.Element, "Pick a fabrication part hanger to start.");
var part = doc.GetElement(refObj) as FabricationPart;
if (part == null || part.IsAHanger() == false)
{
message = "The selected element is not a fabrication part hanger.";
return Result.Failed;
}
var rodInfo = part.GetRodInfo();
if (rodInfo.IsAttachedToStructure == false)
{
message = "The hanger rods must be attached to structure.";
return Result.Failed;
}
using (var trans = new Transaction(doc, "Increase Rod Structure Extension"))
{
trans.Start();
for (int i = 0; i < rodInfo.RodCount; i++)
{
var originalExtension = rodInfo.GetRodStructureExtension(i);
rodInfo.SetRodStructureExtension(i, originalExtension - 1.0);
}
trans.Commit();
}
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
#endregion
}
@@ -0,0 +1,265 @@
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class LoadAndPlaceNextItemFile : 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)
{
try
{
var uiDoc = commandData.Application.ActiveUIDocument;
var doc = uiDoc.Document;
FilteredElementCollector cl = new FilteredElementCollector(doc);
cl.OfClass(typeof(Level));
IList<Element> levels = cl.ToElements();
Level levelOne = null;
foreach (Level level in levels)
{
if (level != null && level.Name.Equals("Level 1"))
{
levelOne = level;
break;
}
}
if (levelOne == null)
return Result.Failed;
using (var config = FabricationConfiguration.GetFabricationConfiguration(doc))
{
if (config == null)
{
message = "No fabrication configuration in use";
return Result.Failed;
}
using (var configInfo = config.GetFabricationConfigurationInfo())
{
using (var source = FabricationConfigurationInfo.FindSourceFabricationConfiguration(configInfo))
{
if (source == null)
{
message = "Source fabrication configuration not found";
return Result.Failed;
}
using (var trans = new Autodesk.Revit.DB.Transaction(doc, "Load And Place Next Item File"))
{
trans.Start();
// reload the configuration
config.ReloadConfiguration();
// get the item folders
var itemFolders = config.GetItemFolders();
// get the next unloaded item file from the item folders structure
var nextFile = GetNextUnloadedItemFile(itemFolders);
if (nextFile == null)
{
message = "Could not locate the next unloaded item file";
return Result.Failed;
}
var itemFilesToLoad = new List<FabricationItemFile>();
itemFilesToLoad.Add(nextFile);
// load the item file into the config
var failedItems = config.LoadItemFiles(itemFilesToLoad);
if (failedItems != null && failedItems.Count > 0)
{
message = "Could not load the item file: " + nextFile.Identifier;
return Result.Failed;
}
// create a part from the item file
using (var part = FabricationPart.Create(doc, nextFile, levelOne.Id))
{
doc.Regenerate();
var selectedElements = new List<ElementId>() { part.Id };
uiDoc.Selection.SetElementIds(selectedElements);
uiDoc.ShowElements(selectedElements);
trans.Commit();
}
}
}
}
}
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
private FabricationItemFile GetNextUnloadedItemFile(IList<FabricationItemFolder> itemFolders)
{
if (itemFolders == null)
return null;
foreach (var folder in itemFolders)
{
var file = GetNextUnloadedItemFileRecursive(folder);
if (file != null)
return file;
}
return null;
}
private FabricationItemFile GetNextUnloadedItemFileRecursive(FabricationItemFolder folder)
{
if (folder == null)
return null;
var files = folder.GetItemFiles();
if (files != null && files.Count > 0)
{
foreach (var file in files)
{
if (file != null && file.IsLoaded() == false && file.IsValid() == true)
return file;
}
}
var subFolders = folder.GetSubFolders();
if (subFolders != null && subFolders.Count > 0)
{
foreach (var subFolder in subFolders)
{
var file = GetNextUnloadedItemFileRecursive(subFolder);
if (file != null)
return file;
}
}
return null;
}
}
/// <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)]
public class UnloadUnusedItemFiles : 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)
{
try
{
var uiDoc = commandData.Application.ActiveUIDocument;
var doc = uiDoc.Document;
using (var config = FabricationConfiguration.GetFabricationConfiguration(doc))
{
if (config == null)
{
message = "No fabrication configuration in use";
return Result.Failed;
}
using (var trans = new Transaction(doc, "Unload unused item files"))
{
trans.Start();
config.ReloadConfiguration();
var loadedFiles = config.GetAllLoadedItemFiles();
var unusedFiles = loadedFiles.Where(x => x.IsUsed == false).ToList();
if (unusedFiles.Count == 0)
{
message = "No unuseed item files found";
return Result.Failed;
}
if (config.CanUnloadItemFiles(unusedFiles) == false)
{
message = "Cannot unload item files";
return Result.Failed;
}
config.UnloadItemFiles(unusedFiles);
trans.Commit();
var builder = new StringBuilder();
unusedFiles.ForEach(x => builder.AppendLine(System.IO.Path.GetFileNameWithoutExtension(x.Identifier)));
TaskDialog td = new TaskDialog("Unload Unused Item Files")
{
MainIcon = TaskDialogIcon.TaskDialogIconInformation,
TitleAutoPrefix = false,
MainInstruction = "The following item files were unloaded:",
MainContent = builder.ToString()
};
td.Show();
}
}
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
}
@@ -0,0 +1,108 @@
//
// (C) Copyright 2003-2011 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 System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class OptimizeStraights : 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)
{
try
{
Document doc = commandData.Application.ActiveUIDocument.Document;
// check user selection
UIDocument uidoc = commandData.Application.ActiveUIDocument;
ICollection<ElementId> collection = uidoc.Selection.GetElementIds();
if (collection.Count > 0)
{
ISet<ElementId> selIds = new HashSet<ElementId>();
foreach (ElementId id in collection)
selIds.Add(id);
using (Transaction tr = new Transaction(doc, "Optimize Straights"))
{
tr.Start();
// optimize lengths method will take a set of elements and any fabrication straight parts
// within this set that have been optimized will be returned.
ISet<ElementId> affectedPartIds = FabricationPart.OptimizeLengths(doc, selIds);
if (affectedPartIds.Count == 0)
{
message = "No fabrication straight parts were optimized.";
return Result.Cancelled;
}
doc.Regenerate();
tr.Commit();
}
return Result.Succeeded;
}
else
{
// inform user they need to select at least one element
message = "Please select at least one element.";
}
return Result.Failed;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
}
@@ -0,0 +1,160 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using System.Windows.Forms;
using Autodesk.Revit.UI.Selection;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class PartInfo : 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)
{
try
{
// check user selection
var uiDoc = commandData.Application.ActiveUIDocument;
var doc = uiDoc.Document;
Reference refObj = uiDoc.Selection.PickObject(ObjectType.Element, "Pick a fabrication part to start.");
var part = doc.GetElement(refObj) as FabricationPart;
if (part == null)
{
message = "The selected element is not a fabrication part.";
return Result.Failed;
}
var config = FabricationConfiguration.GetFabricationConfiguration(doc);
if (config == null)
{
message = "no valid fabrication configuration";
return Result.Failed;
}
var builder = new StringBuilder();
// alias
builder.AppendLine("Alias: " + part.Alias);
// cid
builder.AppendLine("CID: " + part.ItemCustomId.ToString());
// domain type
builder.AppendLine("Domain Type: " + part.DomainType.ToString());
// hanger rod kit
if (part.IsAHanger())
{
string rodKitName = "None";
var rodKit = part.HangerRodKit;
if (rodKit > 0)
rodKitName = config.GetAncillaryGroupName(part.HangerRodKit) + ": " + config.GetAncillaryName(part.HangerRodKit);
builder.AppendLine("Hanger Rod Kit: " + rodKitName);
}
// insulation specification
var insSpec = config.GetInsulationSpecificationGroup(part.InsulationSpecification)
+ ": " + config.GetInsulationSpecificationName(part.InsulationSpecification);
builder.AppendLine("Insulation Specification: " + insSpec);
// has no connections
builder.AppendLine("Has No Connections: " + part.HasNoConnections().ToString());
// item number
builder.AppendLine("Item Number: " + part.ItemNumber);
// material
var material = config.GetMaterialGroup(part.Material) + ": " + config.GetMaterialName(part.Material);
builder.AppendLine("Material: " + material);
// part guid
builder.AppendLine("Part Guid: " + part.PartGuid.ToString());
// part status
builder.AppendLine("Part Status: " + config.GetPartStatusDescription(part.PartStatus));
// product code
builder.AppendLine("Product Code: " + part.ProductCode);
// service
builder.AppendLine("Service Name: " + part.ServiceName);
// get the service type name
builder.AppendLine("Service Type: " + config.GetServiceTypeName(part.ServiceType));
// specification
var spec = config.GetSpecificationGroup(part.Specification) + ": " + config.GetSpecificationName(part.Specification);
builder.AppendLine("Specification: " + spec);
// centerline length
builder.AppendLine("Centerline Length: " + GetStringFromNumber(doc, part.CenterlineLength, UnitType.UT_Length));
TaskDialog.Show("Fabrication Part [" + part.Id.IntegerValue + "]", builder.ToString());
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
private string GetStringFromNumber(Document doc, double number, UnitType unitType)
{
return UnitFormatUtils.Format(doc.GetUnits(), unitType, number, true, false);
}
}
}
@@ -0,0 +1,214 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using System.Windows.Forms;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class PartRenumber : IExternalCommand
{
#region region Member Variables
private int m_ductNum = 1;
private int m_ductCouplingNum = 1;
private int m_pipeNum = 1;
private int m_pipeCouplingNum = 1;
private int m_hangerNum = 1;
private int m_otherNum = 1;
#endregion
/// <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)
{
try
{
// check user selection
var uidoc = commandData.Application.ActiveUIDocument;
var doc = uidoc.Document;
var collection = uidoc.Selection.GetElementIds();
using (var trans = new Transaction(doc, "Part Renumber"))
{
trans.Start();
var fabParts = new List<FabricationPart>();
foreach (var elementId in collection)
{
var part = doc.GetElement(elementId) as FabricationPart;
if (part != null)
{
part.ItemNumber = string.Empty; // wipe the item number
fabParts.Add(part);
}
}
if (fabParts.Count == 0)
{
message = "Select at least one fabrication part";
return Result.Failed;
}
// ignore certain fields
var ignoreFields = new List<FabricationPartCompareType>();
ignoreFields.Add(FabricationPartCompareType.Notes);
ignoreFields.Add(FabricationPartCompareType.OrderNo);
ignoreFields.Add(FabricationPartCompareType.Service);
for (int i = 0; i < fabParts.Count; i++)
{
var part1 = fabParts[i];
if (string.IsNullOrWhiteSpace(part1.ItemNumber))
{
// part has not already been checked
if (IsADuct(part1))
{
if (IsACoupling(part1))
part1.ItemNumber = "DUCT COUPLING: " + m_ductCouplingNum++;
else
part1.ItemNumber = "DUCT: " + m_ductNum++;
}
else if (IsAPipe(part1))
{
if (IsACoupling(part1))
part1.ItemNumber = "PIPE COUPLING: " + m_pipeCouplingNum++;
else
part1.ItemNumber = "PIPE: " + m_pipeNum++;
}
else if (part1.IsAHanger())
part1.ItemNumber = "HANGER: " + m_hangerNum++;
else
part1.ItemNumber = "MISC: " + m_otherNum++;
}
for (int j = i + 1; j < fabParts.Count; j++)
{
var part2 = fabParts[j];
if (string.IsNullOrWhiteSpace(part2.ItemNumber))
{
// part2 has not been checked
if (part1.IsSameAs(part2, ignoreFields))
{
// items are the same, so give them the same item number
part2.ItemNumber = part1.ItemNumber;
}
}
}
}
trans.Commit();
}
TaskDialog td = new TaskDialog("Fabrication Part Renumber")
{
MainIcon = TaskDialogIcon.TaskDialogIconInformation,
TitleAutoPrefix = false,
MainInstruction = "Renumber was successful",
AllowCancellation = false,
CommonButtons = TaskDialogCommonButtons.Ok
};
td.Show();
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
/// <summary>
/// Checks if the given part is fabrication ductwork.
/// </summary>
/// <param name="fabPart">The part to check.</param>
/// <returns>True if the part is fabrication ductwork.</returns>
private bool IsADuct(FabricationPart fabPart)
{
return (fabPart != null && (fabPart.Category.Id.IntegerValue == (int)BuiltInCategory.OST_FabricationDuctwork));
}
/// <summary>
/// Checks if the part is fabrication pipework.
/// </summary>
/// <param name="fabPart">The part to check.</param>
/// <returns>True if the part is fabrication pipework.</returns>
private bool IsAPipe(FabricationPart fabPart)
{
return (fabPart != null && (fabPart.Category.Id.IntegerValue == (int)BuiltInCategory.OST_FabricationPipework));
}
/// <summary>
/// Checks if the part is a coupling.
/// The CID's (the fabrication part item customer Id) that are recognized internally as couplings are:
/// CID 522, 1112 - Round Ductwork
/// CID 1522 - Oval Ductwork
/// CID 4522 - Rectangular Ductwork
/// CID 2522 - Pipe Work
/// CID 3522 - Electrical
/// </summary>
/// <param name="fabPart">The part to check.</param>
/// <returns>True if the part is a coupling.</returns>
private bool IsACoupling(FabricationPart fabPart)
{
if (fabPart != null)
{
int CID = fabPart.ItemCustomId;
if (CID == 522 || CID == 1522 || CID == 2522 || CID == 3522 || CID == 1112)
{
return true;
}
}
return false;
}
}
}
@@ -0,0 +1,55 @@
//
// (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 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("FabricationPartLayout")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Autodesk, Inc.")]
[assembly: AssemblyProduct("FabricationPartLayout")]
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2014")]
[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("2b22e4f2-1d70-4b55-b92f-46e3d84cf7f4")]
// 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,599 @@
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang2057\deflangfe2057\themelang2057\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;}
{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}{\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 \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
{\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;}{\f45\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f46\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\f48\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f49\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f50\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f51\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\f52\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f53\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f55\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f56\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
{\f58\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f59\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f60\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f61\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
{\f62\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f63\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f65\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f66\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;}
{\f68\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f69\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f70\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f71\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}
{\f72\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f73\fbidi \fmodern\fcharset163\fprq1 Courier New (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 \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}
{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (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\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;}{\*\defchp
\fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang2057\langfe2057\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp2057\langfenp2057 \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\sa200\sl276\slmult1
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang2057\langfe2057\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp2057\langfenp2057 \snext11 \ssemihidden \sunhideused
Normal Table;}}{\*\listtable{\list\listtemplateid8969746\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid134807553\'01\u-3913 ?;}{\levelnumbers;}
\f3\fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid134807555\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0
\fi-360\li1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid134807557\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0
\fi-360\li2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid134807553\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0
\fi-360\li2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid134807555\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li3600\lin3600 }
{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid134807557\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li4320\lin4320 }{\listlevel
\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid134807553\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc23
\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid134807555\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0
\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid134807557\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li6480\lin6480 }{\listname ;}\listid1738479593}}{\*\listoverridetable
{\listoverride\listid1738479593\listoverridecount0\ls1}}{\*\rsidtbl \rsid209042\rsid407606\rsid415015\rsid528149\rsid865349\rsid1406616\rsid1778093\rsid1910342\rsid2756951\rsid2776239\rsid2968039\rsid3281187\rsid3635896\rsid3964207\rsid4143973\rsid4609138
\rsid5314596\rsid5382710\rsid5714603\rsid6237820\rsid6388681\rsid6820573\rsid7210945\rsid8152043\rsid8349739\rsid8793892\rsid9528101\rsid9975018\rsid11171307\rsid11222366\rsid12941546\rsid14442722\rsid14892961\rsid14974353\rsid15368036\rsid16449612
\rsid16580866\rsid16595484}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Jaz Pearson}{\operator David Teale}{\creatim\yr2017\mo5\dy30\hr17\min26}
{\revtim\yr2018\mo5\dy2\hr11}{\version3}{\edmins4}{\nofpages1}{\nofwords1779}{\nofchars10141}{\nofcharsws11897}{\vern41}}{\*\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\viewkind5\viewscale120\rsidroot5714603 \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\lang2057\langfe2057\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp2057\langfenp2057 {\rtlch\fcs1
\ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5714603
\hich\af1\dbch\af31505\loch\f1 FabricationPartLayout}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 MEP\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 201}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14974353 \hich\af1\dbch\af31505\loch\f1 7}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739 .0\line }{\rtlch\fcs1 \ab\af1\afs20
\ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 201}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9528101
\hich\af1\dbch\af31505\loch\f1 6}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739 .0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11171307
\hich\af1\dbch\af31505\loch\f1 Medium}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 MEP\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739
\hich\af1\dbch\af31505\loch\f1 ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739
\hich\af1\dbch\af31505\loch\f1 Fabrication}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2776239 \hich\af1\dbch\af31505\loch\f1 Part}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0
\b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2776239 \hich\af1\dbch\af31505\loch\f1 \line }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid2776239
\hich\af1\dbch\af31505\loch\f1 This sample shows how to use the Fabrication Part API to create }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 a sample layout}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\kerning2\insrsid6820573 \hich\af1\dbch\af31505\loch\f1 and make modifications to fabrication data in the model. This}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 includes:
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid15368036 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls1\rin0\lin720\itap0\pararsid15368036 {
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 rectangular and round ductwork
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid15368036 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}\hich\af1\dbch\af31505\loch\f1 tap placement
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid2776239 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid2776239 \hich\af1\dbch\af31505\loch\f1 rotat}{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 ions
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid3635896 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid3635896 \hich\af1\dbch\af31505\loch\f1
straight optimizations}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid3635896 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid3635896 \hich\af1\dbch\af31505\loch\f1
connections to a g}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 eneric Revit family instance}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid8349739
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid15368036\charrsid15368036 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}\pard \ltrpar
\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls1\rin0\lin720\itap0\pararsid2756951 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036\charrsid15368036 \hich\af1\dbch\af31505\loch\f1 stretch fabrication part}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 fitting to a target element
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid15368036\charrsid15368036 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036\charrsid15368036
\hich\af1\dbch\af31505\loch\f1 converting design elements into fabrication parts}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid15368036
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid14974353 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid14974353 \hich\af1\dbch\af31505\loch\f1
renumbering the straight/coupling fabrication p\hich\af1\dbch\af31505\loch\f1 arts
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid6820573 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\ls1\rin0\lin720\itap0\pararsid6820573 {\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid6820573 \hich\af1\dbch\af31505\loch\f1 loading and unloading of }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid209042 \hich\af1\dbch\af31505\loch\f1 item files}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\kerning2\insrsid6820573
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid1406616 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid1406616 \hich\af1\dbch\af31505\loch\f1
exporting fabrication parts to PCF and MAJ
\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\kerning2\insrsid16449612 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 accessing
\hich\af1\dbch\af31505\loch\f1 f\hich\af1\dbch\af31505\loch\f1 abri\hich\af1\dbch\af31505\loch\f1 cation part mesh geometry.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\kerning2\insrsid16449612\charrsid6820573
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid2776239
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\insrsid2776239
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2776239\charrsid407606 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Connector
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid2776239 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2776239\charrsid407606 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.ConnectorSet}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2776239
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6388681 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Document
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid4143973 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4143973 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.ElementId
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14892961 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FabricationAncillaryUsage
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid14892961 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14892961\charrsid407606 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FabricationConfiguration
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FabricationDimensionDefinition}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14892961
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6820573 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FabricationItemFile
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid6820573 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6820573 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FabricationItemFolder
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid14892961 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14892961 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FabricationRodInfo}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\insrsid14892961\charrsid407606
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FabricationPart
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FabricationService
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FabricationServiceButton
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FamilyInstance
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Level
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.MEPConnectorInfo
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14892961 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Parameter
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid4143973 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14892961 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Fabrication.CustomDataType
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 Autodesk.Re\hich\af1\dbch\af31505\loch\f1 vit.DB.Fabrication.DesignToFabricationConverter
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid15368036 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15368036 \hich\af1\dbch\af31505\loch\f1
Autodesk.Revit.DB.Fabrication.DesignToFabricationConverterResult
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14892961 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Fabrication.FabricationAncillaryType
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Fabrication.FabricationAncillaryUsageType
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Fa\hich\af1\dbch\af31505\loch\f1 brication.FabricationPartCompareType
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Fabrication.FabricationPartFitResult
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Fabrication.FabricationPartRouteEnd
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14892961 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Fabrication.FabricationUtils
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid4143973 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4143973\charrsid407606 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.IExternalCommand}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6820573 \line }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4143973
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6820573\charrsid407606
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf2\insrsid2776239
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2057\langnp1036\insrsid8349739
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3635896\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 Fabricat\hich\af1\dbch\af31505\loch\f1 ionPartLayout}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 .cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 It contains the class }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3635896\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 FabricationPartLayout }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid3635896
\hich\af1\dbch\af31505\loch\f1 which inherits from interface IExternalCommand and implements the Execute method.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3635896\charrsid3635896 \hich\af1\dbch\af31505\loch\f1
This class shows the user how to create a sample layout containing fabrication parts.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid3635896 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3635896
\par \hich\af1\dbch\af31505\loch\f1 OptimizeStraights}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3635896\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 .cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid3635896 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3635896 \hich\af1\dbch\af31505\loch\f1 It contains the class OptimizeStraights
}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3635896\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 which inherits from interface IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3635896 \hich\af1\dbch\af31505\loch\f1 ss shows the user how to use the Optimize Lengths method based on a user selection.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722
\par \hich\af1\dbch\af31505\loch\f1 StretchAndFit.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 \hich\af1\dbch\af31505\loch\f1 It contains the class StretchAndFit}{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 which inherits from interface IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 \hich\af1\dbch\af31505\loch\f1 ss shows the user how to use the StretchAndFit method based on a user selection.
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid15368036 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 ConvertToFabrication}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 .cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid15368036 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 It contains the class Co
\hich\af1\dbch\af31505\loch\f1 nvertToFabrication}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036\charrsid3635896 \hich\af1\dbch\af31505\loch\f1
which inherits from interface IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036 \hich\af1\dbch\af31505\loch\f1
ss shows the user how to use the DesignToFabrication method based on a user selection.
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid5314596
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018 \hich\af1\dbch\af31505\loch\f1 PartRenumber}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid5314596 \hich\af1\dbch\af31505\loch\f1 .cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid5314596 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid5314596 \hich\af1\dbch\af31505\loch\f1 It contains the class }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018 \hich\af1\dbch\af31505\loch\f1 PartRenumber}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid5314596 \hich\af1\dbch\af31505\loch\f1
which inherits from interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid5314596\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid5314596 \hich\af1\dbch\af31505\loch\f1 ss shows the user how to use the FabricationPart.ItemNumber and }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018
\hich\af1\dbch\af31505\loch\f1 renumber a selection of parts, and using the Fabrication.IsSameAs method.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid5314596
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid9975018 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018\charrsid9975018 \hich\af1\dbch\af31505\loch\f1 ButtonGroupExclusions}{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018 \hich\af1\dbch\af31505\loch\f1 .cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid9975018 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018 \hich\af1\dbch\af31505\loch\f1 I\hich\af1\dbch\af31505\loch\f1
t contains the class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018\charrsid9975018 \hich\af1\dbch\af31505\loch\f1 ButtonGroupExclusions}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018 \hich\af1\dbch\af31505\loch\f1 which inherits from interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018\charrsid3635896
\hich\af1\dbch\af31505\loch\f1 IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018 \hich\af1\dbch\af31505\loch\f1 ss shows the user how to override the }{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 default fabrication service group and button exclusions for routing operations.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892\charrsid8793892 \hich\af1\dbch\af31505\loch\f1 Ancillaries}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 .cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 It contains the class }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892\charrsid8793892 \hich\af1\dbch\af31505\loch\f1 Ancillaries}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892
\hich\af1\dbch\af31505\loch\f1 which inherits from interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892\charrsid3635896 \hich\af1\dbch\af31505\loch\f1
IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1
ss shows the user how to obtain the ancillary information for a selected fabrication part.
\par
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 CustomData.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 It contains
\hich\af1\dbch\af31505\loch\f1 the classes GetCustomData and SetCustomData which inherit from the interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892\charrsid3635896 \hich\af1\dbch\af31505\loch\f1
IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1
ss shows the user how to obtain the ancillary information for a selected fabrication part. The GetCustomData class sho\hich\af1\dbch\af31505\loch\f1
ws a user how to obtain fabrication custom data on a fabrication part, whilst the SetCustomData class shows a user how to set fabrication custom data.
\par
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 ExportToPCF.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1
It contains the class ExportToPCF which inherits from interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 IExternalCommand and impl
\hich\af1\dbch\af31505\loch\f1 ements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1
ss shows the user how to export a selection of fabrication parts to a PCF file.
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid16449612 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 FabPartGeometry}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 .cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid16449612 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 It contains the class
\hich\af1\dbch\af31505\loch\f1 FabPartGeometry}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 which inherits from interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612\charrsid3635896
\hich\af1\dbch\af31505\loch\f1 IExternalCommand and impl\hich\af1\dbch\af31505\loch\f1 ements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1
ss shows the user how to }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 access fab\hich\af1\dbch\af31505\loch\f1 rication part mesh geo\hich\af1\dbch\af31505\loch\f1 metry.
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid9975018 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 PartInfo.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1
It contains the class PartInfo which inherits from interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892\charrsid3635896 \hich\af1\dbch\af31505\loch\f1
IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 ss show\hich\af1\dbch\af31505\loch\f1
s the user how to get a variety of fabrication part properties.
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid9975018 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 HangerRods.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid8793892 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573 \hich\af1\dbch\af31505\loch\f1 It contains the classes}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1
DetachRods, DoubleRodLength, HalveRodLength, IncreaseRodStructureExtension and DecreaseRodStructureExtension}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1 which inherit }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1 from }{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1 the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892 \hich\af1\dbch\af31505\loch\f1
interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892\charrsid3635896 \hich\af1\dbch\af31505\loch\f1 IExternalCommand and implements the Execute method. Th}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1
ese classes show a user how to detach hanger rods from their hosted structure, how to change the size of the rod lengths and also the size of the rod structure extensions.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8793892
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid415015 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1 SplitStraight.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid415015 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1 It contains
\hich\af1\dbch\af31505\loch\f1 the class SplitStraight which inherits from interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015\charrsid3635896 \hich\af1\dbch\af31505\loch\f1
IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1 ss shows the user how to split a straight into two segments.
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6820573 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573 \hich\af1\dbch\af31505\loch\f1 ItemFile.cs
\par \hich\af1\dbch\af31505\loch\f1 It contains the classes LoadAndPlaceNextItemFile and\hich\af1\dbch\af31505\loch\f1
UnloadUnusedItemFiles which inherit from the interface IExternalCommand and implements the Execute command. These classes show a user how to }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid209042
\hich\af1\dbch\af31505\loch\f1 load and unload fabrication item files}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573 \hich\af1\dbch\af31505\loch\f1 from within the configuration\hich\f1 \rquote \loch\f1
s item folders structure.
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1406616
\par \hich\af1\dbch\af31505\loch\f1 SaveAsFabricationJ\hich\af1\dbch\af31505\loch\f1 ob.cs
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1406616 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1406616 \hich\af1\dbch\af31505\loch\f1
It contains the class ExportToMAJ which inherits from interface }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1406616\charrsid3635896 \hich\af1\dbch\af31505\loch\f1
IExternalCommand and implements the Execute method. This cla}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1406616 \hich\af1\dbch\af31505\loch\f1
ss shows the user how to export a selection of fabrication parts to a MAJ file.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6820573 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1406616
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid415015 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid415015 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid415015
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid11222366 \hich\af1\dbch\af31505\loch\f1 This sample provides }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid11222366 \hich\af1\dbch\af31505\loch\f1 the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid11222366 \hich\af1\dbch\af31505\loch\f1
following functionalities.
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid11222366 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid407606 -\tab }{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid11222366\charrsid407606 \hich\af1\dbch\af31505\loch\f1 Creates a sample layout from fabrication parts}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid407606
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid11222366\charrsid407606 -\tab \hich\af1\dbch\af31505\loch\f1 Access fabrication configuration information
\par -\tab \hich\af1\dbch\af31505\loch\f1 Connects fabrication taps to fabrication straight parts
\par -\tab \hich\af1\dbch\af31505\loch\f1 Rotates fabrication parts about its connected end
\par -\tab \hich\af1\dbch\af31505\loch\f1 Modify specification
\par -\tab \hich\af1\dbch\af31505\loch\f1 Modify insulation specification
\par \hich\af1\dbch\af31505\loch\f1 - \tab Modify fabrication material
\par -\tab \hich\af1\dbch\af31505\loch\f1 Modify fabrication connector
\par -\tab \hich\af1\dbch\af31505\loch\f1 Place fabrication taps on fabrication straight parts}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid11222366
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1778093 \hich\af1\dbch\af31505\loch\f1 - }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \tab }{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1778093\charrsid407606 \hich\af1\dbch\af31505\loch\f1 Place fabrication }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1778093 \hich\af1\dbch\af31505\loch\f1
hangers}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1778093\charrsid407606 \hich\af1\dbch\af31505\loch\f1 on fabrication straight parts
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid9528101 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid11222366\charrsid407606 \hich\af1\dbch\af31505\loch\f1 Optimize the lengths \hich\af1\dbch\af31505\loch\f1 of fabrication straight parts based on user selection}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid11222366
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 -\tab \hich\af1\dbch\af31505\loch\f1 Stretch and fit a fabrication part to a target connector.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036
\par -\tab \hich\af1\dbch\af31505\loch\f1 Convert design elements into fabrication parts}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3281187
\par -\tab \hich\af1\dbch\af31505\loch\f1 Renumber }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid9975018 \hich\af1\dbch\af31505\loch\f1 a selection of fabrication parts}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015
\par -\tab \hich\af1\dbch\af31505\loch\f1 View ancillary data
\par -\tab \hich\af1\dbch\af31505\loch\f1 Set service group and button exclusions
\par -\tab \hich\af1\dbch\af31505\loch\f1 View and set part custom data
\par -\tab \hich\af1\dbch\af31505\loch\f1 Export a selection of fabrication parts to a PCF file
\par -\tab \hich\af1\dbch\af31505\loch\f1 View fabrication part data
\par -\tab \hich\af1\dbch\af31505\loch\f1 Adjust hanger rod lengths, structural extensions and detach from their structural hosts
\par -\tab \hich\af1\dbch\af31505\loch\f1 Split s\hich\af1\dbch\af31505\loch\f1 traights into two equal segments}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573
\par -\tab \hich\af1\dbch\af31505\loch\f1 Load and place additional parts
\par -\tab \hich\af1\dbch\af31505\loch\f1 Unload unused additional parts}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1406616
\par -\tab \hich\af1\dbch\af31505\loch\f1 Export a selection of fabrication parts to a MAJ file}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612
\par -\tab \hich\af1\dbch\af31505\loch\f1 Access fabrication part mesh geometry.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 \line }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid9528101
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\cf2\lang1033\langfe2057\langnp1033\insrsid8349739 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf2\lang1033\langfe2057\langnp1033\insrsid8349739
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid528149\charrsid528149 \hich\af1\dbch\af31505\loch\f1 Open Revit application.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149 \hich\af1\dbch\af31505\loch\f1 1.\tab }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid528149\charrsid528149 \hich\af1\dbch\af31505\loch\f1 Fabrication Part Layout}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149
\par }\pard \ltrpar\ql \li765\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin765\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid528149\charrsid528149 \hich\af1\dbch\af31505\loch\f1 a. Load FabricationPartLayout.rvt}{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid528149\charrsid528149 \hich\af1\dbch\af31505\loch\f1 b. Execute the command.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149
\par \hich\af1\dbch\af31505\loch\f1 Expected result: }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid528149\charrsid528149 \hich\af1\dbch\af31505\loch\f1
Draws a sample layout containing fabrication parts connected to the existing Revit AHU instance.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149
\par
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149 \hich\af1\dbch\af31505\loch\f1 2.\tab }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid528149\charrsid528149 \hich\af1\dbch\af31505\loch\f1 Optimize Straights}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\tx1080\wrapdefault\faauto\rin0\lin1080\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149 \hich\af1\dbch\af31505\loch\f1 a.\tab }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid528149\charrsid528149 \hich\af1\dbch\af31505\loch\f1 Load FabricationPartLayout.rvt or add }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid407606
\hich\af1\dbch\af31505\loch\f1 some fabrication\hich\af1\dbch\af31505\loch\f1 part straights.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1080\itap0\pararsid528149 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149 \hich\af1\dbch\af31505\loch\f1 b.\tab }{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3964207 \hich\af1\dbch\af31505\loch\f1 Make a selection of the fabrication parts, making sure to select some of the longer fabrication part straights.}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid528149\charrsid528149 \hich\af1\dbch\af31505\loch\f1 c.\tab Execute the command
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid8349739\charrsid528149 \hich\af1\dbch\af31505\loch\f1 Expected result: }{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid528149\charrsid528149 \hich\af1\dbch\af31505\loch\f1 Fabrication part lengths longer than the standard length will be optimized into sma\hich\af1\dbch\af31505\loch\f1
ller straight parts.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722
\par }\pard \ltrpar\ql \li765\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin765\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573\charrsid528149
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 \hich\af1\dbch\af31505\loch\f1 3}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid528149 .\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 \hich\af1\dbch\af31505\loch\f1 Stretch and Fit}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid528149
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\tx1080\wrapdefault\faauto\rin0\lin1080\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid528149 \hich\af1\dbch\af31505\loch\f1 a.
\tab Load}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 \hich\af1\dbch\af31505\loch\f1 StretchAndFit.rvt.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid528149
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1080\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid528149 \hich\af1\dbch\af31505\loch\f1 b.\tab }{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 \hich\af1\dbch\af31505\loch\f1 Select the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid7210945
\hich\af1\dbch\af31505\loch\f1 two radius bends in the model.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid528149
\par \hich\af1\dbch\af31505\loch\f1 c.\tab Execute the command
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid528149 \hich\af1\dbch\af31505\loch\f1 Expected result: }{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722 \hich\af1\dbch\af31505\loch\f1 The radius bend should stretch and fit and connect to the selected straight.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722\charrsid528149
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid14442722
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid15368036 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 4. }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036\charrsid528149 \tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid4609138 \hich\af1\dbch\af31505\loch\f1 Convert To Fabrication}{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036\charrsid528149
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\tx1080\wrapdefault\faauto\rin0\lin1080\itap0\pararsid15368036 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid4609138 \hich\af1\dbch\af31505\loch\f1 a.\tab
ConvertToFabrication}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 .rvt.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036\charrsid528149
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1080\itap0\pararsid15368036 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036\charrsid528149 \hich\af1\dbch\af31505\loch\f1 b.\tab }{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036 \hich\af1\dbch\af31505\loch\f1 Select the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid4609138
\hich\af1\dbch\af31505\loch\f1 duct layout}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036\charrsid528149
\par \hich\af1\dbch\af31505\loch\f1 c.\tab Execute the command
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid15368036 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036\charrsid528149 \hich\af1\dbch\af31505\loch\f1 Expected result: }{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid4609138 \hich\af1\dbch\af31505\loch\f1 The duct layout should convert to fabrication parts.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036\charrsid528149
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid14442722 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3281187 \hich\af1\dbch\af31505\loch\f1 5. }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3281187\charrsid3281187
\hich\af1\dbch\af31505\loch\f1 Part}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546 \hich\af1\dbch\af31505\loch\f1 Renumber}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid15368036
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \tab \hich\af1\dbch\af31505\loch\f1 a. Make a selection of fabrication parts}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid3281187
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par \tab
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid865349 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3281187 \hich\af1\dbch\af31505\loch\f1 Expected result: }{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1910342 \hich\af1\dbch\af31505\loch\f1 The }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1
fabrication parts Item Number property should be filled in and all parts that are the same have the same number. The fields ignored are based on ignoring the part\hich\f1 \rquote \loch\f1 s notes, order number and service.}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid3281187
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid415015 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015
\par \hich\af1\dbch\af31505\loch\f1 6. Button}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1 and }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1 Group}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1 Exclusions
\par \tab \hich\af1\dbch\af31505\loch\f1 a\hich\af1\dbch\af31505\loch\f1 . Load ButtonGroupExclusions.rvt
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid12941546 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546 \hich\af1\dbch\af31505\loch\f1 Expected result: T}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015 \hich\af1\dbch\af31505\loch\f1 he Square Bend }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546 \hich\af1\dbch\af31505\loch\f1
button is excluded and the Round Bought Out service group is excluded.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid415015
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12941546 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546
\par \hich\af1\dbch\af31505\loch\f1 7. Ancillaries
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Execute the command
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Select a fabrication part
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid12941546 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546 \hich\af1\dbch\af31505\loch\f1 Expected result: A dia
\hich\af1\dbch\af31505\loch\f1 log should be presented with the ancillary information for the selected fabrication part.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12941546 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546
\par \hich\af1\dbch\af31505\loch\f1 8. Get Custom Data
\par \tab \hich\af1\dbch\af31505\loch\f1 a. }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1 Load CustomData.rvt}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546 \tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1 c}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546 \hich\af1\dbch\af31505\loch\f1 . Select a fabrication part
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid12941546 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546 \hich\af1\dbch\af31505\loch\f1
Expected result: A dialog should be presented with the custom data \hich\af1\dbch\af31505\loch\f1 information for the selected fabrication part.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12941546 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid16595484 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1 9. Set Custom Data
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Load CustomData.rvt
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par \tab \hich\af1\dbch\af31505\loch\f1 c. Select a fabrication part
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid16595484 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1
Expected result: A dialog should be presented with the custom data information for the selected fabrication pa\hich\af1\dbch\af31505\loch\f1 rt, detailing the before and after values.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12941546 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1 10. Export to PCF}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid12941546
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \tab \hich\af1\dbch\af31505\loch\f1 a. Select some fabrication parts
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par
\par \tab \hich\af1\dbch\af31505\loch\f1 Expected result: A PCF file will be created at the specified location.
\par
\par \hich\af1\dbch\af31505\loch\f1 11. Display Part Info
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Execute the command
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Select a fabrication part
\par
\par \tab \hich\af1\dbch\af31505\loch\f1 Expected result: A dialog should be presented with fabrication part information.
\par
\par \hich\af1\dbch\af31505\loch\f1 12. Detach Hanger Rods
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Load HangerRods.rvt
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par \tab \hich\af1\dbch\af31505\loch\f1 c. Select a fabrication part hanger
\par
\par \tab \hich\af1\dbch\af31505\loch\f1 Expected result: The hanger rods \hich\af1\dbch\af31505\loch\f1 should no longer be hosted by their structural host.
\par
\par \hich\af1\dbch\af31505\loch\f1 13. Double Rod Lengths
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Load HangerRods.rvt
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid16595484 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1
c. Select a fabrication part hanger that is not attached to structure. Use the Detach Hanger Rods command first, if necessary
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12941546 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484
\par \tab \hich\af1\dbch\af31505\loch\f1 Expected result: The hanger rod lengths should double}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6237820 \hich\af1\dbch\af31505\loch\f1 in size.}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484
\par
\par \hich\af1\dbch\af31505\loch\f1 14. Halve Rod Lengths
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Load HangerRods.rvt
\par }\pard \ltrpar\ql \fi720\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid16595484 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid16595484 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484 \hich\af1\dbch\af31505\loch\f1
c. Select a fabrication part hanger that is not attached to structure. Use the Detach Hanger Rods command first, if necessa\hich\af1\dbch\af31505\loch\f1 ry
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6237820
\par \hich\af1\dbch\af31505\loch\f1 Expected result: The hanger rod lengths should halve in size.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid12941546 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16595484
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6237820 \hich\af1\dbch\af31505\loch\f1 15. Increase Rod Structure Extension
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Load HangerRods.rvt
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par \tab \hich\af1\dbch\af31505\loch\f1 c. Select a fabrication part hanger that is attached to structure.
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid6237820 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6237820 \hich\af1\dbch\af31505\loch\f1 Expected result: The hanger rod le
\hich\af1\dbch\af31505\loch\f1 ngths will increase by 1 foot in length and are still attached to structure.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6237820 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6237820
\par \hich\af1\dbch\af31505\loch\f1 16. Decrease Rod Structure Extension
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Load HangerRods.rvt
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par \tab \hich\af1\dbch\af31505\loch\f1 c. Select a fabrication part hanger that is attached to structure.
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid6237820 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6237820 \hich\af1\dbch\af31505\loch\f1
Expected result: The hanger rod lengths will decrease by 1 foot in length and are still attached to structure.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6237820\charrsid528149
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6237820 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6237820
\par \hich\af1\dbch\af31505\loch\f1 17. Split Straight
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Execute the command
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Select a fabrication part straight segment
\par
\par \tab \hich\af1\dbch\af31505\loch\f1 Expected result: The straight will split into two eq\hich\af1\dbch\af31505\loch\f1 ual segments.
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573 \hich\af1\dbch\af31505\loch\f1 18. Load and Place Next Item File
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Load a project with a valid fabrication configuration that you have access to the source.
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command.
\par
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid6820573 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573 \hich\af1\dbch\af31505\loch\f1
Expected result: The first item file that has not been previously loaded will be loaded\hich\af1\dbch\af31505\loch\f1 into the configuration. A new fabrication part will be created from the loaded item file, placed and selected into the model.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid6820573 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573
\par \hich\af1\dbch\af31505\loch\f1 19. Unload Unused Item Files
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid6820573 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573 \hich\af1\dbch\af31505\loch\f1
a. Load a project that has item files that have been loaded into the configuration but have not bee\hich\af1\dbch\af31505\loch\f1 n used.
\par \hich\af1\dbch\af31505\loch\f1 b. }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16580866 \hich\af1\dbch\af31505\loch\f1 Execute the command.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid6820573
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16580866
\par \hich\af1\dbch\af31505\loch\f1 Expected result: The unused loaded item files will be unloaded from the configuration.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1406616 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid1406616
\par \hich\af1\dbch\af31505\loch\f1 20. Export to MAJ
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Make a selection of fabrication parts.
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par
\par \tab \hich\af1\dbch\af31505\loch\f1 Expected result: \hich\af1\dbch\af31505\loch\f1 A MAJ file will be created at the specified location.
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid16449612 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 21}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 . }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 Access Fabrication Part Geometry}{
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612
\par \tab \hich\af1\dbch\af31505\loch\f1 a. Select some fabrication parts
\par \tab \hich\af1\dbch\af31505\loch\f1 b. Execute the command
\par
\par \tab \hich\af1\dbch\af31505\loch\f1 Expected result: }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 \hich\af1\dbch\af31505\loch\f1 Mesh \hich\af1\dbch\af31505\loch\f1 triangle face
\hich\af1\dbch\af31505\loch\f1 geometry \hich\af1\dbch\af31505\loch\f1 will be exported to CSV files}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612 .
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1406616 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1033\langfe2057\langnp1033\insrsid16449612\charrsid528149
\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210030dd4329a8060000a41b0000160000007468656d652f7468656d652f
7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87
615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad
79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b
5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab
999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9
699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586
8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6
0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f
9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be
15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979
3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d
32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a
f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86
e877f0034e16bafb0e258ebb4faf06b769e888340b103d331115bebc4eb813bf83291b63624a0d1475a756c734f9bbc2cd28546ecbe1e20a3794ca175f3fae90
fb6d2dd99bb07b55e5ccf68942bd0877b23c77b908e8db5f9db7f024d9239010f35bd4bbe2fcae387bfff9e2bc289f2fbe24cfaa301468dd8bd846dbb4ddf1c2
ae7b4c191ba8292337a469bc25ec3d411f06f53a73e224c5292c8de0516732307070a1c0660d125c7d44553488700a4d7bddd3444299910e254ab984c3a219ae
a4adf1d0f82b7bd46cea4388ad1c12ab5d1ed8e1153d9c9f350a3246aad01c6873462b9ac05999ad5cc988826eafc3acae853a33b7ba11cd1445875ba1b236b1
399483c90bd560b0b0263435085a21b0f22a9cf9356b38ec6046026d77eba3dc2dc60b17e92219e180643ed27acffba86e9c94c7ca9c225a0f1b0cfae0788ad5
4adc5a9aec1b703b8b93caec1a0bd8e5de7b132fe5113cf312503b998e2c2927274bd051db6b35979b1ef271daf6c6704e86c73805af4bdd476216c26593af84
0dfb5393d964f9cc9bad5c313709ea70f561ed3ea7b053075221d51696910d0d339585004b34272bff7213cc7a510a5454a3b349b1b206c1f0af490176745d4b
c663e2abb2b34b23da76f6352ba57ca2881844c1111ab189d8c7e07e1daaa04f40255c77988aa05fe06e4e5bdb4cb9c5394bbaf28d98c1d971ccd20867e556a7
689ec9166e0a522183792b8907ba55ca6e943bbf2a26e52f48957218ffcf54d1fb09dc3eac04da033e5c0d0b8c74a6b43d2e54c4a10aa511f5fb021a07533b20
5ae07e17a621a8e082dafc17e450ffb739676998b48643a4daa7211214f623150942f6a02c99e83b85583ddbbb2c4996113211551257a656ec1139246ca86be0
aadedb3d1441a89b6a929501833b197fee7b9641a3503739e57c732a59b1f7da1cf8a73b1f9bcca0945b874d4393dbbf10b1680f66bbaa5d6f96e77b6f59113d
316bb31a795600b3d256d0cad2fe354538e7566b2bd69cc6cbcd5c38f0e2bcc63058344429dc2121fd07f63f2a7c66bf76e80d75c8f7a1b622f878a18941d840
545fb28d07d205d20e8ea071b283369834296bdaac75d256cb37eb0bee740bbe278cad253b8bbfcf69eca23973d939b97891c6ce2cecd8da8e2d343578f6648a
c2d0383fc818c798cf64e52f597c740f1cbd05df0c264c49134cf09d4a60e8a107260f20f92d47b374e32f000000ffff0300504b030414000600080000002100
0dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f7
8277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89
d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd500
1996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0f
bfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6
a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a
0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d00140006000800000021
0030dd4329a8060000a41b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d001400060008
00000021000dd1909fb60000001b0100002700000000000000000000000000b20900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000ad0a00000000}
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
{\*\latentstyles\lsdstimax375\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 \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 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;
\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;
\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdpriority59 \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;}}{\*\datastore 010500000200000018000000
4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e500000000000000000000000020c6
5f65fce1d301feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000105000000000000}}
@@ -0,0 +1,125 @@
//
// (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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
using System.Windows.Forms;
using Autodesk.Revit.UI.Selection;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class SplitStraight : 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)
{
try
{
// check user selection
var uiDoc = commandData.Application.ActiveUIDocument;
var doc = uiDoc.Document;
Reference refObj = uiDoc.Selection.PickObject(ObjectType.Element, "Pick a fabrication part straight to start.");
var part = doc.GetElement(refObj) as FabricationPart;
if (part == null || part.IsAStraight() == false)
{
message = "The selected element is not a fabrication part straight.";
return Result.Failed;
}
// get the 2 end connectors
var connectors = new List<Connector>();
foreach (Connector c in part.ConnectorManager.Connectors)
{
if (c.ConnectorType == ConnectorType.End)
connectors.Add(c);
}
if (connectors.Count != 2)
{
message = "There are not 2 end connectors on this straight.";
return Result.Failed;
}
var conn1 = connectors[0];
var conn2 = connectors[1];
var x = (conn1.Origin.X + conn2.Origin.X) / 2.0;
var y = (conn1.Origin.Y + conn2.Origin.Y) / 2.0;
var z = (conn1.Origin.Z + conn2.Origin.Z) / 2.0;
var midpoint = new XYZ(x, y, z);
if (part.CanSplitStraight(midpoint) == false)
{
message = "straight cannot be split at its mid-point";
return Result.Failed;
}
using (var trans = new Transaction(doc, "split straight"))
{
trans.Start();
part.SplitStraight(midpoint);
trans.Commit();
}
return Result.Succeeded;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
}
}
@@ -0,0 +1,172 @@
//
// (C) Copyright 2003-2011 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 System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Fabrication;
namespace Revit.SDK.Samples.FabricationPartLayout.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)]
public class StretchAndFit : 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)
{
try
{
Document doc = commandData.Application.ActiveUIDocument.Document;
// check user selection
UIDocument uidoc = commandData.Application.ActiveUIDocument;
ICollection<ElementId> collection = uidoc.Selection.GetElementIds();
if (collection.Count > 0)
{
List<ElementId> selIds = new List<ElementId>();
foreach (ElementId id in collection)
selIds.Add(id);
if (selIds.Count != 2)
{
message = "Select a fabrication part to stretch and fit from and an element to connect to.";
return Result.Cancelled;
}
Connector connFrom = GetValidConnectorToStretchAndFitFrom(doc, selIds.ElementAt(0));
Connector connTo = GetValidConnectorToStretchAndFitTo(doc, selIds.ElementAt(1));
FabricationPartRouteEnd toEnd = FabricationPartRouteEnd.CreateFromConnector(connTo);
if (connFrom == null || connTo == null)
{
message = "Invalid fabrication parts to stretch and fit";
return Result.Cancelled;
}
using (Transaction tr = new Transaction(doc, "Stretch and Fit"))
{
tr.Start();
ISet<ElementId> newPartIds;
FabricationPartFitResult result = FabricationPart.StretchAndFit(doc, connFrom, toEnd, out newPartIds);
if (result != FabricationPartFitResult.Success)
{
message = result.ToString();
return Result.Failed;
}
doc.Regenerate();
tr.Commit();
}
return Result.Succeeded;
}
else
{
// inform user they need to select at least one element
message = "Select a fabrication part to stretch and fit from and an element to connect to.";
}
return Result.Failed;
}
catch (Exception ex)
{
message = ex.Message;
return Result.Failed;
}
}
private Connector GetValidConnectorToStretchAndFitFrom(Document doc, ElementId elementId)
{
// must be a fabrication part
FabricationPart part = doc.GetElement(elementId) as FabricationPart;
if (part == null)
return null;
// must not be a straight, hanger or tap
if (part.IsAStraight() || part.IsATap() || part.IsAHanger())
return null;
// part must be connected at one end and have one unoccupied connector
int numUnused = part.ConnectorManager.UnusedConnectors.Size;
int numConns = part.ConnectorManager.Connectors.Size;
if (numConns - numUnused != 1)
return null;
foreach (Connector conn in part.ConnectorManager.UnusedConnectors)
{
// return the first unoccupied connector
return conn;
}
return null;
}
private Connector GetValidConnectorToStretchAndFitTo(Document doc, ElementId elementId)
{
// connect to another fabrication part - will work also with families.
FabricationPart part = doc.GetElement(elementId) as FabricationPart;
if (part == null)
return null;
// must not be a fabrication part hanger
if (part.IsAHanger())
return null;
foreach (Connector conn in part.ConnectorManager.UnusedConnectors)
{
// return the first unoccupied connector
return conn;
}
return null;
}
}
}