diff --git a/SDK/Add-In Manager/Autodesk.AddInManager.Command.dll b/SDK/Add-In Manager/Autodesk.AddInManager.Command.dll index f04a8ec2d..34d432213 100644 Binary files a/SDK/Add-In Manager/Autodesk.AddInManager.Command.dll and b/SDK/Add-In Manager/Autodesk.AddInManager.Command.dll differ diff --git a/SDK/Getting Started with the Revit API.docx b/SDK/Getting Started with the Revit API.docx index 1c8e97cda..d1d8acbbe 100644 Binary files a/SDK/Getting Started with the Revit API.docx and b/SDK/Getting Started with the Revit API.docx differ diff --git a/SDK/Macro Samples/GetTimeElapsed_CSharp/Source/GetTimeElapsed_CSharp/GetTimeElapsed_CSharp.csproj b/SDK/Macro Samples/GetTimeElapsed_CSharp/Source/GetTimeElapsed_CSharp/GetTimeElapsed_CSharp.csproj index d6065ca71..159e9c72e 100644 --- a/SDK/Macro Samples/GetTimeElapsed_CSharp/Source/GetTimeElapsed_CSharp/GetTimeElapsed_CSharp.csproj +++ b/SDK/Macro Samples/GetTimeElapsed_CSharp/Source/GetTimeElapsed_CSharp/GetTimeElapsed_CSharp.csproj @@ -1,10 +1,4 @@ - - - - None - - - + - - {A860303F-1F3F-4691-B57E-529FC101A107};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - RevitVSTA - AnyCPU - 9.0.30729 - 2.0 - Library - GetTimeElapsed_VBNet - v4.5 - On - Binary - Off - On - {C1499A1C-B9A0-4C5F-AC2E-E6F7C0B787D9} - - - - - - false - true - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - True - False - None - TRACE=1 - ..\..\Addin\ - GetTimeElapsed_VBNet - - - - - False - ..\..\..\..\..\RevitAPIUI.dll - False - - - - 3.5 - - - - - - 3.5 - - - False - ..\..\..\..\..\RevitAPI.dll - False - - - - - - - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - True - True - Resources.resx - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - True - Settings.settings - True - - - ThisApplication.vb - - - Code - - - - - - - - - - - - - - - MEP2011 - {f2d1070d-feff-4610-9403-9476ff28253d} - - - - - \ No newline at end of file diff --git a/SDK/Macro Samples/Macro Samples Readme.doc b/SDK/Macro Samples/Macro Samples Readme.doc index cdf56b432..ca7f6ecb4 100644 Binary files a/SDK/Macro Samples/Macro Samples Readme.doc and b/SDK/Macro Samples/Macro Samples Readme.doc differ diff --git a/SDK/Macro Samples/Rooms/Source/Rooms/Rooms.csproj b/SDK/Macro Samples/Rooms/Source/Rooms/Rooms.csproj index af093c4f4..6a07234d8 100644 --- a/SDK/Macro Samples/Rooms/Source/Rooms/Rooms.csproj +++ b/SDK/Macro Samples/Rooms/Source/Rooms/Rooms.csproj @@ -1,10 +1,4 @@ - - - - None - - - + - + \ No newline at end of file diff --git a/SDK/REX SDK/Samples/FrameGenerator/FrameGenerator/FrameGenerator.csproj b/SDK/REX SDK/Samples/FrameGenerator/FrameGenerator/FrameGenerator.csproj index 5f3d42e47..c05a666ab 100644 --- a/SDK/REX SDK/Samples/FrameGenerator/FrameGenerator/FrameGenerator.csproj +++ b/SDK/REX SDK/Samples/FrameGenerator/FrameGenerator/FrameGenerator.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -258,4 +252,4 @@ if exist "$(ProjectDir)Additional\buildevents.bat" call "$(ProjectDir)Additional xcopy "$(ProjectDir)Additional\*.addin" "R:\Autodesk\Revit\Addins\2018" /S /R /K /V /I /F /C /Y - + \ No newline at end of file diff --git a/SDK/REX SDK/Samples/PyramidGenerator/PyramidGenerator/Additional/AREXStart/PyramidGeneratorStart.csproj b/SDK/REX SDK/Samples/PyramidGenerator/PyramidGenerator/Additional/AREXStart/PyramidGeneratorStart.csproj index ef2cb6533..61f7f8edb 100644 --- a/SDK/REX SDK/Samples/PyramidGenerator/PyramidGenerator/Additional/AREXStart/PyramidGeneratorStart.csproj +++ b/SDK/REX SDK/Samples/PyramidGenerator/PyramidGenerator/Additional/AREXStart/PyramidGeneratorStart.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -143,4 +137,4 @@ --> - + \ No newline at end of file diff --git a/SDK/REX SDK/Samples/PyramidGenerator/PyramidGenerator/PyramidGenerator.csproj b/SDK/REX SDK/Samples/PyramidGenerator/PyramidGenerator/PyramidGenerator.csproj index d2315f717..2401ea8b5 100644 --- a/SDK/REX SDK/Samples/PyramidGenerator/PyramidGenerator/PyramidGenerator.csproj +++ b/SDK/REX SDK/Samples/PyramidGenerator/PyramidGenerator/PyramidGenerator.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -291,4 +285,4 @@ xcopy "$(ProjectDir)Additional\*.addin" "R:\Autodesk\Revit\Addins\2018" /S /R /K - + \ No newline at end of file diff --git a/SDK/REX SDK/Samples/Serialization/Serialization/Serialization.csproj b/SDK/REX SDK/Samples/Serialization/Serialization/Serialization.csproj index 4266e080b..28d7f0b63 100644 --- a/SDK/REX SDK/Samples/Serialization/Serialization/Serialization.csproj +++ b/SDK/REX SDK/Samples/Serialization/Serialization/Serialization.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -258,4 +252,4 @@ if exist "$(ProjectDir)Additional\buildevents.bat" call "$(ProjectDir)Additional xcopy "$(ProjectDir)Additional\*.addin" "R:\Autodesk\Revit\Addins\2018" /S /R /K /V /I /F /C /Y - + \ No newline at end of file diff --git a/SDK/REX SDK/Samples/Unit/Unit/Unit.csproj b/SDK/REX SDK/Samples/Unit/Unit/Unit.csproj index 6c43d27a2..62860354c 100644 --- a/SDK/REX SDK/Samples/Unit/Unit/Unit.csproj +++ b/SDK/REX SDK/Samples/Unit/Unit/Unit.csproj @@ -1,11 +1,5 @@ - + - - - None - - - Debug AnyCPU @@ -251,4 +245,4 @@ if exist "$(ProjectDir)Additional\buildevents.bat" call "$(ProjectDir)Additional xcopy "$(ProjectDir)Additional\*.addin" "R:\Autodesk\Revit\Addins\2018" /S /R /K /V /I /F /C /Y - + \ No newline at end of file diff --git a/SDK/Read Me First.doc b/SDK/Read Me First.doc index 0f050acd7..ef204e4e9 100644 Binary files a/SDK/Read Me First.doc and b/SDK/Read Me First.doc differ diff --git a/SDK/Revit Platform API Changes and Additions.docx b/SDK/Revit Platform API Changes and Additions.docx index 4b746cc09..4835a0749 100644 Binary files a/SDK/Revit Platform API Changes and Additions.docx and b/SDK/Revit Platform API Changes and Additions.docx differ diff --git a/SDK/RevitAPI.chm b/SDK/RevitAPI.chm index c9e27c315..c04236439 100644 Binary files a/SDK/RevitAPI.chm and b/SDK/RevitAPI.chm differ diff --git a/SDK/RevitAddInUtility.chm b/SDK/RevitAddInUtility.chm index 8b711949c..0272f10ef 100644 Binary files a/SDK/RevitAddInUtility.chm and b/SDK/RevitAddInUtility.chm differ diff --git a/SDK/Samples/APIAppStartup/CS/APIAppStartup.csproj b/SDK/Samples/APIAppStartup/CS/APIAppStartup.csproj index c8dbc43e3..8d9242159 100644 --- a/SDK/Samples/APIAppStartup/CS/APIAppStartup.csproj +++ b/SDK/Samples/APIAppStartup/CS/APIAppStartup.csproj @@ -21,7 +21,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -31,7 +30,6 @@ prompt 4 true - true @@ -40,8 +38,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -51,8 +48,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AddSpaceAndZone/CS/AddSpaceAndZone.csproj b/SDK/Samples/AddSpaceAndZone/CS/AddSpaceAndZone.csproj index 9a2a4f872..db2b94cb2 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/AddSpaceAndZone.csproj +++ b/SDK/Samples/AddSpaceAndZone/CS/AddSpaceAndZone.csproj @@ -21,7 +21,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -31,7 +30,6 @@ prompt 4 true - true @@ -40,8 +38,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -51,8 +48,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AddSpaceAndZone/CS/DataManager.cs b/SDK/Samples/AddSpaceAndZone/CS/DataManager.cs index e81e23fb6..4870e11ef 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/DataManager.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/DataManager.cs @@ -63,8 +63,8 @@ public DataManager(ExternalCommandData commandData) /// private void Initialize() { - Dictionary> spaceDictionary = new Dictionary>(); - Dictionary> zoneDictionary = new Dictionary>(); + Dictionary> spaceDictionary = new Dictionary>(); + Dictionary> zoneDictionary = new Dictionary>(); Document activeDoc = m_commandData.Application.ActiveUIDocument.Document; @@ -79,8 +79,8 @@ private void Initialize() if (level != null) { m_levels.Add(level); - spaceDictionary.Add(level.Id.IntegerValue, new List()); - zoneDictionary.Add(level.Id.IntegerValue, new List()); + spaceDictionary.Add(level.Id, new List()); + zoneDictionary.Add(level.Id, new List()); } } @@ -90,7 +90,7 @@ private void Initialize() Space space = spacesIterator.Current as Space; if (space != null) { - spaceDictionary[space.LevelId.IntegerValue].Add(space); + spaceDictionary[space.LevelId].Add(space); } } @@ -100,7 +100,7 @@ private void Initialize() Zone zone = zonesIterator.Current as Zone; if (zone != null && activeDoc.GetElement(zone.LevelId) != null) { - zoneDictionary[zone.LevelId.IntegerValue].Add(zone); + zoneDictionary[zone.LevelId].Add(zone); } } diff --git a/SDK/Samples/AddSpaceAndZone/CS/SpaceManager.cs b/SDK/Samples/AddSpaceAndZone/CS/SpaceManager.cs index 173ff58b5..f5588dca7 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/SpaceManager.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/SpaceManager.cs @@ -37,14 +37,14 @@ namespace Revit.SDK.Samples.AddSpaceAndZone.CS class SpaceManager { ExternalCommandData m_commandData; - Dictionary> m_spaceDictionary; + Dictionary> m_spaceDictionary; /// /// The constructor of SpaceManager class. /// /// The ExternalCommandData /// The spaceData contains all the Space elements in different level. - public SpaceManager(ExternalCommandData data, Dictionary> spaceData) + public SpaceManager(ExternalCommandData data, Dictionary> spaceData) { m_commandData = data; m_spaceDictionary = spaceData; @@ -57,7 +57,7 @@ public SpaceManager(ExternalCommandData data, Dictionary> spaceD /// Return a space list public List GetSpaces(Level level) { - return m_spaceDictionary[level.Id.IntegerValue]; + return m_spaceDictionary[level.Id]; } /// @@ -75,7 +75,7 @@ public void CreateSpaces(Level level, Phase phase) Space space = m_commandData.Application.ActiveUIDocument.Document.GetElement(elem) as Space; if (space != null) { - m_spaceDictionary[level.Id.IntegerValue].Add(space); + m_spaceDictionary[level.Id].Add(space); } } if (elements == null || elements.Count == 0) diff --git a/SDK/Samples/AddSpaceAndZone/CS/ZoneManager.cs b/SDK/Samples/AddSpaceAndZone/CS/ZoneManager.cs index 84134f8fb..abe5dac63 100644 --- a/SDK/Samples/AddSpaceAndZone/CS/ZoneManager.cs +++ b/SDK/Samples/AddSpaceAndZone/CS/ZoneManager.cs @@ -36,7 +36,7 @@ namespace Revit.SDK.Samples.AddSpaceAndZone.CS class ZoneManager { ExternalCommandData m_commandData; - Dictionary> m_zoneDictionary; + Dictionary> m_zoneDictionary; Level m_currentLevel; Zone m_currentZone; @@ -45,7 +45,7 @@ class ZoneManager /// /// The ExternalCommandData /// The spaceData contains all the Zone elements in different level. - public ZoneManager(ExternalCommandData commandData, Dictionary> zoneData) + public ZoneManager(ExternalCommandData commandData, Dictionary> zoneData) { m_commandData = commandData; m_zoneDictionary = zoneData; @@ -61,7 +61,7 @@ public void CreateZone(Level level, Phase phase) Zone zone = m_commandData.Application.ActiveUIDocument.Document.Create.NewZone(level, phase); if (zone != null) { - this.m_zoneDictionary[level.Id.IntegerValue].Add(zone); + this.m_zoneDictionary[level.Id].Add(zone); } } @@ -91,7 +91,7 @@ public void RemoveSpaces(SpaceSet spaces) public List GetZones(Level level) { m_currentLevel = level; - return m_zoneDictionary[level.Id.IntegerValue]; + return m_zoneDictionary[level.Id]; } /// diff --git a/SDK/Samples/AllViews/CS/AllViews.csproj b/SDK/Samples/AllViews/CS/AllViews.csproj index ef461a660..65658b36d 100644 --- a/SDK/Samples/AllViews/CS/AllViews.csproj +++ b/SDK/Samples/AllViews/CS/AllViews.csproj @@ -29,7 +29,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -39,7 +38,6 @@ prompt 4 true - true @@ -48,8 +46,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -59,8 +56,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.csproj b/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.csproj index 2a4b5cacc..9a5f03cb4 100644 --- a/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.csproj +++ b/SDK/Samples/AnalysisVisualizationFramework/DistanceToSurfaces/CS/DistanceToSurfaces.csproj @@ -22,7 +22,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -32,7 +31,6 @@ prompt 4 true - true @@ -41,8 +39,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -52,8 +49,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AnalysisVisualizationFramework/MultithreadedCalculation/CS/MultithreadedCalculation.csproj b/SDK/Samples/AnalysisVisualizationFramework/MultithreadedCalculation/CS/MultithreadedCalculation.csproj index 787526331..83e8e5028 100644 --- a/SDK/Samples/AnalysisVisualizationFramework/MultithreadedCalculation/CS/MultithreadedCalculation.csproj +++ b/SDK/Samples/AnalysisVisualizationFramework/MultithreadedCalculation/CS/MultithreadedCalculation.csproj @@ -22,7 +22,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -32,7 +31,6 @@ prompt 4 true - true @@ -41,8 +39,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -52,8 +49,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AnalysisVisualizationFramework/SpatialFieldGradient/CS/SpatialFieldGradient.csproj b/SDK/Samples/AnalysisVisualizationFramework/SpatialFieldGradient/CS/SpatialFieldGradient.csproj index 979c49cb7..e2d7a68a4 100644 --- a/SDK/Samples/AnalysisVisualizationFramework/SpatialFieldGradient/CS/SpatialFieldGradient.csproj +++ b/SDK/Samples/AnalysisVisualizationFramework/SpatialFieldGradient/CS/SpatialFieldGradient.csproj @@ -22,7 +22,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -32,7 +31,6 @@ prompt 4 true - true @@ -41,8 +39,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -52,8 +49,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AnalyticalSupportData_Info/CS/AnalyticalSupportData_Info.cs b/SDK/Samples/AnalyticalSupportData_Info/CS/AnalyticalSupportData_Info.cs index 411921696..000bbb28e 100644 --- a/SDK/Samples/AnalyticalSupportData_Info/CS/AnalyticalSupportData_Info.cs +++ b/SDK/Samples/AnalyticalSupportData_Info/CS/AnalyticalSupportData_Info.cs @@ -25,6 +25,7 @@ using System.Data; using System.Collections.Generic; using System.Text; +using System.Linq; using Autodesk.Revit; using Autodesk.Revit.DB; @@ -95,80 +96,94 @@ public Autodesk.Revit.UI.Result Execute(Autodesk.Revit.UI.ExternalCommandData re return Autodesk.Revit.UI.Result.Succeeded; } - /// - /// get all the required information of selected elements and store them in a data table - /// - /// - /// all selected elements in Revit main program - /// - /// - /// a data table which store all the required information - /// - private DataTable StoreInformationInDataTable(ElementSet selectedElements) - { - DataTable informationTable = CreatDataTable(); - - foreach (Element element in selectedElements) + /// + /// get all the required information of selected elements and store them in a data table + /// + /// + /// all selected elements in Revit main program + /// + /// + /// a data table which store all the required information + /// + private DataTable StoreInformationInDataTable(ElementSet selectedElements) + { + DataTable informationTable = CreatDataTable(); + + foreach (Element element in selectedElements) + { + // Get + AnalyticalElement analyticalModel = null; + Document document = element.Document; + AnalyticalToPhysicalAssociationManager assocManager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(document); + if (assocManager != null) { - // Get - AnalyticalModel analyticalModel = element.GetAnalyticalModel(); - if (null == analyticalModel) // skip no AnalyticalModel element - { - continue; - } - - DataRow newRow = informationTable.NewRow(); - string idValue = element.Id.IntegerValue.ToString();// store element Id value - string typeName = ""; // store element type name - string[] supportInformation = GetSupportInformation(analyticalModel);// store support information - - // get element type information - switch (element.GetType().Name) - { - case "WallFoundation": - WallFoundation wallFound = element as WallFoundation; - ElementType wallFootSymbol =m_revit.Application.ActiveUIDocument.Document.GetElement(wallFound.GetTypeId()) as ElementType;// get element Type - typeName = wallFootSymbol.Category.Name + ": " + wallFootSymbol.Name; - break; - - case "FamilyInstance": - FamilyInstance familyInstance = element as FamilyInstance; - FamilySymbol symbol = m_revit.Application.ActiveUIDocument.Document.GetElement(familyInstance.GetTypeId()) as FamilySymbol; - typeName = symbol.Family.Name + ": " + symbol.Name; - break; - - case "Floor": - Floor slab = element as Floor; - FloorType slabType = m_revit.Application.ActiveUIDocument.Document.GetElement(slab.GetTypeId()) as FloorType; // get element type - typeName = slabType.Category.Name + ": " + slabType.Name; - break; - - case "Wall": - Wall wall = element as Wall; - WallType wallType = m_revit.Application.ActiveUIDocument.Document.GetElement(wall.GetTypeId()) as WallType; // get element type - typeName = wallType.Kind.ToString() + ": " + wallType.Name; - break; + ElementId associatedElementId = assocManager.GetAssociatedElementId(element.Id); + if (associatedElementId != ElementId.InvalidElementId) + { + Element associatedElement = document.GetElement(associatedElementId); + if (associatedElement != null && associatedElement is AnalyticalElement) + { + analyticalModel = associatedElement as AnalyticalElement; + } + } + } + if (null == analyticalModel) // skip no AnalyticalModel element + { + continue; + } - default: - break; - } + DataRow newRow = informationTable.NewRow(); + string idValue = element.Id.ToString();// store element Id value + string typeName = ""; // store element type name + string[] supportInformation = GetSupportInformation(analyticalModel);// store support information - // set the relative information of current element into the table. - newRow["Id"] = idValue; - newRow["Element Type"] = typeName; - newRow["Support Type"] = supportInformation[0]; - newRow["Remark"] = supportInformation[1]; - informationTable.Rows.Add(newRow); + // get element type information + switch (element.GetType().Name) + { + case "WallFoundation": + WallFoundation wallFound = element as WallFoundation; + ElementType wallFootSymbol = m_revit.Application.ActiveUIDocument.Document.GetElement(wallFound.GetTypeId()) as ElementType;// get element Type + typeName = wallFootSymbol.Category.Name + ": " + wallFootSymbol.Name; + break; + + case "FamilyInstance": + FamilyInstance familyInstance = element as FamilyInstance; + FamilySymbol symbol = m_revit.Application.ActiveUIDocument.Document.GetElement(familyInstance.GetTypeId()) as FamilySymbol; + typeName = symbol.Family.Name + ": " + symbol.Name; + break; + + case "Floor": + Floor slab = element as Floor; + FloorType slabType = m_revit.Application.ActiveUIDocument.Document.GetElement(slab.GetTypeId()) as FloorType; // get element type + typeName = slabType.Category.Name + ": " + slabType.Name; + break; + + case "Wall": + Wall wall = element as Wall; + WallType wallType = m_revit.Application.ActiveUIDocument.Document.GetElement(wall.GetTypeId()) as WallType; // get element type + typeName = wallType.Kind.ToString() + ": " + wallType.Name; + break; + + default: + break; } - return informationTable; - } - - /// - /// create a empty DataTable - /// - /// - private DataTable CreatDataTable() + // set the relative information of current element into the table. + newRow["Id"] = idValue; + newRow["Element Type"] = typeName; + newRow["Support Type"] = supportInformation[0]; + newRow["Remark"] = supportInformation[1]; + informationTable.Rows.Add(newRow); + } + + return informationTable; + } + + /// + /// create a empty DataTable + /// + /// + private DataTable CreatDataTable() { // Create a new DataTable. DataTable elementInformationTable = new DataTable("ElementInformationTable"); @@ -207,54 +222,21 @@ private DataTable CreatDataTable() return elementInformationTable; } - - /// - /// get element's support information - /// - /// element's analytical model - /// - private string[] GetSupportInformation(AnalyticalModel analyticalModel) - { - // supportInformation[0] store supportType - // supportInformation[1] store other informations - string[] supportInformations = new string[2] { "", "" }; - - IList supports = analyticalModel.GetAnalyticalModelSupports(); - - // "Supported" flag indicates if the Element is completely supported. - // AnalyticalModel Support list keeps track of all supports. - if (!analyticalModel.IsElementFullySupported())// judge if supported - { - if (0 == supports.Count) - { - supportInformations[0] = "not supported"; - } - else - { - foreach (AnalyticalModelSupport support in supports) - { - supportInformations[0] = supportInformations[0] + - support.GetSupportType().ToString() + ", "; - } - } - } - else - { - if (0 == supports.Count) - { - supportInformations[1] = "supported but no more information"; - } - else - { - foreach (AnalyticalModelSupport support in supports) - { - supportInformations[0] = supportInformations[0] + - support.GetSupportType().ToString() + ", "; - } - } - } - - return supportInformations; - } - } + /// + /// get element's support information + /// + /// element's analytical model + /// + private string[] GetSupportInformation(AnalyticalElement analyticalModel) + { + // supportInformation[0] store supportType + // supportInformation[1] store other informations + string[] supportInformations = new string[2] { "", "" }; + // "Supported" flag indicates if the Element is completely supported. + // AnalyticalModel Support list keeps track of all supports. + supportInformations[0] = "not supported"; + + return supportInformations; + } + } } diff --git a/SDK/Samples/AnalyticalSupportData_Info/CS/AnalyticalSupportData_Info.csproj b/SDK/Samples/AnalyticalSupportData_Info/CS/AnalyticalSupportData_Info.csproj index 767d2cdb5..00eaad3ad 100644 --- a/SDK/Samples/AnalyticalSupportData_Info/CS/AnalyticalSupportData_Info.csproj +++ b/SDK/Samples/AnalyticalSupportData_Info/CS/AnalyticalSupportData_Info.csproj @@ -23,7 +23,6 @@ 4 - pdbonly @@ -33,7 +32,6 @@ prompt 4 true - true @@ -42,8 +40,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -53,8 +50,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AppearanceAssetEditing/CS/AppearanceAssetEditing.csproj b/SDK/Samples/AppearanceAssetEditing/CS/AppearanceAssetEditing.csproj index 576983206..2d9cb7e57 100644 --- a/SDK/Samples/AppearanceAssetEditing/CS/AppearanceAssetEditing.csproj +++ b/SDK/Samples/AppearanceAssetEditing/CS/AppearanceAssetEditing.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -30,7 +25,6 @@ 4 true bin\Debug\AppearanceAssetEditing.XML - pdbonly @@ -39,17 +33,10 @@ TRACE prompt 4 - OnOutputUpdated - - - - - - diff --git a/SDK/Samples/ArchSample/VB.NET/ArchSample.vbproj b/SDK/Samples/ArchSample/VB.NET/ArchSample.vbproj index c999694d3..e43dfe6cd 100644 --- a/SDK/Samples/ArchSample/VB.NET/ArchSample.vbproj +++ b/SDK/Samples/ArchSample/VB.NET/ArchSample.vbproj @@ -52,7 +52,6 @@ 1 42016,42017,42018,42019,42032 full - bin\ @@ -72,7 +71,6 @@ 1 42016,42017,42018,42019,42032 none - true @@ -86,8 +84,7 @@ 42016,42017,42018,42019,42032 full x64 - - + MinimumRecommendedRules.ruleset true @@ -99,8 +96,7 @@ true 42016,42017,42018,42019,42032 x64 - - + MinimumRecommendedRules.ruleset diff --git a/SDK/Samples/ArchSample/VB.NET/Command.vb b/SDK/Samples/ArchSample/VB.NET/Command.vb index ca6d5d389..041363c15 100644 --- a/SDK/Samples/ArchSample/VB.NET/Command.vb +++ b/SDK/Samples/ArchSample/VB.NET/Command.vb @@ -193,7 +193,7 @@ Public Class Command For Each element In elementSet ' first column is the element id - display it as an integer - worksheet.Cells(row, 1).Value = element.Id.IntegerValue + worksheet.Cells(row, 1).Value = element.Id.ToString() ' retrieve all the values, in string form for the common properties of the element Dim values As System.Collections.Generic.Dictionary(Of String, String) = GetValuesOfNamedProperties(application, element, propertyNames) diff --git a/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.csproj b/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.csproj index ac74c6cca..4bdc60d05 100644 --- a/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.csproj +++ b/SDK/Samples/AreaReinCurve/CS/AreaReinCurve.csproj @@ -29,7 +29,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -39,7 +38,6 @@ prompt 4 true - true @@ -48,8 +46,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -59,8 +56,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.csproj b/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.csproj index d0522dcb2..94526d4b4 100644 --- a/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.csproj +++ b/SDK/Samples/AreaReinParameters/CS/AreaReinParameters.csproj @@ -29,7 +29,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -39,7 +38,6 @@ prompt 4 true - true @@ -48,8 +46,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -59,8 +56,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AreaReinParameters/CS/HookTypeConverter.cs b/SDK/Samples/AreaReinParameters/CS/HookTypeConverter.cs index 2ee76730f..37bdd3d99 100644 --- a/SDK/Samples/AreaReinParameters/CS/HookTypeConverter.cs +++ b/SDK/Samples/AreaReinParameters/CS/HookTypeConverter.cs @@ -144,7 +144,7 @@ public override object ConvertTo(ITypeDescriptorContext context, Autodesk.Revit.DB.ElementId tmpId = (Autodesk.Revit.DB.ElementId)de.Value; Autodesk.Revit.DB.ElementId cmpId = (Autodesk.Revit.DB.ElementId)v; - if (tmpId.IntegerValue == cmpId.IntegerValue) + if (tmpId == cmpId) { return de.Key.ToString(); } diff --git a/SDK/Samples/AttachedDetailGroup/CS/AttachedDetailGroup.csproj b/SDK/Samples/AttachedDetailGroup/CS/AttachedDetailGroup.csproj index db554aaf0..2b2f97a21 100644 --- a/SDK/Samples/AttachedDetailGroup/CS/AttachedDetailGroup.csproj +++ b/SDK/Samples/AttachedDetailGroup/CS/AttachedDetailGroup.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -30,7 +25,6 @@ 4 true bin\Debug\AttachedDetailGroup.XML - pdbonly @@ -39,17 +33,10 @@ TRACE prompt 4 - OnOutputUpdated - - - - - - diff --git a/SDK/Samples/AutoRoute/CS/AutoRoute.csproj b/SDK/Samples/AutoRoute/CS/AutoRoute.csproj index a9f4e2e0e..9bfa210de 100644 --- a/SDK/Samples/AutoRoute/CS/AutoRoute.csproj +++ b/SDK/Samples/AutoRoute/CS/AutoRoute.csproj @@ -41,8 +41,7 @@ DEBUG;TRACE prompt 4 - - + AllRules.ruleset pdbonly @@ -51,8 +50,7 @@ TRACE prompt 4 - - + AllRules.ruleset true @@ -62,8 +60,7 @@ full x64 prompt - - + AllRules.ruleset bin\x64\Release\ @@ -73,8 +70,7 @@ pdbonly x64 prompt - - + AllRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AutoRoute/CS/Command.cs b/SDK/Samples/AutoRoute/CS/Command.cs index f24756371..73d4a475a 100644 --- a/SDK/Samples/AutoRoute/CS/Command.cs +++ b/SDK/Samples/AutoRoute/CS/Command.cs @@ -188,18 +188,18 @@ public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, ref str Element element = m_document.GetElement(ids[i]); if (null == element) { - message = "Element " + ids[i].IntegerValue + " can't be found."; + message = "Element " + ids[i].ToString() + " can't be found."; return Autodesk.Revit.UI.Result.Failed; } instances[i] = element as FamilyInstance; - csi = ConnectorInfo.GetConnectors(ids[i].IntegerValue).ForwardIterator(); + csi = ConnectorInfo.GetConnectors(ids[i]).ForwardIterator(); csi.MoveNext(); conns[i] = csi.Current as Connector; boxes[i] = instances[i].get_BoundingBox(m_document.ActiveView); } //Find the "Out" and "SupplyAir" connector on the base equipment - csi = ConnectorInfo.GetConnectors(ids[0].IntegerValue).ForwardIterator(); + csi = ConnectorInfo.GetConnectors(ids[0]).ForwardIterator(); while (csi.MoveNext()) { Connector conn = csi.Current as Connector; @@ -212,12 +212,12 @@ public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, ref str //Create a mechanical system with a base air supply equipment and 2 terminals. m_mechanicalSystem = CreateMechanicalSystem( //[378728][SupplyAir][Out][RectProfile][OST_MechanicalEquipment] - new ConnectorInfo(378728, conns[0].Origin.X, conns[0].Origin.Y, conns[0].Origin.Z), + new ConnectorInfo(new ElementId(378728), conns[0].Origin.X, conns[0].Origin.Y, conns[0].Origin.Z), new ConnectorInfo[]{ //[378707][SupplyAir][In][RectProfile] - new ConnectorInfo(378707, conns[1].Origin.X, conns[1].Origin.Y, conns[1].Origin.Z), + new ConnectorInfo(new ElementId(378707), conns[1].Origin.X, conns[1].Origin.Y, conns[1].Origin.Z), //[378716][SupplyAir][In][RectProfile] - new ConnectorInfo(378716, conns[2].Origin.X, conns[2].Origin.Y, conns[2].Origin.Z) + new ConnectorInfo(new ElementId(378716), conns[2].Origin.X, conns[2].Origin.Y, conns[2].Origin.Z) }, DuctSystemType.SupplyAir ); @@ -283,9 +283,9 @@ public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, ref str ducts.Add(Duct.Create(m_document, systemTypeId, ductTypeId, lvl.Id, points[1], points[2])); - connectors.Add(ConnectorInfo.GetConnector(ducts[0].Id.IntegerValue, points[0])); - connectors.Add(ConnectorInfo.GetConnector(ducts[1].Id.IntegerValue, points[1])); - connectors.Add(ConnectorInfo.GetConnector(ducts[1].Id.IntegerValue, points[2])); + connectors.Add(ConnectorInfo.GetConnector(ducts[0].Id, points[0])); + connectors.Add(ConnectorInfo.GetConnector(ducts[1].Id, points[1])); + connectors.Add(ConnectorInfo.GetConnector(ducts[1].Id, points[2])); connectors[0].ConnectTo(connectors[1]); m_document.Create.NewElbowFitting(connectors[0], connectors[1]); baseConnectors.Add(connectors[2]); @@ -298,8 +298,8 @@ public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, ref str points.Add(new GXYZ(conns[2].Origin.X, conns[2].Origin.Y, maxZ + verticalTrunkOffset - min1FittingLength)); ducts.Add(Duct.Create(m_document, ductTypeId, lvl.Id, conns[1], points[0])); ducts.Add(Duct.Create(m_document, ductTypeId, lvl.Id, conns[2], points[1])); - baseConnectors.Add(ConnectorInfo.GetConnector(ducts[0].Id.IntegerValue, points[0])); - baseConnectors.Add(ConnectorInfo.GetConnector(ducts[1].Id.IntegerValue, points[1])); + baseConnectors.Add(ConnectorInfo.GetConnector(ducts[0].Id, points[0])); + baseConnectors.Add(ConnectorInfo.GetConnector(ducts[1].Id, points[1])); //Connect the system by creating the trunk line of ducts and connect them to the base connectors SortConnectorsByX(baseConnectors); @@ -805,8 +805,8 @@ private List CreateDuct(GXYZ point1, GXYZ point2) Duct duct = Duct.Create(m_document, systemTypeId, ductTypeId, lvl.Id, point1, point2); - connectors.Add(ConnectorInfo.GetConnector(duct.Id.IntegerValue, point1)); - connectors.Add(ConnectorInfo.GetConnector(duct.Id.IntegerValue, point2)); + connectors.Add(ConnectorInfo.GetConnector(duct.Id, point1)); + connectors.Add(ConnectorInfo.GetConnector(duct.Id, point2)); return connectors; } @@ -841,7 +841,7 @@ public class ConnectorInfo /// /// The owner's element ID /// - int m_ownerId; + ElementId m_ownerId; /// /// The origin of the connector @@ -865,7 +865,7 @@ public Connector Connector /// /// The owner ID of the connector /// - public int OwnerId + public ElementId OwnerId { get { return m_ownerId; } set { m_ownerId = value; } @@ -885,7 +885,7 @@ public GXYZ Origin /// /// the ownerID of the connector /// the origin of the connector - public ConnectorInfo(int ownerId, GXYZ origin) + public ConnectorInfo(ElementId ownerId, GXYZ origin) { m_ownerId = ownerId; m_origin = origin; @@ -899,7 +899,7 @@ public ConnectorInfo(int ownerId, GXYZ origin) /// the X value of the connector /// the Y value of the connector /// the Z value of the connector - public ConnectorInfo(int ownerId, double x, double y, double z) + public ConnectorInfo(ElementId ownerId, double x, double y, double z) : this(ownerId, new GXYZ(x, y, z)) { } @@ -910,7 +910,7 @@ public ConnectorInfo(int ownerId, double x, double y, double z) /// the owner ID of the connector /// the origin of the connector /// if found, return the connector, or else return null - public static Connector GetConnector(int ownerId, GXYZ connectorOrigin) + public static Connector GetConnector(ElementId ownerId, GXYZ connectorOrigin) { ConnectorSet connectors = GetConnectors(ownerId); foreach (Connector conn in connectors) @@ -928,10 +928,9 @@ public static Connector GetConnector(int ownerId, GXYZ connectorOrigin) /// /// the owner ID of the connector /// the connector set which includes all the connectors found - public static ConnectorSet GetConnectors(int ownerId) + public static ConnectorSet GetConnectors(ElementId ownerId) { - Autodesk.Revit.DB.ElementId elementId = new ElementId(ownerId); - Element element = m_document.GetElement(elementId); + Element element = m_document.GetElement(ownerId); return GetConnectors(element); } @@ -1016,8 +1015,8 @@ public static void WriteElement(Element element, bool writeId) { Trace.WriteLine("null"); return; } - int elementId = element.Id.IntegerValue; - int familyId = element.get_Parameter(BuiltInParameter.ELEM_FAMILY_PARAM).AsElementId().IntegerValue; + ElementId elementId = element.Id; + ElementId familyId = element.get_Parameter(BuiltInParameter.ELEM_FAMILY_PARAM).AsElementId(); string familyName = LogUtility.InvalidString; Element objectType = GetElement(element.Document, familyId); string elementName = LogUtility.InvalidString; @@ -1029,13 +1028,13 @@ public static void WriteElement(Element element, bool writeId) if (familyNameParameter != null) familyName = familyNameParameter.AsString(); } - BuiltInCategory category = (BuiltInCategory)(element.get_Parameter(BuiltInParameter.ELEM_CATEGORY_PARAM).AsElementId().IntegerValue); + BuiltInCategory category = element.Category.BuiltInCategory; Trace.WriteLine("Type: " + element.GetType().FullName); Trace.WriteLine("Name: " + familyName + ":" + elementName); - if (writeId) Trace.WriteLine("Id: " + elementId); + if (writeId) Trace.WriteLine("Id: " + elementId.ToString()); Trace.WriteLine("Category: " + category); - Trace.WriteLine("FamilyId: " + familyId); + Trace.WriteLine("FamilyId: " + familyId.ToString()); } /// @@ -1068,10 +1067,9 @@ public static void WriteMechanicalSystem(MechanicalSystem system) /// the owner document of the element /// the id of the element /// the element of the specified type - public static T GetElement(Document document, int eid) where T : Autodesk.Revit.DB.Element + public static T GetElement(Document document, ElementId eid) where T : Autodesk.Revit.DB.Element { - Autodesk.Revit.DB.ElementId elementId = new ElementId(eid); - return document.GetElement(elementId) as T; + return document.GetElement(eid) as T; } /// @@ -1177,9 +1175,9 @@ public static string GetConnectorId(Connector connector) { return "null"; } - int ownerId = connector.Owner.Id.IntegerValue; + ElementId ownerId = connector.Owner.Id; string systemId = InvalidString; - try { systemId = connector.MEPSystem.Id.IntegerValue.ToString(); } + try { systemId = connector.MEPSystem.Id.ToString(); } catch { } object connType = InvalidString; object connDirection = InvalidString; @@ -1213,7 +1211,7 @@ public static string GetConnectorId(Connector connector) break; } return string.Format("[{0}]\t[{1}]\t[{2}]\t[{3}]\t[{4}]\t[{5}]\t[{6}]\t[{7}]\t[{8}]\t", - ownerId, connType, connDirection, connShape, connSize, connLocation, + ownerId.ToString(), connType, connDirection, connShape, connSize, connLocation, connAType, connIsConnected, systemId); } diff --git a/SDK/Samples/AutoTagRooms/CS/AutoTagRooms.csproj b/SDK/Samples/AutoTagRooms/CS/AutoTagRooms.csproj index f5a6b642d..eee39b702 100644 --- a/SDK/Samples/AutoTagRooms/CS/AutoTagRooms.csproj +++ b/SDK/Samples/AutoTagRooms/CS/AutoTagRooms.csproj @@ -29,7 +29,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -39,7 +38,6 @@ prompt 4 true - true @@ -48,8 +46,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -59,8 +56,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AutoTagRooms/CS/AutoTagRoomsForm.cs b/SDK/Samples/AutoTagRooms/CS/AutoTagRoomsForm.cs index bbb976bfd..d07ecd8a3 100644 --- a/SDK/Samples/AutoTagRooms/CS/AutoTagRoomsForm.cs +++ b/SDK/Samples/AutoTagRooms/CS/AutoTagRoomsForm.cs @@ -127,7 +127,7 @@ private void UpdateRoomsList() { Level level = this.levelsComboBox.SelectedItem as Level; - if (tmpRoom.LevelId.IntegerValue == level.Id.IntegerValue) + if (tmpRoom.LevelId == level.Id) { ListViewItem item = new ListViewItem(tmpRoom.Name); diff --git a/SDK/Samples/AutoTagRooms/CS/RoomsData.cs b/SDK/Samples/AutoTagRooms/CS/RoomsData.cs index cec323fd4..cf42acec2 100644 --- a/SDK/Samples/AutoTagRooms/CS/RoomsData.cs +++ b/SDK/Samples/AutoTagRooms/CS/RoomsData.cs @@ -49,7 +49,7 @@ public class RoomsData // Store all the RoomTagTypes List m_roomTagTypes = new List(); // Store the room ID and all the tags which tagged to that room - Dictionary> m_roomWithTags = new Dictionary>(); + Dictionary> m_roomWithTags = new Dictionary>(); /// /// Constructor of RoomsData @@ -111,10 +111,10 @@ private void GetRooms() { Room tmpRoom = document.GetElement(eid) as Room; - if (document.GetElement(tmpRoom.LevelId) != null && m_roomWithTags.ContainsKey(tmpRoom.Id.IntegerValue) == false) + if (document.GetElement(tmpRoom.LevelId) != null && m_roomWithTags.ContainsKey(tmpRoom.Id) == false) { m_rooms.Add(tmpRoom); - m_roomWithTags.Add(tmpRoom.Id.IntegerValue, new List()); + m_roomWithTags.Add(tmpRoom.Id, new List()); } } } @@ -145,9 +145,9 @@ private void GetRoomWithTags() foreach (RoomTag roomTag in roomTags) { - if (m_roomWithTags.ContainsKey(roomTag.Room.Id.IntegerValue)) + if (m_roomWithTags.ContainsKey(roomTag.Room.Id)) { - List tmpList = m_roomWithTags[roomTag.Room.Id.IntegerValue]; + List tmpList = m_roomWithTags[roomTag.Room.Id]; tmpList.Add(roomTag); } } @@ -176,7 +176,7 @@ public void AutoTagRooms(Level level, RoomTagType tagType) RoomTag newTag = m_revit.ActiveUIDocument.Document.Create.NewRoomTag(new LinkElementId(tmpRoom.Id), point, null); newTag.RoomTagType = tagType; - List tagListInTheRoom = m_roomWithTags[newTag.Room.Id.IntegerValue]; + List tagListInTheRoom = m_roomWithTags[newTag.Room.Id]; tagListInTheRoom.Add(newTag); } @@ -193,10 +193,10 @@ public void AutoTagRooms(Level level, RoomTagType tagType) public int GetTagNumber(Room room, RoomTagType tagType) { int count = 0; - List tagListInTheRoom = m_roomWithTags[room.Id.IntegerValue]; + List tagListInTheRoom = m_roomWithTags[room.Id]; foreach (RoomTag roomTag in tagListInTheRoom) { - if (roomTag.RoomTagType.Id.IntegerValue == tagType.Id.IntegerValue) + if (roomTag.RoomTagType.Id == tagType.Id) { count++; } diff --git a/SDK/Samples/AvoidObstruction/CS/AvoidObstruction.csproj b/SDK/Samples/AvoidObstruction/CS/AvoidObstruction.csproj index 8f67bac05..cc51836ad 100644 --- a/SDK/Samples/AvoidObstruction/CS/AvoidObstruction.csproj +++ b/SDK/Samples/AvoidObstruction/CS/AvoidObstruction.csproj @@ -18,7 +18,6 @@ false bin\Debug\ DEBUG;TRACE - pdbonly @@ -26,7 +25,6 @@ bin\Release\ TRACE true - true @@ -34,8 +32,7 @@ DEBUG;TRACE full x64 - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -44,8 +41,7 @@ true pdbonly x64 - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/AvoidObstruction/CS/Resolver.cs b/SDK/Samples/AvoidObstruction/CS/Resolver.cs index ff7d12d30..0341c24d9 100644 --- a/SDK/Samples/AvoidObstruction/CS/Resolver.cs +++ b/SDK/Samples/AvoidObstruction/CS/Resolver.cs @@ -254,7 +254,7 @@ private void Filter(Pipe pipe, List refs) Element curElem = m_rvtDoc.GetElement(cur); if (curElem.Id == pipe.Id || (!(curElem is Pipe) && !(curElem is Duct) && - curElem.Category.Id.IntegerValue != (int)BuiltInCategory.OST_StructuralFraming)) + curElem.Category.BuiltInCategory != BuiltInCategory.OST_StructuralFraming)) { refs.RemoveAt(i); } @@ -522,7 +522,7 @@ private Connector FindConnectedTo(Pipe pipe, Autodesk.Revit.DB.XYZ conXYZ) ConnectorSet connSet = connItself.AllRefs; foreach (Connector conn in connSet) { - if (conn.Owner.Id.IntegerValue != pipe.Id.IntegerValue && + if (conn.Owner.Id != pipe.Id && conn.ConnectorType == ConnectorType.End) { return conn; diff --git a/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.csproj b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.csproj index 77f7e111d..d4838acd4 100644 --- a/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.csproj +++ b/SDK/Samples/BeamAndSlabNewParameter/CS/BeamAndSlabNewParameter.csproj @@ -52,7 +52,6 @@ 4 full prompt - bin\Release\ @@ -76,7 +75,6 @@ 4 none prompt - true @@ -87,8 +85,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -99,8 +96,7 @@ 4096 x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/BoundaryConditions/CS/BoundaryConditions.csproj b/SDK/Samples/BoundaryConditions/CS/BoundaryConditions.csproj index fa688293b..267f2a7d8 100644 --- a/SDK/Samples/BoundaryConditions/CS/BoundaryConditions.csproj +++ b/SDK/Samples/BoundaryConditions/CS/BoundaryConditions.csproj @@ -42,7 +42,6 @@ prompt 4 true - true @@ -61,8 +60,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsData.cs b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsData.cs index d83f6a35d..8f1b517b4 100644 --- a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsData.cs +++ b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsData.cs @@ -49,8 +49,8 @@ public class BoundaryConditionsData // store all the corresponding BCs of the current selected host element // and use the BC Id value as the key - private Dictionary m_bCsDictionary = - new Dictionary(); + private Dictionary m_bCsDictionary = + new Dictionary(); // the object for which the grid in UI displays. private BCProperties m_bCProperties; @@ -88,7 +88,7 @@ public Autodesk.Revit.DB.Element HostElement /// /// get all the BCs correspond with current host /// - public Dictionary BCs + public Dictionary BCs { get { @@ -177,7 +177,7 @@ public bool CreateBoundaryConditions() } // add the created Boundary Conditions into m_bCsDictionary - m_bCsDictionary.Add(NewBC.Id.IntegerValue, NewBC); + m_bCsDictionary.Add(NewBC.Id, NewBC); return true; } @@ -195,84 +195,101 @@ private void SetBCHostMap(Autodesk.Revit.DB.Element element) IEnumerable boundaryConditions = from elem in new FilteredElementCollector(doc).OfClass(typeof(Autodesk.Revit.DB.Structure.BoundaryConditions)).ToElements() let bC = elem as Autodesk.Revit.DB.Structure.BoundaryConditions - where bC != null && m_hostElement.Id.IntegerValue == bC.HostElement.Id.IntegerValue + where bC != null && m_hostElement.Id == bC.HostElementId select bC; foreach (Autodesk.Revit.DB.Structure.BoundaryConditions bC in boundaryConditions) { - m_bCsDictionary.Add(bC.Id.IntegerValue, bC); + m_bCsDictionary.Add(bC.Id, bC); } } - /// - /// Create a new Point BoundaryConditions Element. - /// All the parameter default as Fixed. - /// - /// - /// structural element which provide the analytical line end reference - /// - /// the created Point BoundaryConditions Element - private Autodesk.Revit.DB.Structure.BoundaryConditions CreatePointBC(Autodesk.Revit.DB.Element hostElement) - { - if (!(hostElement is FamilyInstance)) + AnalyticalElement GetAnalyticalElement(Autodesk.Revit.DB.Element element) + { + AnalyticalElement analyticalModel = null; + Document document = element.Document; + AnalyticalToPhysicalAssociationManager assocManager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(document); + if (assocManager != null) + { + ElementId associatedElementId = assocManager.GetAssociatedElementId(element.Id); + if (associatedElementId != ElementId.InvalidElementId) { - return null; + Element associatedElement = document.GetElement(associatedElementId); + if (associatedElement != null && associatedElement is AnalyticalElement) + { + analyticalModel = associatedElement as AnalyticalElement; + } } - - FamilyInstance familyInstance = hostElement as FamilyInstance; - AnalyticalModel analyticalModel = familyInstance.GetAnalyticalModel(); - Reference endReference = null; - - Curve refCurve = analyticalModel.GetCurve(); - if (null != refCurve) - { - - endReference = analyticalModel.GetReference(new AnalyticalModelSelector(refCurve,AnalyticalCurveSelector.EndPoint)); - } - else - { - return null; - } - - Autodesk.Revit.Creation.Document createDoc = hostElement.Document.Create; - - // invoke Document.NewPointBoundaryConditions Method - Autodesk.Revit.DB.Structure.BoundaryConditions createdBC = - createDoc.NewPointBoundaryConditions(endReference, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - return createdBC; - } - - /// - /// Create a new Line BoundaryConditions Element. - /// All the parameter default as Fixed. - /// - /// structural element which provide the hostElementId - /// the created Point BoundaryConditions Element - private Autodesk.Revit.DB.Structure.BoundaryConditions CreateLineBC(Autodesk.Revit.DB.Element hostElement) + } + return analyticalModel; + } + + /// + /// Create a new Point BoundaryConditions Element. + /// All the parameter default as Fixed. + /// + /// + /// structural element which provide the analytical line end reference + /// + /// the created Point BoundaryConditions Element + private Autodesk.Revit.DB.Structure.BoundaryConditions CreatePointBC(Autodesk.Revit.DB.Element hostElement) + { + if (!(hostElement is FamilyInstance)) + { + return null; + } + FamilyInstance familyInstance = hostElement as FamilyInstance; + AnalyticalElement analyticalModel = GetAnalyticalElement(hostElement); + Reference endReference = null; + + Curve refCurve = analyticalModel.GetCurve(); + if (null != refCurve) + { + + endReference = analyticalModel.GetReference(new AnalyticalModelSelector(refCurve, AnalyticalCurveSelector.EndPoint)); + } + else + { + return null; + } + + Autodesk.Revit.Creation.Document createDoc = hostElement.Document.Create; + + // invoke Document.NewPointBoundaryConditions Method + Autodesk.Revit.DB.Structure.BoundaryConditions createdBC = + createDoc.NewPointBoundaryConditions(endReference, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + return createdBC; + } + + /// + /// Create a new Line BoundaryConditions Element. + /// All the parameter default as Fixed. + /// + /// structural element which provide the hostElementId + /// the created Point BoundaryConditions Element + private Autodesk.Revit.DB.Structure.BoundaryConditions CreateLineBC(Autodesk.Revit.DB.Element hostElement) + { + Autodesk.Revit.Creation.Document createDoc = hostElement.Document.Create; + // invoke Document.NewLineBoundaryConditions Method + AnalyticalElement analyticalModel = GetAnalyticalElement(hostElement); + Autodesk.Revit.DB.Structure.BoundaryConditions createdBC = + createDoc.NewLineBoundaryConditions(analyticalModel, 0, 0, 0, 0, 0, 0, 0, 0); + return createdBC; + } + + /// + /// Create a new Area BoundaryConditions Element. + /// All the parameter default as Fixed. + /// + /// structural element which provide the hostElementId + /// the created Point BoundaryConditions Element + private Autodesk.Revit.DB.Structure.BoundaryConditions CreateAreaBC(Autodesk.Revit.DB.Element hostElement) { Autodesk.Revit.Creation.Document createDoc = hostElement.Document.Create; - // invoke Document.NewLineBoundaryConditions Method - Autodesk.Revit.DB.Structure.BoundaryConditions createdBC = - createDoc.NewLineBoundaryConditions(hostElement.GetAnalyticalModel(), 0, 0, 0, 0, 0, 0, 0, 0); - - return createdBC; - } - - /// - /// Create a new Area BoundaryConditions Element. - /// All the parameter default as Fixed. - /// - /// structural element which provide the hostElementId - /// the created Point BoundaryConditions Element - private Autodesk.Revit.DB.Structure.BoundaryConditions CreateAreaBC(Autodesk.Revit.DB.Element hostElement) - { - Autodesk.Revit.Creation.Document createDoc = hostElement.Document.Create; - - // invoke Document.NewAreaBoundaryConditions Method - Autodesk.Revit.DB.Structure.BoundaryConditions createdBC = - createDoc.NewAreaBoundaryConditions(hostElement.GetAnalyticalModel(), 0, 0, 0, 0, 0, 0); - - return createdBC; + // invoke Document.NewAreaBoundaryConditions Method + Autodesk.Revit.DB.Structure.BoundaryConditions createdBC = + createDoc.NewAreaBoundaryConditions(GetAnalyticalElement(hostElement), 0, 0, 0, 0, 0, 0); + return createdBC; } #endregion diff --git a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.cs b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.cs index 84d12c41d..8146471a2 100644 --- a/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.cs +++ b/SDK/Samples/BoundaryConditions/CS/BoundaryConditionsForm.cs @@ -58,7 +58,7 @@ public BoundaryConditionsForm(BoundaryConditionsData dataBuffer) private void BoundaryConditionsForm_Load(object sender, EventArgs e) { // display host element id in the text box - hostTextBox.Text = m_dataBuffer.HostElement.Id.IntegerValue.ToString(); + hostTextBox.Text = m_dataBuffer.HostElement.Id.ToString(); // if the selected element has not a BC, create one and display the default parameter values // else list the BC ids in the combox and display the first BC's parameter values @@ -83,7 +83,7 @@ private void BoundaryConditionsForm_Load(object sender, EventArgs e) // list the boundary conditions Id values to the combobox System.Collections.ICollection bCIdValues = m_dataBuffer.BCs.Keys; - foreach (int bCIdValue in bCIdValues) + foreach (Autodesk.Revit.DB.ElementId bCIdValue in bCIdValues) { bCComboBox.Items.Add(bCIdValue); } @@ -99,7 +99,7 @@ private void BoundaryConditionsForm_Load(object sender, EventArgs e) private void bCComboBox_SelectedIndexChanged(object sender, EventArgs e) { // create a BCProperties instance according to current selected BC Id - m_dataBuffer.BCProperties = new BCProperties(m_dataBuffer.BCs[int.Parse(bCComboBox.Text)]); + m_dataBuffer.BCProperties = new BCProperties(m_dataBuffer.BCs[Autodesk.Revit.DB.ElementId.Parse(bCComboBox.Text)]); // set the display object bCPropertyGrid.SelectedObject = m_dataBuffer.BCProperties; diff --git a/SDK/Samples/BoundaryConditions/CS/Command.cs b/SDK/Samples/BoundaryConditions/CS/Command.cs index f3112bbfa..de66ecb44 100644 --- a/SDK/Samples/BoundaryConditions/CS/Command.cs +++ b/SDK/Samples/BoundaryConditions/CS/Command.cs @@ -25,6 +25,7 @@ using System.Collections.Generic; using System.Text; using System.Windows.Forms; +using System.Linq; using Autodesk.Revit; using Autodesk.Revit.DB; @@ -127,32 +128,44 @@ public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, } } - /// - /// the selected element must be a structural Column/brace/Beam/Wall/Wall Foundation/Slab/Foundation Slab. - /// - /// - private bool IsExpectedElement(Element element) - { - - // judge the element's type. If it is any type of FamilyInstance, Wall, Floor or - // WallFoundation, then get judge if it has a AnalyticalModel. - if (null == element.GetAnalyticalModel()) - { - return false; - } - - FamilyInstance familyInstance = element as FamilyInstance; - if ((null != familyInstance) && (StructuralType.Footing == familyInstance.StructuralType)) - { - return false; // if selected a isolated foundation not create BC - } - - if (element is FamilyInstance || element is Wall || element is Floor || element is WallFoundation) + /// + /// the selected element must be a structural Column/brace/Beam/Wall/Wall Foundation/Slab/Foundation Slab. + /// + /// + private bool IsExpectedElement(Element element) + { + // judge the element's type. If it is any type of FamilyInstance, Wall, Floor or + // WallFoundation, then get judge if it has a AnalyticalModel. + AnalyticalToPhysicalAssociationManager assocManager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(element.Document); + AnalyticalElement elemAnalytical = null; + if (assocManager != null) + { + ElementId associatedElementId = assocManager.GetAssociatedElementId(element.Id); + if (associatedElementId != ElementId.InvalidElementId) { - return true; + Element associatedElement = element.Document.GetElement(associatedElementId); + if (associatedElement != null && associatedElement is AnalyticalElement) + { + elemAnalytical = associatedElement as AnalyticalElement; + } } - + } + if (null == elemAnalytical) + { return false; - } - } + } + FamilyInstance familyInstance = element as FamilyInstance; + if ((null != familyInstance) && (StructuralType.Footing == familyInstance.StructuralType)) + { + return false; // if selected a isolated foundation not create BC + } + + if (element is FamilyInstance || element is Wall || element is Floor || element is WallFoundation) + { + return true; + } + + return false; + } + } } diff --git a/SDK/Samples/BrowseBindings/VB.NET/BrowseBindings.vbproj b/SDK/Samples/BrowseBindings/VB.NET/BrowseBindings.vbproj index eca1285ce..6d7be87a1 100644 --- a/SDK/Samples/BrowseBindings/VB.NET/BrowseBindings.vbproj +++ b/SDK/Samples/BrowseBindings/VB.NET/BrowseBindings.vbproj @@ -65,7 +65,6 @@ 1 42016,42017,42018,42019,42032 full - bin\ @@ -85,7 +84,6 @@ 1 42016,42017,42018,42019,42032 none - true @@ -99,8 +97,7 @@ 42016,42017,42018,42019,42032 full x64 - - + MinimumRecommendedRules.ruleset true @@ -112,8 +109,7 @@ true 42016,42017,42018,42019,42032 x64 - - + MinimumRecommendedRules.ruleset diff --git a/SDK/Samples/CapitalizeAllTextNotes/CS/CapitalizeAllTextNotes.csproj b/SDK/Samples/CapitalizeAllTextNotes/CS/CapitalizeAllTextNotes.csproj index 56b58716c..3d7bf0082 100644 --- a/SDK/Samples/CapitalizeAllTextNotes/CS/CapitalizeAllTextNotes.csproj +++ b/SDK/Samples/CapitalizeAllTextNotes/CS/CapitalizeAllTextNotes.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -30,7 +25,6 @@ 4 true bin\Debug\CapitalizeAllTextNotes.XML - pdbonly @@ -40,7 +34,6 @@ prompt 4 true - true @@ -51,8 +44,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -62,8 +54,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CivilAlignments/CS/CivilAlignments.csproj b/SDK/Samples/CivilAlignments/CS/CivilAlignments.csproj index 64d2bb208..9a02b9376 100644 --- a/SDK/Samples/CivilAlignments/CS/CivilAlignments.csproj +++ b/SDK/Samples/CivilAlignments/CS/CivilAlignments.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -28,7 +23,6 @@ 4 true bin\Debug\CivilAlignments.XML - pdbonly @@ -39,7 +33,6 @@ 4 true bin\Release\CivilAlignments.XML - true @@ -51,7 +44,6 @@ x64 true bin\Debug\CivilAlignments.XML - pdbonly @@ -62,7 +54,6 @@ x64 true bin\Release\CivilAlignments.XML - @@ -90,7 +81,7 @@ --> - OnOutputUpdated + OnOutputUpdated set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" diff --git a/SDK/Samples/CivilAlignments/CS/Command.cs b/SDK/Samples/CivilAlignments/CS/Command.cs index 6dc955870..0210b65c6 100644 --- a/SDK/Samples/CivilAlignments/CS/Command.cs +++ b/SDK/Samples/CivilAlignments/CS/Command.cs @@ -52,7 +52,7 @@ public AlignmentSelectionFilter() { } /// public bool AllowElement(Element element) { - return element.Category.Id.IntegerValue == (int)BuiltInCategory.OST_Alignments; + return element.Category.BuiltInCategory == BuiltInCategory.OST_Alignments; } /// diff --git a/SDK/Samples/CivilAlignments/CS/ReadMe_CivilAlignments.rtf b/SDK/Samples/CivilAlignments/CS/ReadMe_CivilAlignments.rtf index 29e434f9d..d2e08d2f3 100644 --- a/SDK/Samples/CivilAlignments/CS/ReadMe_CivilAlignments.rtf +++ b/SDK/Samples/CivilAlignments/CS/ReadMe_CivilAlignments.rtf @@ -4,14 +4,14 @@ {\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;} {\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} -{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f462\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f463\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\f465\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f466\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f467\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f468\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\f469\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f470\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f472\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f473\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} -{\f475\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f476\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f477\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f478\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} -{\f479\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f480\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f482\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f483\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;} -{\f485\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f486\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f487\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f488\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);} -{\f489\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f490\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f802\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f803\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} -{\f805\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f806\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f809\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f810\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} +{\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);}{\f385\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f386\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} +{\f388\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f389\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f392\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f393\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} {\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} {\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} {\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} @@ -41,39 +41,38 @@ \widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused Normal Table;}{\s15\ql \fi-360\li360\ri0\sa160\sl259\slmult1\widctlpar\jclisttab\tx360\wrapdefault{\*\pn \pnlvlbody\ilvl0\ls2\pnrnot0\pndec }\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin360\itap0\contextualspace \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 \sunhideused \styrsid3556410 List Bullet;}}{\*\listtable{\list\listtemplateid573711002\listsimple{\listlevel\levelnfc23 -\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li360\jclisttab\tx360\lin360 }{\listname ;}\listid-119}{\list\listtemplateid-185189086\listhybrid -{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li1485\lin1485 }{\listlevel\levelnfc23 -\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li2205\lin2205 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 -\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li2925\lin2925 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 -\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li3645\lin3645 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li4365\lin4365 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative -\levelspace360\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li5085\lin5085 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360 -\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \fi-360\li5805\lin5805 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 -{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li6525\lin6525 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext -\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \fi-360\li7245\lin7245 }{\listname ;}\listid949630805}}{\*\listoverridetable{\listoverride\listid-119\listoverridecount0\ls1}{\listoverride\listid-119\listoverridecount0\ls2} -{\listoverride\listid-119\listoverridecount0\ls3}{\listoverride\listid-119\listoverridecount0\ls4}{\listoverride\listid-119\listoverridecount0\ls5}{\listoverride\listid-119\listoverridecount0\ls6}{\listoverride\listid949630805\listoverridecount0\ls7}} -{\*\rsidtbl \rsid82444\rsid1065187\rsid1990421\rsid2048005\rsid3556410\rsid3567140\rsid3951703\rsid5245538\rsid6038639\rsid8342410\rsid9044522\rsid9767054\rsid10646419\rsid12090968\rsid13977229\rsid14438097\rsid14880047\rsid15364761\rsid16473977 -\rsid16586541}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim0}{\info{\operator Mariya Petrova}{\creatim\yr2020\mo5\dy5\hr13\min56}{\revtim\yr2020\mo6\dy16\hr19\min18} -{\version19}{\edmins41}{\nofpages1}{\nofwords365}{\nofchars2086}{\nofcharsws2447}{\vern111}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect +\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360\lin360 }{\listname ;}\listid-119}{\list\listtemplateid-185189086\listhybrid{\listlevel +\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li1485\lin1485 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 +\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li2205\lin2205 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative +\levelspace360\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li2925\lin2925 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0 +{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li3645\lin3645 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext +\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li4365\lin4365 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698693 +\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li5085\lin5085 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;} +\f3\fbias0 \fi-360\li5805\lin5805 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0 \fi-360\li6525\lin6525 } +{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace360\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0 \fi-360\li7245\lin7245 }{\listname ;}\listid949630805}} +{\*\listoverridetable{\listoverride\listid-119\listoverridecount0\ls1}{\listoverride\listid-119\listoverridecount0\ls2}{\listoverride\listid-119\listoverridecount0\ls3}{\listoverride\listid-119\listoverridecount0\ls4}{\listoverride\listid-119 +\listoverridecount0\ls5}{\listoverride\listid-119\listoverridecount0\ls6}{\listoverride\listid-119\listoverridecount0\ls7}{\listoverride\listid949630805\listoverridecount0\ls8}}{\*\rsidtbl \rsid82444\rsid1065187\rsid1990421\rsid2048005\rsid3556410 +\rsid3567140\rsid3951703\rsid5245538\rsid6038639\rsid8342410\rsid9044522\rsid9767054\rsid10646419\rsid12090968\rsid13977229\rsid14438097\rsid14880047\rsid15364761\rsid16014254\rsid16473977\rsid16586541}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0 +\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim0}{\info{\operator Mariya Petrova}{\creatim\yr2020\mo5\dy5\hr13\min56}{\revtim\yr2021\mo4\dy30\hr6\min48}{\version20}{\edmins42}{\nofpages1}{\nofwords365}{\nofchars2086} +{\nofcharsws2447}{\vern23}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect \widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701 -\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale110\rsidroot9767054 \nouicompat \fet0{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1 +\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot9767054 \nouicompat \fet0{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1 \pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5 \pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 CivilAlignments\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 -\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 202}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14438097 \hich\af1\dbch\af31505\loch\f1 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1065187 .0 -}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 202}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14438097 \hich\af1\dbch\af31505\loch\f1 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1065187 .0}{\rtlch\fcs1 -\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Medium\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Elements, Annotation\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 ExternalCommand and ExternalApplication\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Subject:}{ -\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Infrastructure alignments\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 -Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 \line Demonstrates the use of API for finding, property querying and annotating of infrastructure alignment elements.}{\rtlch\fcs1 -\ai\af0\afs20 \ltrch\fcs0 \i\f0\fs20\insrsid6038639\charrsid3567140 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 202}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid16014254 \hich\af1\dbch\af31505\loch\f1 1.1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid6038639\charrsid3567140 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 +\hich\af1\dbch\af31505\loch\f1 202}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid16014254 \hich\af1\dbch\af31505\loch\f1 1.1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 +\b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 +\b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Medium\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 +\b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Elements, Annotation\line }{\rtlch\fcs1 \ab\af1\afs20 +\ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 ExternalCommand and ExternalApplication\line \line }{ +\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Infrastructure alignments +\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 \line +Demonstrates the use of API for finding, property querying and annotating of infrastructure alignment elements.}{\rtlch\fcs1 \ai\af0\afs20 \ltrch\fcs0 \i\f0\fs20\insrsid6038639\charrsid3567140 \par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6038639\charrsid3567140 \par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 \par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid2048005\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Revit.SDK.Samples.CivilAlignments.CS.CivilAlignmentsApp}{ @@ -89,8 +88,8 @@ Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid356 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\insrsid2048005\charrsid3567140 \par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Command.cs \par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0\pararsid13977229 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 It contains the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid2048005\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 command classes, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 -which inherit from interface IExternalCommand and implements the Execute method.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe1033\langnp1036\insrsid6038639\charrsid3567140 +\f1\fs20\insrsid2048005\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 command classes, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 which inh\hich\af1\dbch\af31505\loch\f1 +erit from interface IExternalCommand and implements the Execute method.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe1033\langnp1036\insrsid6038639\charrsid3567140 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\f0\fs20\insrsid6038639\charrsid3567140 \par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6038639\charrsid3567140 @@ -98,8 +97,8 @@ which inherit from interface IExternalCommand and implements the Execute method. \par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid3556410 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3556410\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Places major and minor alignment station label sets along an alignment. \par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3556410\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Displays }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\insrsid82444\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 a summary of }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3556410\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 properties of \hich\af1\dbch\af31505\loch\f1 -the alignment element and its attached alignment station label elements.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 +\f1\fs20\insrsid82444\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 a summary of }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3556410\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 properties of the align\hich\af1\dbch\af31505\loch\f1 +ment element and its attached alignment station label elements.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6038639\charrsid3567140 \par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6038639\charrsid3567140 @@ -120,14 +119,14 @@ the alignment element and its attached alignment station label elements.}{\rtlch \f1\fs20\insrsid1990421\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Pick the alignment}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10646419\charrsid3567140 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \par }\pard \ltrpar\ql \li765\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin765\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 Expected result: }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid16473977 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid8342410 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li1485\ri0\nowidctlpar\wrapdefault\faauto\ls7\rin0\lin1485\itap0\pararsid16473977 {\rtlch\fcs1 +\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid8342410 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li1485\ri0\nowidctlpar\wrapdefault\faauto\ls8\rin0\lin1485\itap0\pararsid16473977 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8342410 \hich\af1\dbch\af31505\loch\f1 M}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1990421\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 ajor and minor alignment station set tags are created. The major station}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10646419\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 s are placed starting at the alignment\hich\f1 \rquote \loch\f1 s displayed start station, e\hich\af1\dbch\af31505\loch\f1 very 100m. The minor stations are placed every 10m for the first 100m.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639 -\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid14880047 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li1485\ri0\nowidctlpar\wrapdefault\faauto\ls7\rin0\lin1485\itap0\pararsid14880047 {\rtlch\fcs1 +\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f3\fs20\insrsid14880047 \loch\af3\dbch\af31505\hich\f3 \'b7\tab}}\pard \ltrpar\ql \fi-360\li1485\ri0\nowidctlpar\wrapdefault\faauto\ls8\rin0\lin1485\itap0\pararsid14880047 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14880047 \hich\af1\dbch\af31505\loch\f1 In plan views, s}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid16473977 \hich\af1\dbch\af31505\loch\f1 ingle alignment station labels are created at every }{\rtlch\fcs1 -\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14880047 \hich\af1\dbch\af31505\loch\f1 start and end of the alignment\loch\af1\dbch\af31505\hich\f1 \rquote \hich\af1\dbch\af31505\loch\f1 s horizontal \hich\af1\dbch\af31505\loch\f1 curve -\hich\af1\dbch\af31505\loch\f1 geometry.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid16473977 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8342410\charrsid14880047 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14880047 \hich\af1\dbch\af31505\loch\f1 start and end of the alignment\hich\f1 \rquote \loch\f1 s horizontal curve geometry.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid16473977 +\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8342410\charrsid14880047 \par }\pard \ltrpar\ql \li765\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin765\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8342410\charrsid3567140 \par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 2.\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10646419\charrsid3567140 \hich\af1\dbch\af31505\loch\f1 \hich\f1 In the Add-ins Tab, launch the \'93\loch\f1 \hich\f1 Show Properties\'94\loch\f1 command}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6038639\charrsid3567140 @@ -195,7 +194,7 @@ faadb081f196af190c6a98242f8467912ab0a651ad6a5a548d8cc3c1aafb6121653923699635d3ca 617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} -{\*\latentstyles\lsdstimax377\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; +{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; \lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; \lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; \lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1; @@ -273,8 +272,8 @@ faadb081f196af190c6a98242f8467912ab0a651ad6a5a548d8cc3c1aafb6121653923699635d3ca \lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; \lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; \lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link Error;}}{\*\datastore 0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore 01050000 +02000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff @@ -283,8 +282,8 @@ fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000002091 -d4603444d601feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c05d +2476c73dd701feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/SDK/Samples/CloudAPISample/CS/CloudAPISample.csproj b/SDK/Samples/CloudAPISample/CS/CloudAPISample.csproj index 15a4cd375..06ac1030f 100644 --- a/SDK/Samples/CloudAPISample/CS/CloudAPISample.csproj +++ b/SDK/Samples/CloudAPISample/CS/CloudAPISample.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -29,7 +24,6 @@ 4 true bin\Debug\CloudAPISample.XML - pdbonly @@ -40,7 +34,6 @@ 4 true bin\Release\CloudAPISample.XML - true @@ -53,7 +46,6 @@ x64 true bin\Debug\CloudAPISample.XML - pdbonly @@ -65,7 +57,6 @@ x64 true bin\Release\CloudAPISample.XML - OnOutputUpdated diff --git a/SDK/Samples/CloudAPISample/CS/ReadMe_CloudAPISample.rtf b/SDK/Samples/CloudAPISample/CS/ReadMe_CloudAPISample.rtf index c6c5f7a1b..9e49fbcba 100644 --- a/SDK/Samples/CloudAPISample/CS/ReadMe_CloudAPISample.rtf +++ b/SDK/Samples/CloudAPISample/CS/ReadMe_CloudAPISample.rtf @@ -1,16 +1,16 @@ -{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1041\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe2052\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} {\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;} {\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} -{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\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);}{\f385\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f386\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} -{\f388\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f389\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f392\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f393\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} -{\f415\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f416\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f418\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f419\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} -{\f420\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\f421\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f422\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f423\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f44\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f45\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f47\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f48\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f49\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f50\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\f51\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f52\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f54\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f55\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} +{\f57\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f58\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f59\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f60\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} +{\f61\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f62\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f384\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f385\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} +{\f387\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f388\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f391\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f392\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} +{\f414\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f415\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f417\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f418\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} +{\f419\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\f420\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f421\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f422\fbidi \fswiss\fcharset163\fprq2 Calibri (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;} @@ -38,10 +38,10 @@ \widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext0 \sqformat \spriority0 Normal;}{\* \cs10 \additive \sunhideused \spriority1 Default Paragraph Font;}{\* \ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1 -\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1041\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1041 \snext11 \ssemihidden \sunhideused -Normal Table;}}{\*\rsidtbl \rsid1866427\rsid2307816\rsid2319408\rsid3947694\rsid4276242\rsid4740325\rsid4742953\rsid5246527\rsid5798294\rsid8796932\rsid9190895\rsid9309740\rsid9579605\rsid12069807\rsid12330875\rsid13064861\rsid14242682\rsid15677956 -\rsid16654583\rsid16666058}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim0}{\info{\author Will Gu}{\operator Mikako Harada}{\creatim\yr2020\mo10\dy28\hr10\min56} -{\revtim\yr2021\mo4\dy8\hr17\min24}{\version10}{\edmins151}{\nofpages2}{\nofwords565}{\nofchars3223}{\nofcharsws3781}{\vern7}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}} +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext11 \ssemihidden \sunhideused +Normal Table;}}{\*\rsidtbl \rsid1866427\rsid2307816\rsid2319408\rsid3947694\rsid4276242\rsid4740325\rsid4742953\rsid5246527\rsid5798294\rsid8796932\rsid9190895\rsid9309740\rsid9579605\rsid12069807\rsid13064861\rsid14242682\rsid15677956\rsid16654583 +\rsid16666058}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim0}{\info{\author Will Gu}{\operator Will Gu}{\creatim\yr2020\mo10\dy28\hr10\min56} +{\revtim\yr2020\mo11\dy3\hr8\min7}{\version9}{\edmins151}{\nofpages2}{\nofwords565}{\nofchars3223}{\nofcharsws3781}{\vern11}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}} \paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect \widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701 \dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot8796932 \nouicompat \fet0{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1 @@ -50,16 +50,14 @@ Normal Table;}}{\*\rsidtbl \rsid1866427\rsid2307816\rsid2319408\rsid3947694\rsid {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 CloudAPISample\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 -\hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 202}{ -\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12330875 \hich\af1\dbch\af31505\loch\f1 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 .0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 -\hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 202}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12330875 \hich\af1\dbch\af31505\loch\f1 2}{\rtlch\fcs1 -\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 .0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 -\hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 High\line }{ -\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Basics\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 -\b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 ExternalApplication\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 -\hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Revit Cloud API Usage Sample\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 -\hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 \line This is a sample helps third party developers understand how to use Revit Cloud API}{\rtlch\fcs1 \ai\af0\afs20 -\ltrch\fcs0 \i\f0\fs20\insrsid3947694 +\hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 2020.0 +\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 2020.0\line }{\rtlch\fcs1 \ab\af1\afs20 +\ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 +\b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 High\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 +\hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Basics\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Type:}{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 ExternalApplication\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Revit Cloud API Usage Sample\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 \line This is a sample helps third party developers understand how to use Revit Cloud API}{\rtlch\fcs1 \ai\af0\afs20 \ltrch\fcs0 \i\f0\fs20\insrsid3947694 \par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid3947694 \par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid3947694 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3947694 \par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid8796932\charrsid8796932 \hich\af1\dbch\af31505\loch\f1 Revit.SDK.Samples.CloudAPISample.CS.Application}{ @@ -180,9 +178,9 @@ Manually download cloud models from anywhere, such as BIM 360 Team via eTransmit \ltrch\fcs0 \f1\fs20\cf19\insrsid16666058\charrsid16666058 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Click \'93\loch\f1 \hich\f1 Configuration\'94\loch\f1 to input target cloud information}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid9579605\charrsid9579605 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 \par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1080\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 \hich\af1\dbch\af31505\loch\f1 b.\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\cf19\insrsid16666058\charrsid16666058 {\*\bkmkstart OLE_LINK1}{\*\bkmkstart OLE_LINK2}\hich\af1\dbch\af31505\loch\f1 \hich\f1 Click \'93\loch\f1 \hich\f1 +\'94\loch\f1 to add rules to the target folder for models with a specific patte -\hich\af1\dbch\af31505\loch\f1 rn. The first rule is assigned the highest priority}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid9579605\charrsid9579605 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 -{\*\bkmkend OLE_LINK1}{\*\bkmkend OLE_LINK2} +\f1\fs20\cf19\insrsid16666058\charrsid16666058 {\*\bkmkstart OLE_LINK1}{\*\bkmkstart OLE_LINK2}\hich\af1\dbch\af31505\loch\f1 \hich\f1 Click \'93\loch\f1 \hich\f1 +\'94\loch\f1 + to add rules to the target folder for models with a specific pattern. The first rule is assigned the highest priority}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid9579605\charrsid9579605 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\cf19\insrsid3947694\charrsid5246527 {\*\bkmkend OLE_LINK1}{\*\bkmkend OLE_LINK2} \par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\tx1080\wrapdefault\faauto\rin0\lin1080\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 \hich\af1\dbch\af31505\loch\f1 c.\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid16666058\charrsid16666058 \hich\af1\dbch\af31505\loch\f1 A model with no matching pattern will be uploaded to the folder specified by the last rule in the list}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid15677956\charrsid15677956 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 @@ -194,9 +192,9 @@ Manually download cloud models from anywhere, such as BIM 360 Team via eTransmit \par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 \hich\af1\dbch\af31505\loch\f1 3.\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid15677956\charrsid15677956 \hich\af1\dbch\af31505\loch\f1 Step 3. Upload}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 \par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\tx1080\wrapdefault\faauto\rin0\lin1080\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 \hich\af1\dbch\af31505\loch\f1 a.\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\f1\fs20\cf19\insrsid16666058\charrsid16666058 \hich\af1\dbch\af31505\loch\f1 Ensure you are logged in to your Autodesk Account}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 . +\f1\fs20\cf19\insrsid16666058\charrsid16666058 \hich\af1\dbch\af31505\loch\f1 Ensure you are log\hich\af1\dbch\af31505\loch\f1 ged in to your Autodesk Account}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 . \par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1080\itap0\pararsid15677956 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 \hich\af1\dbch\af31505\loch\f1 b.\tab }{\rtlch\fcs1 \af1\afs20 -\ltrch\fcs0 \f1\fs20\cf19\insrsid16666058\charrsid16666058 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Click \'93\loch\f1 \hich\f1 Upload\'94\hich\af1\dbch\af31505\loch\f1 to upload models to the target cloud folder}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\ltrch\fcs0 \f1\fs20\cf19\insrsid16666058\charrsid16666058 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Click \'93\loch\f1 \hich\f1 Upload\'94\loch\f1 to upload models to the target cloud folder}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid5246527 .}{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\cf19\insrsid3947694\charrsid5246527 \par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid15677956 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid3947694\charrsid4740325 \hich\af1\dbch\af31505\loch\f1 Expected result: }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid4740325 \hich\af1\dbch\af31505\loch\f1 All models in destination folder have been uploaded to target }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid4742953 \hich\af1\dbch\af31505\loch\f1 location}{\rtlch\fcs1 @@ -206,8 +204,8 @@ Manually download cloud models from anywhere, such as BIM 360 Team via eTransmit \f1\fs20\cf19\insrsid15677956\charrsid5246527 .\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid15677956\charrsid15677956 \hich\af1\dbch\af31505\loch\f1 Step 4. Reload linked models}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid15677956 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid15677956\charrsid5246527 \par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\tx1080\wrapdefault\faauto\rin0\lin1080\itap0\pararsid4742953 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid15677956\charrsid5246527 \hich\af1\dbch\af31505\loch\f1 a.\tab }{\rtlch\fcs1 \af1\afs20 -\ltrch\fcs0 \f1\fs20\cf19\insrsid16666058\charrsid16666058 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Click \'93\loch\f1 \hich\f1 Refresh\'94\hich\af1\dbch\af31505\loch\f1 to direct links to the correct model in the cloud}{\rtlch\fcs1 \af1\afs20 -\ltrch\fcs0 \f1\fs20\cf19\insrsid15677956\charrsid5246527 .}{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\cf19\insrsid15677956\charrsid5246527 +\ltrch\fcs0 \f1\fs20\cf19\insrsid16666058\charrsid16666058 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Click \'93\loch\f1 \hich\f1 Refresh\'94\loch\f1 to direct links to the correct model in the cloud}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\cf19\insrsid15677956\charrsid5246527 .}{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\cf19\insrsid15677956\charrsid5246527 \par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0\pararsid15677956 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid15677956\charrsid4740325 \hich\af1\dbch\af31505\loch\f1 Expected result: }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid4740325 \hich\af1\dbch\af31505\loch\f1 All link data of models uploaded to target project has pointed to correct cloud model.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf19\insrsid15677956\charrsid4740325 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\ul\cf19\insrsid15677956\charrsid4740325 @@ -357,8 +355,8 @@ fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c090 -019fbd2cd701feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000e0fd +734f75b1d601feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/SDK/Samples/ColorFill/CS/ColorFill.csproj b/SDK/Samples/ColorFill/CS/ColorFill.csproj index da742f02a..9f5121aeb 100644 --- a/SDK/Samples/ColorFill/CS/ColorFill.csproj +++ b/SDK/Samples/ColorFill/CS/ColorFill.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -28,7 +23,6 @@ 4 true bin\Debug\ColorFill.XML - pdbonly @@ -39,7 +33,6 @@ 4 true bin\Release\ColorFill.XML - true @@ -52,7 +45,6 @@ x64 true bin\Debug\ColorFill.XML - pdbonly @@ -64,7 +56,6 @@ x64 true bin\Release\ColorFill.XML - OnOutputUpdated diff --git a/SDK/Samples/CompoundStructure/CS/CompoundStructure.csproj b/SDK/Samples/CompoundStructure/CS/CompoundStructure.csproj index 6cbd2a18c..c3195b176 100644 --- a/SDK/Samples/CompoundStructure/CS/CompoundStructure.csproj +++ b/SDK/Samples/CompoundStructure/CS/CompoundStructure.csproj @@ -27,8 +27,7 @@ DEBUG;TRACE prompt 4 - - + AllRules.ruleset false @@ -40,8 +39,7 @@ TRACE prompt 4 - - + AllRules.ruleset true @@ -51,8 +49,7 @@ full x64 prompt - - + AllRules.ruleset bin\x64\Release\ @@ -62,8 +59,7 @@ pdbonly x64 prompt - - + AllRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/AddAssociation.cs b/SDK/Samples/ContextualAnalyticalModel/CS/AddAssociation.cs new file mode 100644 index 000000000..898e5c6c2 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/AddAssociation.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; +using Autodesk.Revit.UI.Selection; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// Adds new relation between physical and analytical elements using AnalyticalToPhysicalAssociationManager + /// The relation can be between multiple physical and analytical elements + /// AnalyticalToPhysicalAssociationManager can work with Revit linked files also + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class AddAssociation : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + UIDocument activeDoc = commandData.Application.ActiveUIDocument; + Autodesk.Revit.DB.Document doc = activeDoc.Document; + + if (null == doc) + { + return Result.Failed; + } + + using (Transaction trans = new Transaction(doc, "Revit.SDK.Samples.AddRelationBetweenPhysicalAndAnalyticalElements")) + { + trans.Start(); + + ElementId analyticalElementId = ContextualAnalyticalModel.Utilities.GetSelectedObject(activeDoc, "Please select analytical element"); + ElementId physicalElementId = ContextualAnalyticalModel.Utilities.GetSelectedObject(activeDoc, "Please select physical element"); + + //gets the AnalyticalToPhysicalAssociationManager for the current document + AnalyticalToPhysicalAssociationManager analyticalToPhysicalmanager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(doc); + if (analyticalToPhysicalmanager == null) + return Result.Failed; + + //creates a new relation between physical and analytical selected elements + analyticalToPhysicalmanager.AddAssociation(analyticalElementId, physicalElementId); + + trans.Commit(); + } + return Result.Succeeded; + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/AnalyticalNodeConnStatus.cs b/SDK/Samples/ContextualAnalyticalModel/CS/AnalyticalNodeConnStatus.cs new file mode 100644 index 000000000..f3b287f96 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/AnalyticalNodeConnStatus.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + class AnalyticalNodeConnStatus : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + try + { + UIDocument uiDoc = commandData.Application.ActiveUIDocument; + Document document = uiDoc.Document; + + Reference refNode = uiDoc.Selection.PickObject(Autodesk.Revit.UI.Selection.ObjectType.Element, "Please select an Anlytical Node"); + if(refNode != null) + { + Element analyticalNode = document.GetElement(refNode.ElementId); + if (analyticalNode == null) + return Result.Failed; + + AnalyticalNodeData analyticalNodeData = AnalyticalNodeData.GetAnalyticalNodeData(analyticalNode); + + AnalyticalNodeConnectionStatus nodeStatus; + if(analyticalNodeData != null) + { + nodeStatus = analyticalNodeData.GetConnectionStatus(); + } + } + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + + return Result.Succeeded; + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.addin b/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.addin new file mode 100644 index 000000000..82b59f8a9 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.addin @@ -0,0 +1,163 @@ + + + + ContextualAnalyticalModel.dll + 531288f9-d2f4-4bf3-b8ef-37b9930b9451 + ContextualAnalyticalModel.CreateAnalyticalMember + Create Analytical Member + Create Analytical Member + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + D420238C-220D-449B-858F-399E6CFCEEF4 + ContextualAnalyticalModel.CreateAnalyticalPanel + Create Analytical Panel + Create Analytical Panel + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + AD26D09A-CD39-4CC2-B39A-8F5987B90E30 + ContextualAnalyticalModel.AddRelation + Add relation + Add relation + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + 6FE81B1D-4487-440D-8FD5-780ACF0C79EC + ContextualAnalyticalModel.UpdateRelation + Update relation + Update relation + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + F4C8C845-CF15-4778-AD8D-E1D6A5CDFACA + ContextualAnalyticalModel.BreakRelation + Break relation + Break relation + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + 3CB69222-D61C-4F4E-B371-4077A19AC6C6 + ContextualAnalyticalModel.ModifyPanelContour + Modify Panel Contour + Modify Panel Contour + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + 7C11F75C-3DFD-419A-9354-C23DA1143E11 + ContextualAnalyticalModel.MoveAnalyticalPanelUsingElementTransformUtils + Move an Analytical Panel using ElementTransformUtils + Move an Analytical Panel using ElementTransformUtils while keeping connectivity + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + 427DF7AC-6070-42CA-9668-96CCA02EF390 + ContextualAnalyticalModel.MoveAnalyticalPanelUsingSketchEditScope + Move an Analytical Panel using SketchEditScope + Move an Analytical Panel using SketchEditScope loosing connectivity + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + 348F60B5-4435-416C-AD9C-6CF645A84E10 + ContextualAnalyticalModel.MoveAnalyticalMemberUsingElementTransformUtils + Move an Analytical Member using UsingElementTransformUtils + Move an Analytical Member using UsingElementTransformUtils keeping connectivity + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + A838E5C0-2784-4A1E-B13C-292A90487CB1 + ContextualAnalyticalModel.MoveAnalyticalMemberUsingSetCurve + Move an Analytical Member using SketchEditScope + Move an Analytical Member using SetCurve loosing connectivity + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + DD4A5DD5-0996-4AE3-BDEC-71BCD5C69D4B + ContextualAnalyticalModel.MoveAnalyticalNodeUsingElementTransformUtils + Move an Analytical Node using ElementTransformUtils + Move an Analytical Node using ElementTransformUtils keeping connectivity + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + 6D4B2523-8CF1-4CF3-B1FC-A4FE7CE2AD52 + ContextualAnalyticalModel.FlipAnalyticalMember + Flip Analytical Member + Flips an Analytical Member + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + 97BB81DB-68A9-49FD-9DEC-B520C04CD040 + ContextualAnalyticalModel.AnalyticalNodeConnStatus + Check Connection Status + Check Connection Status + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + 9C27E4FB-5E44-43C3-B328-64A0575DF39E + ContextualAnalyticalModel.MemberForcesAnalyticalMember + Member Forces Analytical Member + Member Forces Analytical Member + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + CDC11F78-7180-4CCD-9081-71326A2CB013 + ContextualAnalyticalModel.ReleaseConditionsAnalyticalMember + Release Conditions Analytical Member + Release Conditions Analytical Member + AlwaysVisible + Unknown + ADSK + + + ContextualAnalyticalModel.dll + 691A391D-493F-44C5-BC2E-C4ED52C11EC2 + ContextualAnalyticalModel.SetOuterContourForPanels + Sets OuterContour for Analytical Panels + Sets OuterContour for Analytical Panels + AlwaysVisible + Unknown + ADSK + + diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.csproj b/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.csproj new file mode 100644 index 000000000..941545f3c --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/ContextualAnalyticalModel.csproj @@ -0,0 +1,118 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {C9E4D1DC-6FA6-490A-8C6B-4A7D54569E45} + Library + Properties + ContextualAnalyticalModel + ContextualAnalyticalModel + v4.8 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + bin\Debug\ContextualAnalyticalModel.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + bin\Release\ContextualAnalyticalModel.XML + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x64 + true + bin\Debug\ContextualAnalyticalModel.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x64 + true + bin\Release\ContextualAnalyticalModel.XML + + + OnOutputUpdated + + + + ..\..\..\..\..\..\Debugx64\RevitAddInUtility.dll + False + + + ..\..\..\..\..\..\Debugx64\RevitAPI.dll + False + + + ..\..\..\..\..\..\Debugx64\RevitAPIUI.dll + False + + + + + + + + + 4.7 + + + + + + + + + + + + + + + + + + + + + + + + + set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl" +if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)" + + \ No newline at end of file diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/CreateAnalytcalPanel.cs b/SDK/Samples/ContextualAnalyticalModel/CS/CreateAnalytcalPanel.cs new file mode 100644 index 000000000..31412b55d --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/CreateAnalytcalPanel.cs @@ -0,0 +1,154 @@ +// +// (C) Copyright 2003-2021 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.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class CreateAnalyticalPanel : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + try + { + Document document = commandData.Application.ActiveUIDocument.Document; + + //create analytical panel + AnalyticalPanel analyticalPanel = CreateAMPanel(document); + if(analyticalPanel != null) + { + //create analytical opening on the panel we've just created + CreateAMOpening(document, analyticalPanel.Id); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + + /// + /// Creates an Analytiocal Panel + /// + /// Revit documenr + /// + public static AnalyticalPanel CreateAMPanel(Document revitDoc) + { + AnalyticalPanel analyticalPanel = null; + using (Transaction transaction = new Transaction(revitDoc, "Create Analytical Panel")) + { + transaction.Start(); + + //create curveloop which will be assigned to the analytical panel + CurveLoop profileloop = new CurveLoop(); + profileloop.Append(Line.CreateBound( + new XYZ(0, 0, 0), new XYZ(5, 0, 0))); + profileloop.Append(Line.CreateBound( + new XYZ(5, 0, 0), new XYZ(5, 5, 0))); + profileloop.Append(Line.CreateBound( + new XYZ(5, 5, 0), new XYZ(0, 5, 0))); + profileloop.Append(Line.CreateBound( + new XYZ(0, 5, 0), new XYZ(0, 0, 0))); + + //create the AnalyticalPanel + analyticalPanel = AnalyticalPanel.Create(revitDoc, profileloop); + + analyticalPanel.StructuralRole = AnalyticalStructuralRole.StructuralRoleFloor; + analyticalPanel.AnalyzeAs = AnalyzeAs.SlabOneWay; + + transaction.Commit(); + } + + return analyticalPanel; + } + + /// + /// creates an AnalyticalOpening element which will be placed on the AnalyticalPanel + /// with id = panelId + /// + public static AnalyticalOpening CreateAMOpening(Document revitDoc, ElementId panelId) + { + if (panelId == ElementId.InvalidElementId) + return null; + + AnalyticalOpening opening = null; + + using (Transaction transaction = new Transaction(revitDoc, "Create Analytical Opening")) + { + transaction.Start(); + + //create the curveLoop for the AnalyticalOpening element + CurveLoop profileloop = new CurveLoop(); + profileloop.Append(Line.CreateBound( + new XYZ(1, 1, 0), new XYZ(2, 1, 0))); + profileloop.Append(Line.CreateBound( + new XYZ(2, 1, 0), new XYZ(2, 2, 0))); + profileloop.Append(Line.CreateBound( + new XYZ(2, 2, 0), new XYZ(-1, 2, 0))); + profileloop.Append(Line.CreateBound( + new XYZ(-1, 2, 0), new XYZ(1, 1, 0))); + + if (AnalyticalOpening.IsCurveLoopValidForAnalyticalOpening(profileloop, revitDoc, panelId)) + { + //create the AnalyticalOpening + opening = AnalyticalOpening.Create(revitDoc, profileloop, panelId); + } + + transaction.Commit(); + } + return opening; + } + } +} + diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/CreateAnalyticalMember.cs b/SDK/Samples/ContextualAnalyticalModel/CS/CreateAnalyticalMember.cs new file mode 100644 index 000000000..52797badb --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/CreateAnalyticalMember.cs @@ -0,0 +1,139 @@ +// +// (C) Copyright 2003-2021 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.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class CreateAnalyticalMember : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + try + { + Document document = commandData.Application.ActiveUIDocument.Document; + CreateMember(document); + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + + /// + /// Creates an Analytical Member + /// + /// + /// + public static AnalyticalMember CreateMember(Document document) + { + AnalyticalMember analyticalMember = null; + //start Transaction + using (Transaction transaction = new Transaction(document, "Create Analytical Member")) + { + transaction.Start(); + + analyticalMember = CreateAnalyticalMemberFromEndpoints(document, new XYZ(-5, 0, 0), new XYZ(0, 0, 0)); + + transaction.Commit(); + } + return analyticalMember; + } + + /// + /// Creates another Analytical Member convergent with the one above + /// + /// + /// + public static AnalyticalMember CreateConvergentMember(Document document) + { + AnalyticalMember analyticalMember = null; + //start Transaction + using (Transaction transaction = new Transaction(document, "Create Convergent Analytical Member")) + { + transaction.Start(); + + analyticalMember = CreateAnalyticalMemberFromEndpoints(document, new XYZ(0, 0, 0), new XYZ(-5, 5, 0)); + + transaction.Commit(); + + } + return analyticalMember; + } + + /// + /// Creates a new Analytical Member in the Document using the endpoints start and end. + /// Optionally the Structural Role can be specified + /// + /// + /// + /// + /// + private static AnalyticalMember CreateAnalyticalMemberFromEndpoints(Document doc, XYZ start, XYZ end) + { + AnalyticalMember analyticalMember = null; + + //create curve which will be assigned to the analytical member + Line line = Line.CreateBound(start, end); + + //create the AnalyticalMember + analyticalMember = AnalyticalMember.Create(doc, line); + + analyticalMember.StructuralRole = AnalyticalStructuralRole.StructuralRoleBeam; + analyticalMember.AnalyzeAs = AnalyzeAs.Lateral; + + return analyticalMember; + } + } +} + diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/FlipAnalyticalMember.cs b/SDK/Samples/ContextualAnalyticalModel/CS/FlipAnalyticalMember.cs new file mode 100644 index 000000000..751fee13d --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/FlipAnalyticalMember.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class FlipAnalyticalMember : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + //Expected results: The Analytical Member is flipped, you can observe the IDs of the end nodes + try + { + // Get the Document + Document document = commandData.Application.ActiveUIDocument.Document; + + // Create an Analytical Member + AnalyticalMember analyticalMember = CreateAnalyticalMember.CreateMember(document); + + // Start transaction + using (Transaction transaction = new Transaction(document, "Flip Analytical Member")) + { + transaction.Start(); + // Flip the Analytical Member + analyticalMember.FlipCurve(); + transaction.Commit(); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/MemberForcesAnalyticalMember.cs b/SDK/Samples/ContextualAnalyticalModel/CS/MemberForcesAnalyticalMember.cs new file mode 100644 index 000000000..b9fedf468 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/MemberForcesAnalyticalMember.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class MemberForcesAnalyticalMember : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + try + { + // Get the Document + Document document = commandData.Application.ActiveUIDocument.Document; + + // Create an Analytical Member + AnalyticalMember analyticalMember = CreateAnalyticalMember.CreateMember(document); + + // Start transaction + using (Transaction transaction = new Transaction(document, "Member Forces")) + { + transaction.Start(); + + // Get member forces of analytical member + IList memberForces = analyticalMember.GetMemberForces(); + foreach(MemberForces mf in memberForces) + { + Console.WriteLine("Position: " + mf.Start + "Force: " + mf.Force.ToString() + "Moment: " + mf.Moment.ToString()); + } + + // Change some values + analyticalMember.SetMemberForces(true, new XYZ(10000, 5000, 0), new XYZ(0, 0, 0)); + analyticalMember.SetMemberForces(new MemberForces(false, new XYZ(5000, 5000, 5000), new XYZ(10000, 10000, 10000))); + + transaction.Commit(); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/ModifyPanelContour.cs b/SDK/Samples/ContextualAnalyticalModel/CS/ModifyPanelContour.cs new file mode 100644 index 000000000..b38c8b466 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/ModifyPanelContour.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the interface IFailuresPreprocessor + /// + public class FailurePreproccessor : IFailuresPreprocessor + { + /// + /// This method is called when there have been failures found at the end of a transaction and Revit is about to start processing them. + /// + /// The Interface class that provides access to the failure information. + /// + public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor) + { + return FailureProcessingResult.Continue; + } + } + + /// + /// Implements the Revit add-in interface IExternalCommand + /// Modify Analytical Panel contour using SketchEditScope + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + class ModifyPanelContour : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + try + { + Document document = commandData.Application.ActiveUIDocument.Document; + + //create analytical panel + AnalyticalPanel analyticalPanel = CreateAnalyticalPanel.CreateAMPanel(document); + if (analyticalPanel != null) + { + // Start a sketch edit scope + SketchEditScope sketchEditScope = new SketchEditScope(document, "Replace line with an arc"); + sketchEditScope.StartWithNewSketch(analyticalPanel.Id); + + using (Transaction transaction = new Transaction(document, "Modify sketch")) + { + transaction.Start(); + + //replace a boundary line with an arc + Line line = null; + Sketch sketch = document.GetElement(analyticalPanel.SketchId) as Sketch; + if (sketch != null) + { + foreach (CurveArray curveArray in sketch.Profile) + { + foreach (Curve curve in curveArray) + { + line = curve as Line; + if (line != null) + { + break; + } + } + if (line != null) + { + break; + } + } + } + + // Create arc + XYZ normal = line.Direction.CrossProduct(XYZ.BasisZ).Normalize().Negate(); + XYZ middle = line.GetEndPoint(0).Add(line.Direction.Multiply(line.Length / 2)); + Curve arc = Arc.Create(line.GetEndPoint(0), line.GetEndPoint(1), middle.Add(normal.Multiply(20))); + + // Remove element referenced by the found line. + document.Delete(line.Reference.ElementId); + + // Model curve creation automatically puts the curve into the sketch, if sketch edit scope is running. + document.Create.NewModelCurve(arc, sketch.SketchPlane); + + transaction.Commit(); + } + + sketchEditScope.Commit(new FailurePreproccessor()); + + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalMemberUsingElementTransformUtils.cs b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalMemberUsingElementTransformUtils.cs new file mode 100644 index 000000000..64660460d --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalMemberUsingElementTransformUtils.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class MoveAnalyticalMemberUsingElementTransformUtils : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + // Expected results: the first Analytical Member has been moved and the connection with the second Analytical Member was kept + try + { + // Get the document + Document document = commandData.Application.ActiveUIDocument.Document; + + // Create the first Analytical Member + AnalyticalMember analyticalMember = CreateAnalyticalMember.CreateMember(document); + + // Create the second Analytical Member that is convergent with the first one + AnalyticalMember convergentAnalyticalMember = CreateAnalyticalMember.CreateConvergentMember(document); + + + // Move the first Analytical Member using ElementTransformUtils + using (Transaction transaction = new Transaction(document, "Move member with ElementTransformUtils")) + { + transaction.Start(); + + ElementTransformUtils.MoveElement(document, analyticalMember.Id, new XYZ(15, 0, 0)); + + transaction.Commit(); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalMemberUsingSetCurve.cs b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalMemberUsingSetCurve.cs new file mode 100644 index 000000000..674314405 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalMemberUsingSetCurve.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class MoveAnalyticalMemberUsingSetCurve : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + //Expected results: The first Analytical Member has been moved and the connection with the second Analytical Member was lost + try + { + // Get the document + Document document = commandData.Application.ActiveUIDocument.Document; + + // Create the first Analytical Member + AnalyticalMember analyticalMember = CreateAnalyticalMember.CreateMember(document); + + // Create the second Analytical Member + AnalyticalMember convergentAnalyticalMember = CreateAnalyticalMember.CreateConvergentMember(document); + + // Start transaction + using (Transaction transaction = new Transaction(document, "Offset member")) + { + transaction.Start(); + + // Get the original curve and it's ends + Curve originalCurve = analyticalMember.GetCurve(); + XYZ originalCurveStart = originalCurve.GetEndPoint(0); + XYZ originalCurveEnd = originalCurve.GetEndPoint(1); + + // Create new start and end with offset value + double offset = 15; + XYZ newLineStart = new XYZ(originalCurveStart.X + offset, 0, 0); + XYZ newLineEnd = new XYZ(originalCurveEnd.X + offset, 0, 0); + + // Create a new bounded line using the previous coordiantes + Line line = Line.CreateBound(newLineStart, newLineEnd); + + // Set the member's curve to the newly created line + analyticalMember.SetCurve(line); + + transaction.Commit(); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalNodeUsingElementTransformUtils.cs b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalNodeUsingElementTransformUtils.cs new file mode 100644 index 000000000..acfaf4ac9 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalNodeUsingElementTransformUtils.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; +using Autodesk.Revit.UI.Selection; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class MoveAnalyticalNodeUsingElementTransformUtils : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + //Expected results: The Analytical Node has been moved and the connection has been kept + try + { + // Get the Document + UIDocument activeDoc = commandData.Application.ActiveUIDocument; + Autodesk.Revit.DB.Document document = activeDoc.Document; + + // Create Analytical Panel + AnalyticalPanel analyticalPanel = CreateAnalyticalPanel.CreateAMPanel(document); + + // Create the connected Analytical Member + AnalyticalMember analyticalMember = CreateAnalyticalMember.CreateMember(document); + + // Select the node + Reference eRef = activeDoc.Selection.PickObject(ObjectType.PointOnElement , "Select an Analytical Node"); + + // Move the Analytical Panel using ElementTransformUtils + using (Transaction transaction = new Transaction(document, "Move panel with ElementTransformUtils")) + { + transaction.Start(); + ElementTransformUtils.MoveElement(document, eRef.ElementId, new XYZ(-5, -5, 0)); + transaction.Commit(); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalPanelUsingElementTransformUtils.cs b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalPanelUsingElementTransformUtils.cs new file mode 100644 index 000000000..7d2ed84b1 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalPanelUsingElementTransformUtils.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class MoveAnalyticalPanelUsingElementTransformUtils : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + //Expected results: The Analytical Panel has been moved and the connection with the Analytical Member was kept + try + { + // Get the Document + Document document = commandData.Application.ActiveUIDocument.Document; + + // Create Analytical Panel + AnalyticalPanel analyticalPanel = CreateAnalyticalPanel.CreateAMPanel(document); + + // Create an Analytical Member connected with the Analytical Panel above + AnalyticalMember analyticalMember = CreateAnalyticalMember.CreateMember(document); + + // Move the Analytical Panel using ElementTransformUtils + using (Transaction transaction = new Transaction(document, "Move panel with ElementTransformUtils")) + { + transaction.Start(); + ElementTransformUtils.MoveElement(document, analyticalPanel.Id, new XYZ(5, 5, 0)); + transaction.Commit(); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalPanelUsingSketchEditScope.cs b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalPanelUsingSketchEditScope.cs new file mode 100644 index 000000000..59742344a --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/MoveAnalyticalPanelUsingSketchEditScope.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class MoveAnalyticalPanelUsingSketchEditScope : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + //Expected results: the Analytical Panel has been moved and the connection with the Analytical Member has been broken + try + { + //Get the Document + Document document = commandData.Application.ActiveUIDocument.Document; + + // Create Analytical Panel + AnalyticalPanel analyticalPanel = CreateAnalyticalPanel.CreateAMPanel(document); + + // Create an Analytical Member connected with the Analytical Panel above + AnalyticalMember analyticalMember = CreateAnalyticalMember.CreateMember(document); + + // Move the Analytical Panel using SketchEditScope + SketchEditScope sketchEditScope = new SketchEditScope(document, "Move panel with SketchEditScope"); + sketchEditScope.StartWithNewSketch(analyticalPanel.Id); + + // Start transaction + using (Transaction transaction = new Transaction(document, "Offset panel")) + { + transaction.Start(); + + // Get Sketch + if (document.GetElement(analyticalPanel.SketchId) is Sketch sketch) + { + foreach (CurveArray curveArray in sketch.Profile) + { + // Iterate through the Curves forming the Analytical Panel and + // create new ones with a slight offset from the original ones before deleting them + foreach (Curve curve in curveArray) + { + Line line = curve as Line; + if (line != null) + { + // Create new offseted Start and End points from the original line coordinates + double offset = 5.0; + XYZ newLineStart = new XYZ(line.GetEndPoint(0).X + offset, line.GetEndPoint(0).Y + offset, 0); + XYZ newLineEnd = new XYZ(line.GetEndPoint(1).X + offset, line.GetEndPoint(1).Y + offset, 0); + + // Define the new line with offseted coordinates + Curve offsetedLine = Line.CreateBound(newLineStart, newLineEnd); + + // Remove the old line + document.Delete(line.Reference.ElementId); + + // Create the new line + document.Create.NewModelCurve(offsetedLine, sketch.SketchPlane); + } + } + } + } + transaction.Commit(); + } + sketchEditScope.Commit(new FailurePreproccessor()); + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/Properties/AssemblyInfo.cs b/SDK/Samples/ContextualAnalyticalModel/CS/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..d57d65138 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("ContextualAnalyticalModel")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ContextualAnalyticalModel")] +[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2021")] +[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("c9e4d1dc-6fa6-490a-8c6b-4a7d54569e45")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/ReadMe_ContextualAnalyticalModel.rtf b/SDK/Samples/ContextualAnalyticalModel/CS/ReadMe_ContextualAnalyticalModel.rtf new file mode 100644 index 000000000..0e768d519 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/ReadMe_ContextualAnalyticalModel.rtf @@ -0,0 +1,287 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;} +{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f43\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f44\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f46\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f47\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f48\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f49\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\f50\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f51\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f53\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f54\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} +{\f56\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f57\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f58\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f59\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} +{\f60\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f61\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f383\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f384\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} +{\f386\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f387\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f390\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f391\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} +{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;} +{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);} +{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);} +{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} +{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} +{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; +\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap +\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 +\af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa160\sl259\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused +Normal Table;}}{\*\rsidtbl \rsid679888\rsid1531095\rsid1919838\rsid3154410\rsid3551054\rsid3940002\rsid4336073\rsid5122316\rsid5643312\rsid6956184\rsid7088339\rsid7295827\rsid7407153\rsid9381469\rsid9641236\rsid10178750\rsid10699490\rsid10884090 +\rsid11877210\rsid12867357\rsid13193745\rsid13371909\rsid13466388\rsid13904977\rsid14619581\rsid14623580}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim0}{\info +{\operator Claudiu Ispas}{\creatim\yr2021\mo6\dy17\hr9\min30}{\revtim\yr2021\mo10\dy26\hr17\min11}{\version22}{\edmins56}{\nofpages2}{\nofwords455}{\nofchars2598}{\nofcharsws3047}{\vern21}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/200 +3/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect +\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701 +\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot1531095 \nouicompat \fet0{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1 +\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5 +\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\fs22\lang1033\langfe1033\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 ContextualAnalyticalModel\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Structure\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 +\hich\af1\dbch\af31505\loch\f1 202}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1919838 \hich\af1\dbch\af31505\loch\f1 3}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 .0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 +\b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 202}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1919838 +\hich\af1\dbch\af31505\loch\f1 3}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 .0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 +\hich\af1\dbch\af31505\loch\f1 Medium\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 + Geometry, Elements, Structure, UI\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 ExternalCommand +\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Contextual Analytical Model\line }{ +\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 \line Contextual Analytical Model}{\rtlch\fcs1 +\ai\af0\afs20 \ltrch\fcs0 \i\f0\fs20\insrsid9641236 +\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid9641236 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1531095 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 +\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095 +\par }\pard \ltrpar\ql \fi360\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1531095 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095\charrsid5643312 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.IExternalCommand +\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid1531095 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095\charrsid5643312 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Structure.}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095 \hich\af1\dbch\af31505\loch\f1 AnalyticalMember}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095\charrsid5643312 +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.\hich\af1\dbch\af31505\loch\f1 Revit.DB.Structure.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095 \hich\af1\dbch\af31505\loch\f1 AnalyticalPanel}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid1531095\charrsid5643312 +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Structure.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095 \hich\af1\dbch\af31505\loch\f1 AnalyticalOpening}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095\charrsid5643312 +\par }\pard \ltrpar\ql \fi360\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1531095 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095\charrsid5643312 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Transaction +\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0\pararsid1531095 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1531095\charrsid5643312 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Element +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.ElementId +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Reference +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe1033\langnp1036\insrsid1531095\charrsid9381469 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Document}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\lang1036\langfe1033\langnp1036\insrsid1531095 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe1033\langnp1036\insrsid1531095\charrsid5122316 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.Events}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\lang1036\langfe1033\langnp1036\insrsid1531095\charrsid9381469 +\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.UIDocument +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid1531095 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe1033\langnp1036\insrsid9641236 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 +\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\insrsid9641236 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13193745 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13193745\charrsid13193745 \hich\af1\dbch\af31505\loch\f1 CreateAnalyticalMember}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid9641236\charrsid13193745 \hich\af1\dbch\af31505\loch\f1 .cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13193745 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 + command which creates an AnalyticalMember element}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid679888\charrsid679888 \hich\af1\dbch\af31505\loch\f1 CreateAnalyticalPanel}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid679888 \hich\af1\dbch\af31505\loch\f1 .cs \hich\f1 \endash \loch\f1 + command which creates an AnalyticalPanel element and an AnalyticalOpening +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7407153 \hich\af1\dbch\af31505\loch\f1 AddRelation.cs \hich\f1 \endash \loch\f1 command which \hich\af1\dbch\af31505\loch\f1 adds a new relation between physical and analytical elements +\par \hich\af1\dbch\af31505\loch\f1 UpdateRelation.cs \hich\f1 \endash \loch\f1 command which updates }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7407153\charrsid7407153 \hich\af1\dbch\af31505\loch\f1 +existing relation between physical and analytical elements using AnalyticalToPhysicalRelationManager}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7407153 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13371909 \hich\af1\dbch\af31505\loch\f1 BreakRelation.cs \hich\f1 \endash \loch\f1 command whi\hich\af1\dbch\af31505\loch\f1 ch will break an existing relation between physical and analytical elements + +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7407153 \hich\af1\dbch\af31505\loch\f1 Utilities.cs \hich\f1 \endash \loch\f1 utility class +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827 \hich\af1\dbch\af31505\loch\f1 ModifyPanelContour.cs \hich\f1 \endash \loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10699490 \hich\af1\dbch\af31505\loch\f1 +command which replaces a Line from an AnalyticalPanel with an Arc}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3551054 \hich\af1\dbch\af31505\loch\f1 using SketchEditScopep}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827\charrsid7295827 \hich\af1\dbch\af31505\loch\f1 MoveAnalyticalMemberUsingElementTransformUtils.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827 \hich\af1\dbch\af31505\loch\f1 +\hich\f1 \endash \loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10699490 \hich\af1\dbch\af31505\loch\f1 command which moves an AnalyticalMember from two connected Analytical Members while keeping end nodes connected}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827\charrsid7295827 \hich\af1\dbch\af31505\loch\f1 Mov\hich\af1\dbch\af31505\loch\f1 eAnalyticalMemberUsingSetCurve.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827 +\hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10699490 \hich\af1\dbch\af31505\loch\f1 +command which moves an AnalyticalMember from two connected Analytical Members and breaks the end nodes connectivity}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827\charrsid13193745 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827\charrsid7295827 \hich\af1\dbch\af31505\loch\f1 MoveAnalyticalNodeUsingElementTransformUtils.cs}{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid7295827 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10699490 \hich\af1\dbch\af31505\loch\f1 command which moves an AnalyticalNode without breaking +\hich\af1\dbch\af31505\loch\f1 the connectivity of }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14619581 \hich\af1\dbch\af31505\loch\f1 the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10699490 \hich\af1\dbch\af31505\loch\f1 convergin}{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10884090 \hich\af1\dbch\af31505\loch\f1 g Analytical Elements in that node}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236\charrsid7295827 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827\charrsid7295827 \hich\af1\dbch\af31505\loch\f1 MoveAnalyticalPanelUsingElementTransformUtils.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827 \hich\af1\dbch\af31505\loch\f1 +\hich\f1 \endash \loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10884090 \hich\af1\dbch\af31505\loch\f1 command which moves an AnalyticalPanel connected with an AnalyticalMember }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid14619581 \hich\af1\dbch\af31505\loch\f1 while}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10884090 \hich\af1\dbch\af31505\loch\f1 keeping the connectivity between the two}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid7295827\charrsid7295827 +\par \hich\af1\dbch\af31505\loch\f1 MoveAnalyticalP\hich\af1\dbch\af31505\loch\f1 anelUsingSketchEditScope.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 }{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid10884090 \hich\af1\dbch\af31505\loch\f1 command which moves an AnalyticalPanel connected with an AnalyticaMember and breaks the}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14619581 \hich\af1\dbch\af31505\loch\f1 ir}{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10884090 \hich\af1\dbch\af31505\loch\f1 connectivity}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid7295827 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4336073\charrsid4336073 \hich\af1\dbch\af31505\loch\f1 AnalyticalNodeConnStatus}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid4336073 \hich\af1\dbch\af31505\loch\f1 .cs \hich\f1 \endash \loch\f1 + sample related analytical nodes connection status +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14623580\charrsid14623580 \hich\af1\dbch\af31505\loch\f1 FlipAnalyticalMember.cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14623580 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash +\hich\af1\dbch\af31505\loch\f1 command which flips an analytical member curve +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3154410\charrsid3154410 \hich\af1\dbch\af31505\loch\f1 ReleaseConditionsAnalyticalMember}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977 \hich\af1\dbch\af31505\loch\f1 .cs}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3154410 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 commands which reads the release conditions of an Analytical Member. +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3154410\charrsid3154410 \hich\af1\dbch\af31505\loch\f1 MemberForcesAnalyticalMember}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977 \hich\af1\dbch\af31505\loch\f1 .cs}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3154410 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 command which reads the member forces of an Analytical Member +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid11877210 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10178750\charrsid10178750 \hich\af1\dbch\af31505\loch\f1 SetO\hich\af1\dbch\af31505\loch\f1 uterContourForPanels +}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977 \hich\af1\dbch\af31505\loch\f1 .cs}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10178750 \hich\af1\dbch\af31505\loch\f1 \hich\f1 \endash \loch\f1 + command which creates and then edit the outer contour for a panel}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid11877210 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977\charrsid7295827 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\f0\fs20\insrsid9641236 +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 +\f0\fs20\insrsid9641236 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236\charrsid3940002 \hich\af1\dbch\af31505\loch\f1 This sample provides }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13466388 \hich\af1\dbch\af31505\loch\f1 the }{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \f1\fs20\insrsid9641236\charrsid3940002 \hich\af1\dbch\af31505\loch\f1 following functionalities}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13466388 \hich\af1\dbch\af31505\loch\f1 :}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid9641236\charrsid3940002 +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid3940002 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236\charrsid3940002 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid3940002\charrsid3940002 \hich\af1\dbch\af31505\loch\f1 How to create different kind}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13466388 \hich\af1\dbch\af31505\loch\f1 s}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid3940002\charrsid3940002 \hich\af1\dbch\af31505\loch\f1 of analytical elements}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12867357 \hich\af1\dbch\af31505\loch\f1 - }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6956184 \tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12867357 \hich\af1\dbch\af31505\loch\f1 +How to add/update/break relations between analytical and physical elements}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid12867357\charrsid3940002 +\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0\pararsid6956184 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6956184 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6956184\charrsid6956184 +\hich\af1\dbch\af31505\loch\f1 How to move analytical elements with keeping or without keeping }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13466388 \hich\af1\dbch\af31505\loch\f1 the }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\f1\fs20\insrsid6956184\charrsid6956184 \hich\af1\dbch\af31505\loch\f1 end nodes connected}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid9641236 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin0\itap0\pararsid13904977 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977 -\tab \hich\af1\dbch\af31505\loch\f1 How to flip an Analytical Member +\par -\tab \hich\af1\dbch\af31505\loch\f1 How to get/set Member Forces and Release Conditions +\par -\tab \hich\af1\dbch\af31505\loch\f1 How to set the outer contour of an Analytical Panel}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid13904977\charrsid6956184 +\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a +9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad +5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 +b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 +0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 +a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f +c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 +0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 +a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 +6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b +4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b +4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100b6f4679893070000c9200000160000007468656d652f7468656d652f +7468656d65312e786d6cec59cd8b1bc915bf07f23f347d97f5d5ad8fc1f2a24fcfda33b6b164873dd648a5eef2547789aad28cc56208de532e81c026e49085bd +ed21842cecc22eb9e48f31d8249b3f22afaa5bdd5552c99e191c3061463074977eefd5afde7bf5de53d5ddcf5e26d4bbc05c1096f6fcfa9d9aefe174ce16248d +7afeb3d9a4d2f13d2151ba4094a5b8e76fb0f03fbbf7eb5fdd454732c609f6403e1547a8e7c752ae8eaa5531876124eeb0154ee1bb25e30992f0caa3ea82a34b +d09bd06aa3566b55134452df4b51026a1f2f97648ebd9952e9dfdb2a1f53784da5500373caa74a35b6243476715e5708b11143cabd0b447b3eccb3609733fc52 +fa1e4542c2173dbfa6fffceabdbb5574940b517940d6909be8bf5c2e17589c37f49c3c3a2b260d823068f50bfd1a40e53e6edc1eb7c6ad429f06a0f91c569a71 +b175b61bc320c71aa0ecd1a17bd41e35eb16ded0dfdce3dc0fd5c7c26b50a63fd8c34f2643b0a285d7a00c1feee1c3417730b2f56b50866fede1dbb5fe28685b +fa3528a6243ddf43d7c25673b85d6d0159327aec8477c360d26ee4ca4b144443115d6a8a254be5a1584bd00bc6270050408a24493db959e1259a43140f112567 +9c7827248a21f056286502866b8ddaa4d684ffea13e827ed5174849121ad780113b137a4f87862cec94af6fc07a0d537206f7ffef9cdeb1fdfbcfee9cd575fbd +79fdf77c6eadca923b466964cafdf2dd1ffef3cd6fbd7ffff0ed2f5fff319b7a172f4cfcbbbffdeedd3ffef93ef5b0e2d2146ffff4fdbb1fbf7ffbe7dfffebaf +5f3bb4f7393a33e1339260e13dc297de5396c0021dfcf119bf9ec42c46c494e8a791402952b338f48f656ca11f6d10450edc00db767cce21d5b880f7d72f2cc2 +d398af2571687c182716f094313a60dc6985876a2ec3ccb3751ab927e76b13f714a10bd7dc43945a5e1eaf579063894be530c616cd2714a5124538c5d253dfb1 +738c1dabfb8210cbaea764ce99604be97d41bc01224e93ccc899154da5d03149c02f1b1741f0b7659bd3e7de8051d7aa47f8c246c2de40d4417e86a965c6fb68 +2d51e252394309350d7e8264ec2239ddf0b9891b0b099e8e3065de78818570c93ce6b05ec3e90f21cdb8dd7e4a37898de4929cbb749e20c64ce4889d0f6394ac +5cd829496313fbb938871045de13265df05366ef10f50e7e40e941773f27d872f787b3c133c8b026a53240d4376beef0e57dccacf89d6ee8126157aae9f3c44a +b17d4e9cd131584756689f604cd1255a60ec3dfbdcc160c05696cd4bd20f62c82ac7d815580f901dabea3dc5027a25d5dcece7c91322ac909de2881de073bad9 +493c1b9426881fd2fc08bc6eda7c0ca52e7105c0633a3f37818f08f480102f4ea33c16a0c308ee835a9fc4c82a60ea5db8e375c32dff5d658fc1be7c61d1b8c2 +be04197c6d1948eca6cc7b6d3343d49aa00c9819822ec3956e41c4727f29a28aab165b3be596f6a62ddd00dd91d5f42424fd6007b4d3fb84ffbbde073a8cb77f +f9c6b10f3e4ebfe3566c25ab6b763a8792c9f14e7f7308b7dbd50c195f904fbfa919a175fa04431dd9cf58b73dcd6d4fe3ffdff73487f6f36d2773a8dfb8ed64 +7ce8306e3b99fc70e5e3743265f3027d8d3af0c80e7af4b14f72f0d46749289dca0dc527421ffc08f83db398c0a092d3279eb838055cc5f0a8ca1c4c60e1228e +b48cc799fc0d91f134462b381daafb4a492472d591f0564cc0a1911e76ea5678ba4e4ed9223becacd7d5c16656590592e5782d2cc6e1a04a66e856bb3cc02bd4 +6bb6913e68dd1250b2d721614c6693683a48b4b783ca48fa58178ce620a157f65158741d2c3a4afdd6557b2c805ae115f8c1edc1cff49e1f06200242701e07cd +f942f92973f5d6bbda991fd3d3878c69450034d8db08283ddd555c0f2e4fad2e0bb52b78da2261849b4d425b46377822869fc17974aad1abd0b8aeafbba54b2d +7aca147a3e08ad9246bbf33e1637f535c8ede6069a9a9982a6de65cf6f35430899395af5fc251c1ac363b282d811ea3717a211dcbccc25cf36fc4d32cb8a0b39 +4222ce0cae934e960d122231f728497abe5a7ee1069aea1ca2b9d51b90103e59725d482b9f1a3970baed64bc5ce2b934dd6e8c284b67af90e1b35ce1fc568bdf +1cac24d91adc3d8d1797de195df3a708422c6cd795011744c0dd413db3e682c0655891c8caf8db294c79da356fa3740c65e388ae62945714339967709dca0b3a +faadb081f196af190c6a98242f8467912ab0a651ad6a5a548d8cc3c1aafb6121653923699635d3ca2aaa6abab39835c3b60cecd8f26645de60b53531e434b3c2 +67a97b37e576b7b96ea74f28aa0418bcb09fa3ea5ea12018d4cac92c6a8af17e1a56393b1fb56bc776811fa07695226164fdd656ed8edd8a1ae19c0e066f54f9 +416e376a6168b9ed2bb5a5f5adb979b1cdce5e40f2184197bba6526857c2c92e47d0104d754f92a50dd8222f65be35e0c95b73d2f3bfac85fd60d80887955a27 +1c57826650ab74c27eb3d20fc3667d1cd66ba341e31514161927f530bbb19fc00506dde4f7f67a7cefee3ed9ded1dc99b3a4caf4dd7c5513d777f7f5c6e1bb7b +8f40d2f9b2d598749bdd41abd26df627956034e854bac3d6a0326a0ddba3c9681876ba9357be77a1c141bf390c5ae34ea5551f0e2b41aba6e877ba9576d068f4 +8376bf330efaaff23606569ea58fdc16605ecdebde7f010000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d65 +2f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d36 +3f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e +3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d985 +0528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000000000 +0000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000 +000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019020000 +7468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d0014000600080000002100b6f4679893070000c92000001600000000000000 +000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027000000 +000000000000000000009d0a00007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000980b00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong; +\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid; +\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid; +\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2; +\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1; +\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1; +\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; +\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2; +\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3; +\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; +\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; +\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; +\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; +\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; +\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; +\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; +\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; +\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; +\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; +\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; +\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore 01050000 +02000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000906e +826773cad701feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/ReleaseConditionsAnalyticalMember.cs b/SDK/Samples/ContextualAnalyticalModel/CS/ReleaseConditionsAnalyticalMember.cs new file mode 100644 index 000000000..6ade484ed --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/ReleaseConditionsAnalyticalMember.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; +using System.Diagnostics; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + public class ReleaseConditionsAnalyticalMember : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + try + { + // Get the Document + Document document = commandData.Application.ActiveUIDocument.Document; + + // Create an Analytical Member + AnalyticalMember analyticalMember = CreateAnalyticalMember.CreateMember(document); + + // Start transaction + using (Transaction transaction = new Transaction(document, "Release Conditions")) + { + transaction.Start(); + + + + // Get release conditions of analytical member + IList releaseConditions = analyticalMember.GetReleaseConditions(); + foreach (ReleaseConditions rc in releaseConditions) + { + Console.WriteLine("Position: " + rc.Start + + "Fx: " + rc.Fx.ToString() + + "Fy: " + rc.Fy.ToString() + + "Fz: " + rc.Fz.ToString() + + "Mx: " + rc.Mx.ToString() + + "My: " + rc.My.ToString() + + "Mz: " + rc.Mz.ToString()); + } + + // Get release type at start + ReleaseType releaseType = analyticalMember.GetReleaseType(true); + + // Change release type + analyticalMember.SetReleaseType(true, ReleaseType.UserDefined); + + try + { + analyticalMember.SetReleaseConditions(new ReleaseConditions(true, false, true, false, true, false, true)); + } + catch(InvalidOperationException ex) + { + message = ex.Message; + return Result.Failed; + } + + transaction.Commit(); + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/RemoveAssociation.cs b/SDK/Samples/ContextualAnalyticalModel/CS/RemoveAssociation.cs new file mode 100644 index 000000000..b245dbb9e --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/RemoveAssociation.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; +using Autodesk.Revit.UI.Selection; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// Break existing relation between physical and analytical elements using AnalyticalToPhysicalAssociationManager + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + class RemoveAssociation : IExternalCommand + { + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + UIDocument activeDoc = commandData.Application.ActiveUIDocument; + Autodesk.Revit.DB.Document doc = activeDoc.Document; + using (Transaction trans = new Transaction(doc, "ContextualAnalyticalModel.UpdateRelation")) + { + trans.Start(); + + //select object for which we want to break the relation + Reference eRef = activeDoc.Selection.PickObject(ObjectType.Element, "Please select the element for which you want to break relation"); + ElementId selectedElementId = null; + if (eRef != null && eRef.ElementId != ElementId.InvalidElementId) + selectedElementId = eRef.ElementId; + + // Gets the AnalyticalToPhysicalAssociationManager for this Revit document + AnalyticalToPhysicalAssociationManager analyticalToPhysicalmanager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(doc); + if (analyticalToPhysicalmanager == null) + return Result.Failed; + + //break relation + analyticalToPhysicalmanager.RemoveAssociation(selectedElementId); + + trans.Commit(); + } + + return Result.Succeeded; + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/SetOuterContourForPanels.cs b/SDK/Samples/ContextualAnalyticalModel/CS/SetOuterContourForPanels.cs new file mode 100644 index 000000000..2e1f47376 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/SetOuterContourForPanels.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; + +namespace ContextualAnalyticalModel +{ + /// + /// Implements the Revit add-in interface IExternalCommand + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + class SetOuterContourForPanels : IExternalCommand + { + public virtual Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + try + { + Document document = commandData.Application.ActiveUIDocument.Document; + + //create analytical panel + AnalyticalPanel analyticalPanel = CreateAnalyticalPanel.CreateAMPanel(document); + if (analyticalPanel != null) + { + using (Transaction transaction = new Transaction(document, "Edit Analytical Panel outer contour")) + { + transaction.Start(); + + //create a new curve loop + CurveLoop profileloop = new CurveLoop(); + profileloop.Append(Line.CreateBound( + new XYZ(0, 0, 0), new XYZ(5, 0, 0))); + profileloop.Append(Line.CreateBound( + new XYZ(5, 0, 0), new XYZ(5, 5, 0))); + profileloop.Append(Line.CreateBound( + new XYZ(5, 5, 0), new XYZ(-2, 5, 0))); + profileloop.Append(Line.CreateBound( + new XYZ(-2, 5, 0), new XYZ(0, 0, 0))); + + //Sets the new contour for analytical panel + analyticalPanel.SetOuterContour(profileloop); + + transaction.Commit(); + } + } + + return Result.Succeeded; + } + catch (Exception ex) + { + message = ex.Message; + return Result.Failed; + } + } + } +} diff --git a/SDK/Samples/ContextualAnalyticalModel/CS/Utilities.cs b/SDK/Samples/ContextualAnalyticalModel/CS/Utilities.cs new file mode 100644 index 000000000..d1fd2e416 --- /dev/null +++ b/SDK/Samples/ContextualAnalyticalModel/CS/Utilities.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Autodesk.Revit; +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.DB.Structure; +using Autodesk.Revit.UI.Selection; + +namespace ContextualAnalyticalModel +{ + /// + /// Utility methods + /// + public static class Utilities + { + /// + /// Selects a Revit element and returns its ElementId + /// + /// UIDocument + /// status message + /// ElementId of the selected element + public static ElementId GetSelectedObject(UIDocument uiDoc, string msg) + { + ElementId selectedElementId = ElementId.InvalidElementId; + Reference refElem = uiDoc.Selection.PickObject(ObjectType.Element, msg); + if (refElem != null) + { + selectedElementId = refElem.ElementId; + } + + return selectedElementId; + } + } +} diff --git a/SDK/Samples/CreateBeamSystem/CS/BeamTypeConverter.cs b/SDK/Samples/CreateBeamSystem/CS/BeamTypeConverter.cs index 099a953bf..c50386927 100644 --- a/SDK/Samples/CreateBeamSystem/CS/BeamTypeConverter.cs +++ b/SDK/Samples/CreateBeamSystem/CS/BeamTypeConverter.cs @@ -119,7 +119,7 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul foreach (KeyValuePair kvp in m_hash) { - if (kvp.Value.Id.IntegerValue == symbol.Id.IntegerValue) + if (kvp.Value.Id == symbol.Id) { return kvp.Key; } diff --git a/SDK/Samples/CreateBeamSystem/CS/CreateBeamSystem.csproj b/SDK/Samples/CreateBeamSystem/CS/CreateBeamSystem.csproj index 7f8c4af23..03bab3120 100644 --- a/SDK/Samples/CreateBeamSystem/CS/CreateBeamSystem.csproj +++ b/SDK/Samples/CreateBeamSystem/CS/CreateBeamSystem.csproj @@ -42,7 +42,6 @@ prompt 4 true - true @@ -61,8 +60,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.csproj b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.csproj index 18d278c66..a559f549f 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.csproj +++ b/SDK/Samples/CreateComplexAreaRein/CS/CreateComplexAreaRein.csproj @@ -29,7 +29,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -39,7 +38,6 @@ prompt 4 true - true @@ -48,8 +46,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -59,8 +56,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CreateComplexAreaRein/CS/GeomHelper.cs b/SDK/Samples/CreateComplexAreaRein/CS/GeomHelper.cs index 577df22b8..60b8cb31a 100644 --- a/SDK/Samples/CreateComplexAreaRein/CS/GeomHelper.cs +++ b/SDK/Samples/CreateComplexAreaRein/CS/GeomHelper.cs @@ -25,6 +25,7 @@ namespace Revit.SDK.Samples.CreateComplexAreaRein.CS using System.Collections.Generic; using System.Text; using System.Windows.Forms; + using System.Linq; using Autodesk.Revit; using Autodesk.Revit.DB; @@ -50,54 +51,67 @@ public GeomHelper() m_currentDoc = Command.CommandData.Application.ActiveUIDocument.Document; } - /// - /// get necessary data when create AreaReinforcement on a horizontal floor - /// - /// floor on which to create AreaReinforcemen - /// reference of the horizontal face on the floor - /// curves compose the horizontal face of the floor - /// is successful - public bool GetFloorGeom(Floor floor, ref Reference refer, ref IList curves) - { - //get horizontal face's reference - FaceArray faces = GeomUtil.GetFaces(floor); - foreach (Face face in faces) + /// + /// get necessary data when create AreaReinforcement on a horizontal floor + /// + /// floor on which to create AreaReinforcemen + /// reference of the horizontal face on the floor + /// curves compose the horizontal face of the floor + /// is successful + public bool GetFloorGeom(Floor floor, ref Reference refer, ref IList curves) + { + //get horizontal face's reference + FaceArray faces = GeomUtil.GetFaces(floor); + foreach (Face face in faces) + { + if (GeomUtil.IsHorizontalFace(face)) { - if (GeomUtil.IsHorizontalFace(face)) - { - refer = face.Reference; - break; - } + refer = face.Reference; + break; } - if (null == refer) + } + if (null == refer) + { + return false; + } + //get analytical model profile + AnalyticalPanel model = null; + Document document = floor.Document; + AnalyticalToPhysicalAssociationManager assocManager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(document); + if (assocManager != null) + { + ElementId associatedElementId = assocManager.GetAssociatedElementId(floor.Id); + if (associatedElementId != ElementId.InvalidElementId) { - return false; - } - //get analytical model profile - AnalyticalModel model = floor.GetAnalyticalModel(); - if (null == model) - { - return false; + Element associatedElement = document.GetElement(associatedElementId); + if (associatedElement != null && associatedElement is AnalyticalPanel) + { + model = associatedElement as AnalyticalPanel; + } } + } + if (null == model) + { + return false; + } - curves = model.GetCurves(AnalyticalCurveType.ActiveCurves); + curves = model.GetOuterContour().ToList(); + if (!GeomUtil.IsRectangular(curves)) + { + return false; + } + curves = AddInlaidCurves(curves, 0.5); - if (!GeomUtil.IsRectangular(curves)) - { - return false; - } - curves = AddInlaidCurves(curves, 0.5); - - return true; - } + return true; + } - /// - /// create CurveArray which contain 8 curves, 4 is exterior lines and 4 is interior lines - /// - /// - /// - /// - private IList AddInlaidCurves(IList curves, double scale) + /// + /// create CurveArray which contain 8 curves, 4 is exterior lines and 4 is interior lines + /// + /// + /// + /// + private IList AddInlaidCurves(IList curves, double scale) { //because curves is readonly, can't use method Curve.Append(Curve) List lines = new List(); diff --git a/SDK/Samples/CreateDimensions/CS/Command.cs b/SDK/Samples/CreateDimensions/CS/Command.cs index 660467558..b7ceeb8b6 100644 --- a/SDK/Samples/CreateDimensions/CS/Command.cs +++ b/SDK/Samples/CreateDimensions/CS/Command.cs @@ -26,6 +26,7 @@ using System.Windows.Forms; using System.Collections.Generic; using System.Text; +using System.Linq; using Autodesk; using Autodesk.Revit; @@ -140,93 +141,108 @@ bool initialize() return true; } - /// - /// find out every wall in the selection and add a dimension from the start of the wall to its end - /// - /// if add successfully, true will be returned, else false will be returned - public bool AddDimension() - { - if (!initialize()) + /// + /// find out every wall in the selection and add a dimension from the start of the wall to its end + /// + /// if add successfully, true will be returned, else false will be returned + public bool AddDimension() + { + if (!initialize()) + { + return false; + } + + Transaction transaction = new Transaction(m_revit.Application.ActiveUIDocument.Document, "Add Dimensions"); + transaction.Start(); + //get out all the walls in this array, and create a dimension from its start to its end + for (int i = 0; i < m_walls.Count; i++) + { + Wall wallTemp = m_walls[i] as Wall; + if (null == wallTemp) { - return false; + continue; } - Transaction transaction = new Transaction(m_revit.Application.ActiveUIDocument.Document, "Add Dimensions"); - transaction.Start(); - //get out all the walls in this array, and create a dimension from its start to its end - for (int i = 0; i < m_walls.Count; i++) + //get location curve + Location location = wallTemp.Location; + LocationCurve locationline = location as LocationCurve; + if (null == locationline) { - Wall wallTemp = m_walls[i] as Wall; - if (null == wallTemp) - { - continue; - } - - //get location curve - Location location = wallTemp.Location; - LocationCurve locationline = location as LocationCurve; - if (null == locationline) - { - continue; - } + continue; + } - //New Line + //New Line - Line newLine = null; + Line newLine = null; - //get reference - ReferenceArray referenceArray = new ReferenceArray(); + //get reference + ReferenceArray referenceArray = new ReferenceArray(); - AnalyticalModel analyticalModel = wallTemp.GetAnalyticalModel(); - IList activeCurveList = analyticalModel.GetCurves(AnalyticalCurveType.ActiveCurves); - foreach (Curve aCurve in activeCurveList) - { - // find non-vertical curve from analytical model - if (aCurve.GetEndPoint(0).Z == aCurve.GetEndPoint(1).Z) - newLine = aCurve as Line; - if (aCurve.GetEndPoint(0).Z != aCurve.GetEndPoint(1).Z) - { - AnalyticalModelSelector amSelector = new AnalyticalModelSelector(aCurve); - amSelector.CurveSelector = AnalyticalCurveSelector.StartPoint; - referenceArray.Append(analyticalModel.GetReference(amSelector)); - } - if (2 == referenceArray.Size) - break; - } - if (referenceArray.Size != 2) - { - m_errorMessage += "Did not find two references"; - return false; - } - try - { - //try to add new a dimension - Autodesk.Revit.UI.UIApplication app = m_revit.Application; - Document doc = app.ActiveUIDocument.Document; - - Autodesk.Revit.DB.XYZ p1 = new XYZ( - newLine.GetEndPoint(0).X + 5, - newLine.GetEndPoint(0).Y + 5, - newLine.GetEndPoint(0).Z); - Autodesk.Revit.DB.XYZ p2 = new XYZ( - newLine.GetEndPoint(1).X + 5, - newLine.GetEndPoint(1).Y + 5, - newLine.GetEndPoint(1).Z); - - Line newLine2 = Line.CreateBound(p1, p2); - Dimension newDimension = doc.Create.NewDimension( - doc.ActiveView, newLine2, referenceArray); - } - // catch the exceptions - catch (Exception ex) - { - m_errorMessage += ex.ToString(); - return false; - } + AnalyticalPanel analyticalModel = null; + Document document = wallTemp.Document; + AnalyticalToPhysicalAssociationManager assocManager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(document); + if (assocManager != null) + { + ElementId associatedElementId = assocManager.GetAssociatedElementId(wallTemp.Id); + if (associatedElementId != ElementId.InvalidElementId) + { + Element associatedElement = document.GetElement(associatedElementId); + if (associatedElement != null && associatedElement is AnalyticalPanel) + { + analyticalModel = associatedElement as AnalyticalPanel; + } + } } - transaction.Commit(); - return true; - } + IList activeCurveList = analyticalModel.GetOuterContour().ToList(); + foreach (Curve aCurve in activeCurveList) + { + // find non-vertical curve from analytical model + if (aCurve.GetEndPoint(0).Z == aCurve.GetEndPoint(1).Z) + newLine = aCurve as Line; + if (aCurve.GetEndPoint(0).Z != aCurve.GetEndPoint(1).Z) + { + AnalyticalModelSelector amSelector = new AnalyticalModelSelector(aCurve); + amSelector.CurveSelector = AnalyticalCurveSelector.StartPoint; + + referenceArray.Append(analyticalModel.GetReference(amSelector)); + } + if (2 == referenceArray.Size) + break; + } + if (referenceArray.Size != 2) + { + m_errorMessage += "Did not find two references"; + return false; + } + try + { + //try to add new a dimension + Autodesk.Revit.UI.UIApplication app = m_revit.Application; + Document doc = app.ActiveUIDocument.Document; + + Autodesk.Revit.DB.XYZ p1 = new XYZ( + newLine.GetEndPoint(0).X + 5, + newLine.GetEndPoint(0).Y + 5, + newLine.GetEndPoint(0).Z); + Autodesk.Revit.DB.XYZ p2 = new XYZ( + newLine.GetEndPoint(1).X + 5, + newLine.GetEndPoint(1).Y + 5, + newLine.GetEndPoint(1).Z); + + Line newLine2 = Line.CreateBound(p1, p2); + Dimension newDimension = doc.Create.NewDimension( + doc.ActiveView, newLine2, referenceArray); + } + // catch the exceptions + catch (Exception ex) + { + m_errorMessage += ex.ToString(); + return false; + } + } + transaction.Commit(); + return true; + } - } + } } diff --git a/SDK/Samples/CreateDimensions/CS/CreateDimensions.csproj b/SDK/Samples/CreateDimensions/CS/CreateDimensions.csproj index 27e1e8a03..2e7a34bbc 100644 --- a/SDK/Samples/CreateDimensions/CS/CreateDimensions.csproj +++ b/SDK/Samples/CreateDimensions/CS/CreateDimensions.csproj @@ -29,7 +29,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -39,7 +38,6 @@ prompt 4 true - true @@ -48,8 +46,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -59,8 +56,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CreateFillPattern/CS/CreateFillPattern.csproj b/SDK/Samples/CreateFillPattern/CS/CreateFillPattern.csproj index f23a3764a..d0214b31f 100644 --- a/SDK/Samples/CreateFillPattern/CS/CreateFillPattern.csproj +++ b/SDK/Samples/CreateFillPattern/CS/CreateFillPattern.csproj @@ -26,7 +26,6 @@ true bin\Debug\CreateFillPattern.xml AnyCPU - pdbonly @@ -36,7 +35,6 @@ prompt 4 true - true @@ -47,8 +45,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -58,8 +55,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CreateFillPattern/CS/FillPatternForm.cs b/SDK/Samples/CreateFillPattern/CS/FillPatternForm.cs index c74bb1f55..adc24c4e4 100644 --- a/SDK/Samples/CreateFillPattern/CS/FillPatternForm.cs +++ b/SDK/Samples/CreateFillPattern/CS/FillPatternForm.cs @@ -99,7 +99,7 @@ private void IniTreeView() for (int i = 0; i < lstLinePatterns.Count; i++) { TreeNode node = new TreeNode(lstLinePatterns[i].Name); - node.Name = lstLinePatterns[i].Id.IntegerValue.ToString(); + node.Name = lstLinePatterns[i].Id.ToString(); iniNode2.Nodes.Add(node); } @@ -418,7 +418,7 @@ private void buttonApplyToGrids_Click(object sender, EventArgs e) "Before applying a LinePattern to Grids, you must first select a LinePattern."); return; } - ElementId eid = new ElementId(int.Parse(treeViewLinePattern.SelectedNode.Name)); + ElementId eid = ElementId.Parse(treeViewLinePattern.SelectedNode.Name); foreach (ElementId typeId in lstGridTypeIds) { Element gridType = doc.GetElement(typeId); diff --git a/SDK/Samples/CreateShared/VB.NET/CreateShared.vbproj b/SDK/Samples/CreateShared/VB.NET/CreateShared.vbproj index dc818e944..ffb9b547b 100644 --- a/SDK/Samples/CreateShared/VB.NET/CreateShared.vbproj +++ b/SDK/Samples/CreateShared/VB.NET/CreateShared.vbproj @@ -52,7 +52,6 @@ 1 42016,42017,42018,42019,42032 full - bin\Release\ @@ -72,7 +71,6 @@ 1 42016,42017,42018,42019,42032 none - true @@ -86,8 +84,7 @@ 42016,42017,42018,42019,42032 full x64 - - + MinimumRecommendedRules.ruleset true @@ -99,8 +96,7 @@ true 42016,42017,42018,42019,42032 x64 - - + MinimumRecommendedRules.ruleset diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.csproj b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.csproj index 6441aadc8..82dd203df 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.csproj +++ b/SDK/Samples/CreateSimpleAreaRein/CS/CreateSimpleAreaRein.csproj @@ -29,7 +29,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -39,7 +38,6 @@ prompt 4 true - true @@ -48,8 +46,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -59,8 +56,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CreateSimpleAreaRein/CS/GeomHelper.cs b/SDK/Samples/CreateSimpleAreaRein/CS/GeomHelper.cs index f3dc5272a..1ec26f568 100644 --- a/SDK/Samples/CreateSimpleAreaRein/CS/GeomHelper.cs +++ b/SDK/Samples/CreateSimpleAreaRein/CS/GeomHelper.cs @@ -25,6 +25,7 @@ namespace Revit.SDK.Samples.CreateSimpleAreaRein.CS using System.Collections.Generic; using System.Text; using System.Windows.Forms; + using System.Linq; using Autodesk.Revit; using Autodesk.Revit.DB; @@ -50,98 +51,128 @@ public GeomHelper() m_currentDoc = Command.CommandData.Application.ActiveUIDocument.Document; } - /// - /// get necessary data when create AreaReinforcement on a straight wall - /// - /// wall on which to create AreaReinforcemen - /// reference of the vertical straight face on the wall - /// curves compose the vertical face of the wall - /// is successful - public bool GetWallGeom(Wall wall, ref Reference refer, ref IList curves) - { - FaceArray faces = GeomUtil.GetFaces(wall); - LocationCurve locCurve = wall.Location as LocationCurve; - //unless API has bug, locCurve can't be null - if (null == locCurve) - { - return false; - } - //check the location is line - Line locLine = locCurve.Curve as Line; - if (null == locLine) - { - return false; - } + /// + /// get necessary data when create AreaReinforcement on a straight wall + /// + /// wall on which to create AreaReinforcemen + /// reference of the vertical straight face on the wall + /// curves compose the vertical face of the wall + /// is successful + public bool GetWallGeom(Wall wall, ref Reference refer, ref IList curves) + { + FaceArray faces = GeomUtil.GetFaces(wall); + LocationCurve locCurve = wall.Location as LocationCurve; + //unless API has bug, locCurve can't be null + if (null == locCurve) + { + return false; + } + //check the location is line + Line locLine = locCurve.Curve as Line; + if (null == locLine) + { + return false; + } - //get the face reference - foreach (Face face in faces) + //get the face reference + foreach (Face face in faces) + { + if (GeomUtil.IsParallel(face, locLine)) { - if (GeomUtil.IsParallel(face, locLine)) - { - refer = face.Reference; - break; - } + refer = face.Reference; + break; } - //can't find proper reference - if (null == refer) + } + //can't find proper reference + if (null == refer) + { + return false; + } + //check the analytical model profile is rectangular + Document document = wall.Document; + AnalyticalToPhysicalAssociationManager assocManager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(document); + AnalyticalPanel model = null; + if (assocManager != null) + { + ElementId associatedElementId = assocManager.GetAssociatedElementId(wall.Id); + if (associatedElementId != ElementId.InvalidElementId) { - return false; + Element associatedElement = document.GetElement(associatedElementId); + if (associatedElement != null && associatedElement is AnalyticalPanel) + { + model = associatedElement as AnalyticalPanel; + } } + } + if (null == model) + { + return false; + } - //check the analytical model profile is rectangular - AnalyticalModel model = wall.GetAnalyticalModel(); - if (null == model) - { - return false; - } + curves = model.GetOuterContour().ToList(); - curves = model.GetCurves(AnalyticalCurveType.ActiveCurves); - if (!GeomUtil.IsRectangular(curves)) - { - return false; - } + if (!GeomUtil.IsRectangular(curves)) + { + return false; + } - return true; - } + return true; + } - /// - /// get necessary data when create AreaReinforcement on a horizontal floor - /// - /// floor on which to create AreaReinforcemen - /// reference of the horizontal face on the floor - /// curves compose the horizontal face of the floor - /// is successful - public bool GetFloorGeom(Floor floor, ref Reference refer, ref IList curves) - { - //get horizontal face reference - FaceArray faces = GeomUtil.GetFaces(floor); - foreach (Face face in faces) - { - if (GeomUtil.IsHorizontalFace(face)) - { - refer = face.Reference; - break; - } - } - //no proper reference - if (null == refer) + /// + /// get necessary data when create AreaReinforcement on a horizontal floor + /// + /// floor on which to create AreaReinforcemen + /// reference of the horizontal face on the floor + /// curves compose the horizontal face of the floor + /// is successful + public bool GetFloorGeom(Floor floor, ref Reference refer, ref IList curves) + { + //get horizontal face reference + FaceArray faces = GeomUtil.GetFaces(floor); + foreach (Face face in faces) + { + if (GeomUtil.IsHorizontalFace(face)) { - return false; + refer = face.Reference; + break; } + } + //no proper reference + if (null == refer) + { + return false; + } - //check the analytical model profile is rectangular - AnalyticalModel model = floor.GetAnalyticalModel(); - if (null == model) - { - return false; - } - curves = model.GetCurves(AnalyticalCurveType.ActiveCurves); - if (!GeomUtil.IsRectangular(curves)) + //check the analytical model profile is rectangular + //check the analytical model profile is rectangular + Document document = floor.Document; + AnalyticalToPhysicalAssociationManager assocManager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(document); + AnalyticalPanel model = null; + if (assocManager != null) + { + ElementId associatedElementId = assocManager.GetAssociatedElementId(floor.Id); + if (associatedElementId != ElementId.InvalidElementId) { - return false; + Element associatedElement = document.GetElement(associatedElementId); + if (associatedElement != null && associatedElement is AnalyticalPanel) + { + model = associatedElement as AnalyticalPanel; + } } + } + if (null == model) + { + return false; + } + curves = model.GetOuterContour().ToList(); - return true; - } - } + if (!GeomUtil.IsRectangular(curves)) + { + return false; + } + + return true; + } + } } diff --git a/SDK/Samples/CreateTrianglesTopography/CS/CreateTrianglesTopography.csproj b/SDK/Samples/CreateTrianglesTopography/CS/CreateTrianglesTopography.csproj index 3aac225d3..a32eb6b01 100644 --- a/SDK/Samples/CreateTrianglesTopography/CS/CreateTrianglesTopography.csproj +++ b/SDK/Samples/CreateTrianglesTopography/CS/CreateTrianglesTopography.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -29,7 +24,6 @@ 4 true bin\Debug\CreateTrianglesTopography.XML - pdbonly @@ -38,15 +32,10 @@ TRACE prompt 4 - true bin\Release\CreateTrianglesTopography.XML - - - - diff --git a/SDK/Samples/CreateViewSection/CS/Command.cs b/SDK/Samples/CreateViewSection/CS/Command.cs index 9b63b055d..66ce382e5 100644 --- a/SDK/Samples/CreateViewSection/CS/Command.cs +++ b/SDK/Samples/CreateViewSection/CS/Command.cs @@ -25,6 +25,7 @@ using System.Collections.Generic; using System.Text; using System.Windows.Forms; +using System.Linq; using Autodesk; using Autodesk.Revit; @@ -313,111 +314,123 @@ Transform GenerateWallTransform() } - /// - /// Generate a Transform instance which as Transform property of BoundingBoxXYZ, - /// when the user select a beam, this method will be called - /// - /// the reference of Transform, return null if it can't be generated - Transform GenerateBeamTransform() - { - Transform transform = null; - FamilyInstance instance = m_currentComponent as FamilyInstance; - - // First check whether the beam is horizontal. - // In order to predigest the calculation, only allow it to be horizontal - double startOffset = instance.get_Parameter(BuiltInParameter.STRUCTURAL_BEAM_END0_ELEVATION).AsDouble(); - double endOffset = instance.get_Parameter(BuiltInParameter.STRUCTURAL_BEAM_END1_ELEVATION).AsDouble(); - if (-PRECISION > startOffset - endOffset || PRECISION < startOffset - endOffset) - { - m_errorInformation = "Please select a horizontal beam."; - return transform; - } - - // Second get the Analytical Model line. - AnalyticalModel model = instance.GetAnalyticalModel(); - if (null == model) - { - m_errorInformation = "The selected beam doesn't have Analytical Model line."; - return transform; - } - Curve curve = model.GetCurve(); - if (null == curve) - { - m_errorInformation = "The program should never go here."; - return transform; - } - - // Now I am sure I can create a transform instance. - transform = Transform.Identity; - - // Third find the middle point of the line and set it as Origin property. - Autodesk.Revit.DB.XYZ startPoint = curve.GetEndPoint(0); - Autodesk.Revit.DB.XYZ endPoint = curve.GetEndPoint(1); - Autodesk.Revit.DB.XYZ midPoint = XYZMath.FindMidPoint(startPoint, endPoint); - transform.Origin = midPoint; - - // At last find out the directions of the created view, and set it as Basis property. - Autodesk.Revit.DB.XYZ basisZ = XYZMath.FindDirection(startPoint, endPoint); - Autodesk.Revit.DB.XYZ basisX = XYZMath.FindRightDirection(basisZ); - Autodesk.Revit.DB.XYZ basisY = XYZMath.FindUpDirection(basisZ); - - transform.set_Basis(0, basisX); - transform.set_Basis(1, basisY); - transform.set_Basis(2, basisZ); + /// + /// Generate a Transform instance which as Transform property of BoundingBoxXYZ, + /// when the user select a beam, this method will be called + /// + /// the reference of Transform, return null if it can't be generated + Transform GenerateBeamTransform() + { + Transform transform = null; + FamilyInstance instance = m_currentComponent as FamilyInstance; + + // First check whether the beam is horizontal. + // In order to predigest the calculation, only allow it to be horizontal + double startOffset = instance.get_Parameter(BuiltInParameter.STRUCTURAL_BEAM_END0_ELEVATION).AsDouble(); + double endOffset = instance.get_Parameter(BuiltInParameter.STRUCTURAL_BEAM_END1_ELEVATION).AsDouble(); + if (-PRECISION > startOffset - endOffset || PRECISION < startOffset - endOffset) + { + m_errorInformation = "Please select a horizontal beam."; return transform; - } - + } - /// - /// Generate a Transform instance which as Transform property of BoundingBoxXYZ, - /// when the user select a floor, this method will be called - /// - /// the reference of Transform, return null if it can't be generated - Transform GenerateFloorTransform() - { - Transform transform = null; - Floor floor = m_currentComponent as Floor; - - // First get the Analytical Model lines - AnalyticalModel model = floor.GetAnalyticalModel(); - if (null == model) - { - m_errorInformation = "Please select a structural floor."; - return transform; - } - - CurveArray curves = m_project.Document.Application.Create.NewCurveArray(); - IList curveList = model.GetCurves(AnalyticalCurveType.ActiveCurves); - foreach (Curve curve in curveList) - { - curves.Append(curve); - } - - if (null == curves || true == curves.IsEmpty) + if (!(instance.Location is LocationCurve)) + { + m_errorInformation = "The program should never go here."; + return transform; + } + Curve curve = (instance.Location as LocationCurve).Curve; + if (null == curve) + { + m_errorInformation = "The program should never go here."; + return transform; + } + + // Now I am sure I can create a transform instance. + transform = Transform.Identity; + + // Third find the middle point of the line and set it as Origin property. + Autodesk.Revit.DB.XYZ startPoint = curve.GetEndPoint(0); + Autodesk.Revit.DB.XYZ endPoint = curve.GetEndPoint(1); + Autodesk.Revit.DB.XYZ midPoint = XYZMath.FindMidPoint(startPoint, endPoint); + transform.Origin = midPoint; + + // At last find out the directions of the created view, and set it as Basis property. + Autodesk.Revit.DB.XYZ basisZ = XYZMath.FindDirection(startPoint, endPoint); + Autodesk.Revit.DB.XYZ basisX = XYZMath.FindRightDirection(basisZ); + Autodesk.Revit.DB.XYZ basisY = XYZMath.FindUpDirection(basisZ); + + transform.set_Basis(0, basisX); + transform.set_Basis(1, basisY); + transform.set_Basis(2, basisZ); + return transform; + } + + + /// + /// Generate a Transform instance which as Transform property of BoundingBoxXYZ, + /// when the user select a floor, this method will be called + /// + /// the reference of Transform, return null if it can't be generated + Transform GenerateFloorTransform() + { + Transform transform = null; + Floor floor = m_currentComponent as Floor; + + // First get the Analytical Model lines + AnalyticalPanel model = null; + Document document = floor.Document; + AnalyticalToPhysicalAssociationManager assocManager = AnalyticalToPhysicalAssociationManager.GetAnalyticalToPhysicalAssociationManager(document); + if (assocManager != null) + { + ElementId associatedElementId = assocManager.GetAssociatedElementId(floor.Id); + if (associatedElementId != ElementId.InvalidElementId) { - m_errorInformation = "The program should never go here."; - return transform; + Element associatedElement = document.GetElement(associatedElementId); + if (associatedElement != null && associatedElement is AnalyticalPanel) + { + model = associatedElement as AnalyticalPanel; + } } + } + if (null == model) + { + m_errorInformation = "Please select a structural floor."; + return transform; + } + + CurveArray curves = m_project.Document.Application.Create.NewCurveArray(); + IList curveList = model.GetOuterContour().ToList(); + foreach (Curve curve in curveList) + { + curves.Append(curve); + } + + if (null == curves || true == curves.IsEmpty) + { + m_errorInformation = "The program should never go here."; + return transform; + } - // Now I am sure I can create a transform instance. - transform = Transform.Identity; + // Now I am sure I can create a transform instance. + transform = Transform.Identity; - // Third find the middle point of the floor and set it as Origin property. - Autodesk.Revit.DB.XYZ midPoint = XYZMath.FindMiddlePoint(curves); - transform.Origin = midPoint; + // Third find the middle point of the floor and set it as Origin property. + Autodesk.Revit.DB.XYZ midPoint = XYZMath.FindMiddlePoint(curves); + transform.Origin = midPoint; - // At last find out the directions of the created view, and set it as Basis property. - Autodesk.Revit.DB.XYZ basisZ = XYZMath.FindFloorViewDirection(curves); - Autodesk.Revit.DB.XYZ basisX = XYZMath.FindRightDirection(basisZ); - Autodesk.Revit.DB.XYZ basisY = XYZMath.FindUpDirection(basisZ); + // At last find out the directions of the created view, and set it as Basis property. + Autodesk.Revit.DB.XYZ basisZ = XYZMath.FindFloorViewDirection(curves); + Autodesk.Revit.DB.XYZ basisX = XYZMath.FindRightDirection(basisZ); + Autodesk.Revit.DB.XYZ basisY = XYZMath.FindUpDirection(basisZ); - transform.set_Basis(0, basisX); - transform.set_Basis(1, basisY); - transform.set_Basis(2, basisZ); - return transform; - } + transform.set_Basis(0, basisX); + transform.set_Basis(1, basisY); + transform.set_Basis(2, basisZ); + return transform; + } - Double GetWallMidOffsetFromLocation(Wall wall) + Double GetWallMidOffsetFromLocation(Wall wall) { // First get the "Base Offset" property. Double baseOffset = wall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET).AsDouble(); diff --git a/SDK/Samples/CreateViewSection/CS/CreateViewSection.csproj b/SDK/Samples/CreateViewSection/CS/CreateViewSection.csproj index 935bcaec7..555358822 100644 --- a/SDK/Samples/CreateViewSection/CS/CreateViewSection.csproj +++ b/SDK/Samples/CreateViewSection/CS/CreateViewSection.csproj @@ -42,7 +42,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -52,7 +51,6 @@ prompt 4 true - true @@ -61,8 +59,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -72,8 +69,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.cs b/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.cs index 93534cbd2..46671c1b9 100644 --- a/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.cs +++ b/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.cs @@ -46,7 +46,7 @@ public class CreateWallinBeamProfile : IExternalCommand // Private Members IList m_wallTypeCollection; // Store all the wall types in current document ArrayList m_beamCollection; // Store the selection of beams in Revit - ArrayList m_analyticalLineCollection; // Store the analytical line of all the beams + ArrayList m_lineCollection; // Store the lines of all the beams WallType m_selectedWallType; // Store the selected wall type Level m_level; // Store the level which wall create on Boolean m_isStructural; // Indicate whether create structural walls @@ -100,7 +100,7 @@ public CreateWallinBeamProfile() { m_wallTypeCollection = new List(); m_beamCollection = new ArrayList(); - m_analyticalLineCollection = new ArrayList(); + m_lineCollection = new ArrayList(); m_isStructural = true; } #region IExternalCommand Members Implementation @@ -171,15 +171,15 @@ Boolean BeginCreate(Autodesk.Revit.DB.Document project) //CurveArray curveArray = new CurveArray(); // store the curves used to create wall List curveArray = new List(); Autodesk.Revit.DB.XYZ point; // used to store the end point of the curve temporarily - Curve curve = m_analyticalLineCollection[0] as Curve; + Curve curve = m_lineCollection[0] as Curve; curveArray.Add(curve); point = curve.GetEndPoint(1); // Sort the curves of analytical model and then add to curveArray. // API asks for the curves should be in a sequence, deasil or anticlockwise - for (int i = 1; i < m_analyticalLineCollection.Count; i++) + for (int i = 1; i < m_lineCollection.Count; i++) { - foreach (Object o in m_analyticalLineCollection) + foreach (Object o in m_lineCollection) { Boolean isInclude = false; foreach (Curve j in curveArray) @@ -222,7 +222,7 @@ Boolean BeginCreate(Autodesk.Revit.DB.Document project) } // If the program goes here, it means the beams can't form a profile. - if (curveArray.Count != m_analyticalLineCollection.Count) + if (curveArray.Count != m_lineCollection.Count) { m_errorInformation = "There are more than one closed profile."; return false; @@ -254,61 +254,59 @@ Boolean BeginCreate(Autodesk.Revit.DB.Document project) return true; } - /// - /// Get necessary data from revit.such as selected beams, wall types and level information - /// - /// A reference of current document - /// true if no error happens; otherwise, false. - Boolean PrepareData(Autodesk.Revit.UI.UIDocument project) - { - // Search all the wall types in the Revit - FilteredElementCollector filteredElementCollector = new FilteredElementCollector(project.Document); - filteredElementCollector.OfClass(typeof(WallType)); - m_wallTypeCollection = filteredElementCollector.Cast().ToList(); - - // Find the selection of beams in Revit - ElementSet selection = new ElementSet(); - foreach (ElementId elementId in project.Selection.GetElementIds()) + /// + /// Get necessary data from revit.such as selected beams, wall types and level information + /// + /// A reference of current document + /// true if no error happens; otherwise, false. + Boolean PrepareData(Autodesk.Revit.UI.UIDocument project) + { + // Search all the wall types in the Revit + FilteredElementCollector filteredElementCollector = new FilteredElementCollector(project.Document); + filteredElementCollector.OfClass(typeof(WallType)); + m_wallTypeCollection = filteredElementCollector.Cast().ToList(); + + // Find the selection of beams in Revit + ElementSet selection = new ElementSet(); + foreach (ElementId elementId in project.Selection.GetElementIds()) + { + selection.Insert(project.Document.GetElement(elementId)); + } + + foreach (Autodesk.Revit.DB.Element e in selection) + { + FamilyInstance m = e as FamilyInstance; + + // Use StructuralType property can judge whether it is a beam. + if (null != m && StructuralType.Beam == m.StructuralType) { - selection.Insert(project.Document.GetElement(elementId)); + m_beamCollection.Add(e); // store the beams + + if (!(m.Location is LocationCurve)) + { + m_errorInformation = "The beam should have location curve."; + return false; + } + m_lineCollection.Add((m.Location as LocationCurve).Curve); } - AnalyticalModel model; // store the AnalyticalModel of the beam. - foreach (Autodesk.Revit.DB.Element e in selection) - { - FamilyInstance m = e as FamilyInstance; - - // Use StructuralType property can judge whether it is a beam. - if (null != m && StructuralType.Beam == m.StructuralType) - { - m_beamCollection.Add(e); // store the beams - - // Get the curve of beam's AnalyticalModel. - model = m.GetAnalyticalModel(); - if (null == model) - { - m_errorInformation = "The beam should have analytical model."; - return false; - } - m_analyticalLineCollection.Add(model.GetCurve()); - } - } - if (0 == m_beamCollection.Count) - { - m_errorInformation = "Can not find any beams."; - return false; - } - - // Get the level which will be used in create method - FilteredElementCollector collector = new FilteredElementCollector(project.Document); - m_level = collector.OfClass(typeof(Level)).FirstElement() as Level; - return true; - } - - /// - /// Check whether the selected beams can make a a vertical profile. - /// - /// true if selected beams create a vertical profile; otherwise, false. - Boolean IsVerticalProfile() + } + if (0 == m_beamCollection.Count) + { + m_errorInformation = "Can not find any beams."; + return false; + } + + // Get the level which will be used in create method + FilteredElementCollector collector = new FilteredElementCollector(project.Document); + m_level = collector.OfClass(typeof(Level)).FirstElement() as Level; + return true; + } + + /// + /// Check whether the selected beams can make a a vertical profile. + /// + /// true if selected beams create a vertical profile; otherwise, false. + Boolean IsVerticalProfile() { // First check whether all the beams are in a same vertical plane if (!IsInVerticalPlane()) @@ -372,7 +370,7 @@ Boolean IsInVerticalPlane() // When all the beams in the X-Z plane or Y-Z plane, the deal is especial // So I use 3 ways to judge whether all the beams are in same vertical plane - Curve curve = m_analyticalLineCollection[0] as Curve; + Curve curve = m_lineCollection[0] as Curve; startPoint = curve.GetEndPoint(0); endPoint = curve.GetEndPoint(1); if (EqualDouble(startPoint.X, endPoint.X)) @@ -389,9 +387,9 @@ Boolean IsInVerticalPlane() } // Begin to compare each analytical line and judge whether they are in same vertical plane - for (int i = 1; i < m_analyticalLineCollection.Count; i++) + for (int i = 1; i < m_lineCollection.Count; i++) { - curve = m_analyticalLineCollection[i] as Curve; + curve = m_lineCollection[i] as Curve; startPoint = curve.GetEndPoint(0); endPoint = curve.GetEndPoint(1); @@ -442,9 +440,9 @@ Boolean CanCreateProfile() bool hasEndPoint; // indicate whether end point is in the array // Find out all the points in the curves, the same point only count once. - for (int i = 0; i < m_analyticalLineCollection.Count; i++) + for (int i = 0; i < m_lineCollection.Count; i++) { - curve = m_analyticalLineCollection[i] as Curve; + curve = m_lineCollection[i] as Curve; startPoint = curve.GetEndPoint(0); endPoint = curve.GetEndPoint(1); hasStartpoint = false; // Judge whether start point has been counted. @@ -482,7 +480,7 @@ Boolean CanCreateProfile() } } - if (pointArray.Count != m_analyticalLineCollection.Count) + if (pointArray.Count != m_lineCollection.Count) { return false; } @@ -499,11 +497,11 @@ Double FindBaseOffset() // Initialize the data. Double baseOffset = 0; // the offset from the m_level's elevation Double lowestElevation = 0; // the elevation of the lowest point - Curve curve = m_analyticalLineCollection[0] as Curve; + Curve curve = m_lineCollection[0] as Curve; lowestElevation = curve.GetEndPoint(0).Z; // Find out the elevation of the lowest point. - foreach (Curve c in m_analyticalLineCollection) + foreach (Curve c in m_lineCollection) { if (c.GetEndPoint(0).Z < lowestElevation) { @@ -529,11 +527,11 @@ Double FindTopOffset() // Initialize the data Double topOffset = 0; // the offset from the m_level's elevation Double highestElevation = 0; // the elevation of the highest point - Curve curve = m_analyticalLineCollection[0] as Curve; + Curve curve = m_lineCollection[0] as Curve; highestElevation = curve.GetEndPoint(0).Z; // Find out the elevation of the highest point. - foreach (Curve c in m_analyticalLineCollection) + foreach (Curve c in m_lineCollection) { if (c.GetEndPoint(0).Z > highestElevation) { diff --git a/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.csproj b/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.csproj index b974dc594..571c2c443 100644 --- a/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.csproj +++ b/SDK/Samples/CreateWallinBeamProfile/CS/CreateWallinBeamProfile.csproj @@ -21,7 +21,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -31,7 +30,6 @@ prompt 4 true - true @@ -40,8 +38,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -51,8 +48,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.cs b/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.cs index 489c5f972..e86533887 100644 --- a/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.cs +++ b/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.cs @@ -178,90 +178,89 @@ public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, // If everything goes right, return succeeded. return Autodesk.Revit.UI.Result.Succeeded; } - #endregion IExternalCommand Members Implementation + #endregion IExternalCommand Members Implementation - /// - /// Create the walls which along and under the path of the selected beams - /// - /// A reference of current document - /// true if there is no error in process; otherwise, false. - Boolean BeginCreate(Autodesk.Revit.DB.Document project) - { - // Begin to create walls along and under each beam - for (int i = 0; i < m_beamCollection.Count; i++) + /// + /// Create the walls which along and under the path of the selected beams + /// + /// A reference of current document + /// true if there is no error in process; otherwise, false. + Boolean BeginCreate(Autodesk.Revit.DB.Document project) + { + // Begin to create walls along and under each beam + for (int i = 0; i < m_beamCollection.Count; i++) + { + // Get each selected beam. + FamilyInstance m = m_beamCollection[i] as FamilyInstance; + if (null == m) { - // Get each selected beam. - FamilyInstance m = m_beamCollection[i] as FamilyInstance; - if (null == m) - { - m_errorInformation = "The program should not go here."; - return false; - } - - // Get the analytical model of the beam, - // the wall will be created using this model line as path. - AnalyticalModel model = m.GetAnalyticalModel(); - if (null == model) - { - m_errorInformation = "The beam should have analytical model."; - return false; - } + m_errorInformation = "The program should not go here."; + return false; + } - // Get the level using the beam's reference level - Autodesk.Revit.DB.ElementId levelId = m.get_Parameter(BuiltInParameter.INSTANCE_REFERENCE_LEVEL_PARAM).AsElementId(); - m_level = project.GetElement(levelId) as Level; - if (null == m_level) - { - m_errorInformation = "The program should not go here."; - return false; - } + // the wall will be created using beam's model line as path. + if (!(m.Location is LocationCurve)) + { + m_errorInformation = "The beam should have location curve."; + return false; + } + Curve beamCurve = (m.Location as LocationCurve).Curve; - Transaction t = new Transaction(project, Guid.NewGuid().GetHashCode().ToString()); - t.Start(); - Wall createdWall = Wall.Create(project, model.GetCurve(), m_selectedWallType.Id, - m_level.Id, 10, 0, true, m_isStructural); - if (null == createdWall) - { - m_errorInformation = "Can not create the walls"; - return false; - } + // Get the level using the beam's reference level + Autodesk.Revit.DB.ElementId levelId = m.get_Parameter(BuiltInParameter.INSTANCE_REFERENCE_LEVEL_PARAM).AsElementId(); + m_level = project.GetElement(levelId) as Level; + if (null == m_level) + { + m_errorInformation = "The program should not go here."; + return false; + } - // Modify some parameters of the created wall to make it look better. - Double offset = model.GetCurve().GetEndPoint(0).Z - m_level.Elevation; - createdWall.get_Parameter(BuiltInParameter.WALL_BASE_CONSTRAINT).Set(levelId); - createdWall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET).Set(offset - 3000 / 304.8); - createdWall.get_Parameter(BuiltInParameter.WALL_HEIGHT_TYPE).Set(levelId); - t.Commit(); + Transaction t = new Transaction(project, Guid.NewGuid().GetHashCode().ToString()); + t.Start(); + Wall createdWall = Wall.Create(project, beamCurve, m_selectedWallType.Id, + m_level.Id, 10, 0, true, m_isStructural); + if (null == createdWall) + { + m_errorInformation = "Can not create the walls"; + return false; } - return true; - } + // Modify some parameters of the created wall to make it look better. + Double offset = beamCurve.GetEndPoint(0).Z - m_level.Elevation; + createdWall.get_Parameter(BuiltInParameter.WALL_BASE_CONSTRAINT).Set(levelId); + createdWall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET).Set(offset - 3000 / 304.8); + createdWall.get_Parameter(BuiltInParameter.WALL_HEIGHT_TYPE).Set(levelId); + t.Commit(); + } + return true; + } - /// - /// Check whether all the beams have horizontal analytical line - /// - /// true if each beam has horizontal analytical line; otherwise, false. - Boolean CheckBeamHorizontal() - { - for (int i = 0; i < m_beamCollection.Count; i++) + + /// + /// Check whether all the beams have horizontal analytical line + /// + /// true if each beam has horizontal analytical line; otherwise, false. + Boolean CheckBeamHorizontal() + { + for (int i = 0; i < m_beamCollection.Count; i++) + { + // Get the analytical curve of each selected beam. + // And check if Z coordinate of start point and end point of the curve are same. + FamilyInstance m = m_beamCollection[i] as FamilyInstance; + Curve beamCurve = m.Location is LocationCurve ? (m.Location as LocationCurve).Curve : null; + if (null == beamCurve) { - // Get the analytical curve of each selected beam. - // And check if Z coordinate of start point and end point of the curve are same. - FamilyInstance m = m_beamCollection[i] as FamilyInstance; - AnalyticalModel model = m.GetAnalyticalModel(); - if (null == model) - { - m_errorInformation = "The beam should have analytical model."; - return false; - } - else if ((PRECISION <= model.GetCurve().GetEndPoint(0).Z - model.GetCurve().GetEndPoint(1).Z) - || (-PRECISION >= model.GetCurve().GetEndPoint(0).Z - model.GetCurve().GetEndPoint(1).Z)) - { - m_errorInformation = "Please only select horizontal beams."; - return false; - } + m_errorInformation = "The beam should have location curve."; + return false; } - return true; - } - } + else if ((PRECISION <= beamCurve.GetEndPoint(0).Z - beamCurve.GetEndPoint(1).Z) + || (-PRECISION >= beamCurve.GetEndPoint(0).Z - beamCurve.GetEndPoint(1).Z)) + { + m_errorInformation = "Please only select horizontal beams."; + return false; + } + } + return true; + } + } } diff --git a/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.csproj b/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.csproj index 50f025f7c..53e50d61b 100644 --- a/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.csproj +++ b/SDK/Samples/CreateWallsUnderBeams/CS/CreateWallsUnderBeams.csproj @@ -29,7 +29,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -39,7 +38,6 @@ prompt 4 true - true @@ -48,8 +46,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -59,8 +56,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CurtainSystem/CS/CurtainSystem.csproj b/SDK/Samples/CurtainSystem/CS/CurtainSystem.csproj index 9f71d4d56..04cc69b20 100644 --- a/SDK/Samples/CurtainSystem/CS/CurtainSystem.csproj +++ b/SDK/Samples/CurtainSystem/CS/CurtainSystem.csproj @@ -21,7 +21,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -31,7 +30,6 @@ prompt 4 true - true @@ -40,8 +38,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -51,8 +48,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CurtainWallGrid/CS/CurtainWallGrid.csproj b/SDK/Samples/CurtainWallGrid/CS/CurtainWallGrid.csproj index 78d8e16f2..ceb3c2f4d 100644 --- a/SDK/Samples/CurtainWallGrid/CS/CurtainWallGrid.csproj +++ b/SDK/Samples/CurtainWallGrid/CS/CurtainWallGrid.csproj @@ -21,7 +21,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -31,7 +30,6 @@ prompt 4 true - true @@ -40,8 +38,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -51,8 +48,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CurvedBeam/CS/CurvedBeam.csproj b/SDK/Samples/CurvedBeam/CS/CurvedBeam.csproj index 653957dd4..2d64d2fe2 100644 --- a/SDK/Samples/CurvedBeam/CS/CurvedBeam.csproj +++ b/SDK/Samples/CurvedBeam/CS/CurvedBeam.csproj @@ -21,7 +21,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -31,7 +30,6 @@ prompt 4 true - true @@ -40,8 +38,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -51,8 +48,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/CustomExporter/Custom2DExporter/CS/Custom2DExporter.csproj b/SDK/Samples/CustomExporter/Custom2DExporter/CS/Custom2DExporter.csproj index 23af58108..b1df80dab 100644 --- a/SDK/Samples/CustomExporter/Custom2DExporter/CS/Custom2DExporter.csproj +++ b/SDK/Samples/CustomExporter/Custom2DExporter/CS/Custom2DExporter.csproj @@ -24,7 +24,6 @@ 4 true bin\Debug\Custom2DExporter.XML - pdbonly @@ -33,7 +32,6 @@ TRACE prompt 4 - true @@ -42,8 +40,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset true bin\Debug\Custom2DExporter.xml @@ -55,8 +52,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset bin\Release\Custom2DExporter.xml diff --git a/SDK/Samples/DatumsModification/CS/DatumsModification.csproj b/SDK/Samples/DatumsModification/CS/DatumsModification.csproj index 286ed2d75..9dbd42e58 100644 --- a/SDK/Samples/DatumsModification/CS/DatumsModification.csproj +++ b/SDK/Samples/DatumsModification/CS/DatumsModification.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -30,7 +25,6 @@ 4 true bin\Debug\DatumsModification.XML - pdbonly @@ -40,7 +34,6 @@ prompt 4 true - true @@ -51,8 +44,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -62,8 +54,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DeckProperties/CS/Command.cs b/SDK/Samples/DeckProperties/CS/Command.cs index 2ed22c221..a4782b436 100644 --- a/SDK/Samples/DeckProperties/CS/Command.cs +++ b/SDK/Samples/DeckProperties/CS/Command.cs @@ -121,7 +121,7 @@ public Autodesk.Revit.UI.Result Execute(Autodesk.Revit.UI.ExternalCommandData co /// private void DumpSlab(Floor slab) { - m_displayForm.WriteLine("Dumping Slab" + slab.Id.IntegerValue.ToString()); + m_displayForm.WriteLine("Dumping Slab" + slab.Id.ToString()); Autodesk.Revit.DB.FloorType slabType = slab.FloorType; @@ -191,7 +191,7 @@ private void DumpParameters(Element element) value = parameter.AsDouble().ToString(); break; case Autodesk.Revit.DB.StorageType.ElementId: - value = parameter.AsElementId().IntegerValue.ToString(); + value = parameter.AsElementId().ToString(); break; case Autodesk.Revit.DB.StorageType.String: value = parameter.AsString(); diff --git a/SDK/Samples/DeckProperties/CS/DeckProperties.csproj b/SDK/Samples/DeckProperties/CS/DeckProperties.csproj index 782eb5ce9..b9b958cff 100644 --- a/SDK/Samples/DeckProperties/CS/DeckProperties.csproj +++ b/SDK/Samples/DeckProperties/CS/DeckProperties.csproj @@ -21,7 +21,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -31,7 +30,6 @@ prompt 4 true - true @@ -40,8 +38,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -51,8 +48,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DeleteDimensions/CS/DeleteDimensions.csproj b/SDK/Samples/DeleteDimensions/CS/DeleteDimensions.csproj index 7bc7f9350..e52506e79 100644 --- a/SDK/Samples/DeleteDimensions/CS/DeleteDimensions.csproj +++ b/SDK/Samples/DeleteDimensions/CS/DeleteDimensions.csproj @@ -29,7 +29,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -39,7 +38,6 @@ prompt 4 true - true @@ -48,8 +46,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -59,8 +56,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DesignOptionReader/VB.NET/DesignOptionReader.vbproj b/SDK/Samples/DesignOptionReader/VB.NET/DesignOptionReader.vbproj index b759a6524..15732f7f3 100644 --- a/SDK/Samples/DesignOptionReader/VB.NET/DesignOptionReader.vbproj +++ b/SDK/Samples/DesignOptionReader/VB.NET/DesignOptionReader.vbproj @@ -66,7 +66,6 @@ 1 42016,42017,42018,42019,42032 full - bin\ @@ -87,7 +86,6 @@ 1 42016,42017,42018,42019,42032 none - true @@ -100,8 +98,7 @@ 42016,42017,42018,42019,42032 full x64 - - + MinimumRecommendedRules.ruleset true @@ -112,8 +109,7 @@ true 42016,42017,42018,42019,42032 x64 - - + MinimumRecommendedRules.ruleset diff --git a/SDK/Samples/DimensionLeaderEnd/CS/DimensionLeaderEnd.csproj b/SDK/Samples/DimensionLeaderEnd/CS/DimensionLeaderEnd.csproj index 75f5599e3..39e1e626c 100644 --- a/SDK/Samples/DimensionLeaderEnd/CS/DimensionLeaderEnd.csproj +++ b/SDK/Samples/DimensionLeaderEnd/CS/DimensionLeaderEnd.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -24,14 +19,13 @@ true bin\x64\Debug\ DEBUG;TRACE - false - true + false + true full x64 prompt - - - + MinimumRecommendedRules.ruleset + bin\x64\Release\ TRACE @@ -40,20 +34,18 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset bin\Debug\ DEBUG;TRACE - false + false true full AnyCPU prompt - - - + MinimumRecommendedRules.ruleset + bin\Release\ TRACE @@ -62,8 +54,7 @@ pdbonly AnyCPU prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DirectionCalculation/CS/DirectionCalculation.csproj b/SDK/Samples/DirectionCalculation/CS/DirectionCalculation.csproj index 997473de2..27de9cebc 100644 --- a/SDK/Samples/DirectionCalculation/CS/DirectionCalculation.csproj +++ b/SDK/Samples/DirectionCalculation/CS/DirectionCalculation.csproj @@ -43,7 +43,6 @@ 4 - pdbonly @@ -53,7 +52,6 @@ prompt 4 true - true @@ -62,8 +60,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -73,8 +70,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DisableCommand/CS/DisableCommand.csproj b/SDK/Samples/DisableCommand/CS/DisableCommand.csproj index 642d5d29f..b865dc245 100644 --- a/SDK/Samples/DisableCommand/CS/DisableCommand.csproj +++ b/SDK/Samples/DisableCommand/CS/DisableCommand.csproj @@ -25,7 +25,6 @@ 4 true bin\Debug\DisableCommand.XML - pdbonly @@ -35,7 +34,6 @@ prompt 4 true - true @@ -46,8 +44,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -57,8 +54,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DisplacementElementAnimation/CS/DisplacementElementAnimation.csproj b/SDK/Samples/DisplacementElementAnimation/CS/DisplacementElementAnimation.csproj index 73f051f57..047e117cb 100644 --- a/SDK/Samples/DisplacementElementAnimation/CS/DisplacementElementAnimation.csproj +++ b/SDK/Samples/DisplacementElementAnimation/CS/DisplacementElementAnimation.csproj @@ -25,7 +25,6 @@ 4 true bin\Debug\DisplacementElementAnimation.XML - pdbonly @@ -35,7 +34,6 @@ prompt 4 true - true @@ -46,8 +44,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -57,8 +54,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DockableDialogs/CS/DockableDialogs.csproj b/SDK/Samples/DockableDialogs/CS/DockableDialogs.csproj index 020524b98..424e2ab56 100644 --- a/SDK/Samples/DockableDialogs/CS/DockableDialogs.csproj +++ b/SDK/Samples/DockableDialogs/CS/DockableDialogs.csproj @@ -25,7 +25,6 @@ 3 true bin\Debug\ScriptManager.xml - full @@ -35,7 +34,6 @@ prompt 4 true - true @@ -50,8 +48,7 @@ true GlobalSuppressions.cs prompt - - + MinimumRecommendedRules.ruleset ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets false ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules @@ -67,8 +64,7 @@ true GlobalSuppressions.cs prompt - - + MinimumRecommendedRules.ruleset ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets false ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules diff --git a/SDK/Samples/DocumentChanged/CS/ChangesMonitor.cs b/SDK/Samples/DocumentChanged/CS/ChangesMonitor.cs index a658a1583..276cce652 100644 --- a/SDK/Samples/DocumentChanged/CS/ChangesMonitor.cs +++ b/SDK/Samples/DocumentChanged/CS/ChangesMonitor.cs @@ -185,7 +185,7 @@ private void AddChangeInfoRow(ElementId id, Document doc, string changeType) { // this branch is for deleted element due to the deleted element cannot be retrieve from the document. newRow["ChangeType"] = changeType; - newRow["Id"] = id.IntegerValue.ToString(); + newRow["Id"] = id.ToString(); newRow["Name"] = ""; newRow["Category"] = ""; newRow["Document"] = ""; @@ -193,7 +193,7 @@ private void AddChangeInfoRow(ElementId id, Document doc, string changeType) else { newRow["ChangeType"] = changeType; - newRow["Id"] = id.IntegerValue.ToString(); + newRow["Id"] = id.ToString(); newRow["Name"] = elem.Name; newRow["Category"] = elem.Category.Name; newRow["Document"] = doc.Title; diff --git a/SDK/Samples/DocumentChanged/CS/ChangesMonitor.csproj b/SDK/Samples/DocumentChanged/CS/ChangesMonitor.csproj index c4aeebd03..f349f1030 100644 --- a/SDK/Samples/DocumentChanged/CS/ChangesMonitor.csproj +++ b/SDK/Samples/DocumentChanged/CS/ChangesMonitor.csproj @@ -22,7 +22,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -32,7 +31,6 @@ prompt 4 true - true @@ -41,8 +39,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -52,8 +49,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DoorSwing/CS/DoorFamilyGeometry.cs b/SDK/Samples/DoorSwing/CS/DoorFamilyGeometry.cs index c4e33e993..e004b2ed1 100644 --- a/SDK/Samples/DoorSwing/CS/DoorFamilyGeometry.cs +++ b/SDK/Samples/DoorSwing/CS/DoorFamilyGeometry.cs @@ -113,7 +113,7 @@ static private ViewPlan GetPlanform2DView(Autodesk.Revit.DB.Element door) IEnumerable viewPlans = from elem in new FilteredElementCollector(door.Document).OfClass(typeof(ViewPlan)).ToElements() let viewPlan = elem as ViewPlan - where viewPlan != null && !viewPlan.IsTemplate && viewPlan.GenLevel.Id.IntegerValue == door.LevelId.IntegerValue + where viewPlan != null && !viewPlan.IsTemplate && viewPlan.GenLevel.Id == door.LevelId select viewPlan; if (viewPlans.Count() > 0) { diff --git a/SDK/Samples/DoorSwing/CS/DoorSharedParameters.cs b/SDK/Samples/DoorSwing/CS/DoorSharedParameters.cs index d8c544495..f9e4d54c6 100644 --- a/SDK/Samples/DoorSwing/CS/DoorSharedParameters.cs +++ b/SDK/Samples/DoorSwing/CS/DoorSharedParameters.cs @@ -187,7 +187,7 @@ private static bool AlreadyAddedSharedParameter(Document doc, string paraName, B foreach (Category category in categories) { - if (category.Id.IntegerValue.Equals((int)boundCategory)) + if (category.BuiltInCategory == boundCategory) { return true; } diff --git a/SDK/Samples/DoorSwing/CS/DoorSwing.csproj b/SDK/Samples/DoorSwing/CS/DoorSwing.csproj index b08c9828a..da6033391 100644 --- a/SDK/Samples/DoorSwing/CS/DoorSwing.csproj +++ b/SDK/Samples/DoorSwing/CS/DoorSwing.csproj @@ -22,7 +22,6 @@ prompt 4 false - pdbonly @@ -32,7 +31,6 @@ prompt 4 true - true @@ -41,8 +39,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -52,8 +49,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DoorSwing/CS/DoorSwingData.cs b/SDK/Samples/DoorSwing/CS/DoorSwingData.cs index 8b29f678d..726800c59 100644 --- a/SDK/Samples/DoorSwing/CS/DoorSwingData.cs +++ b/SDK/Samples/DoorSwing/CS/DoorSwingData.cs @@ -427,7 +427,7 @@ private static void UpdateFromToRoomofOneDoor(FamilyInstance door, bool updateGe else if ((null != door.Room) && (null != door.FromRoom)) { // door.Room are consistent with door.FromRoom, so need update. - if (door.Room.Id.IntegerValue.Equals(door.FromRoom.Id.IntegerValue)) + if (door.Room.Id == door.FromRoom.Id) { if (updateGeo) // update geometry { diff --git a/SDK/Samples/DuplicateGraphics/CS/DuplicateGraphics.csproj b/SDK/Samples/DuplicateGraphics/CS/DuplicateGraphics.csproj index 443931afd..ec21c24e2 100644 --- a/SDK/Samples/DuplicateGraphics/CS/DuplicateGraphics.csproj +++ b/SDK/Samples/DuplicateGraphics/CS/DuplicateGraphics.csproj @@ -1,10 +1,5 @@  - - - None - - Debug AnyCPU @@ -30,7 +25,6 @@ 4 true bin\Debug\DuplicateGraphics.XML - pdbonly @@ -40,17 +34,10 @@ prompt 4 true - OnOutputUpdated - - - - - - diff --git a/SDK/Samples/DuplicateViews/CS/DuplicateViews.csproj b/SDK/Samples/DuplicateViews/CS/DuplicateViews.csproj index c0c2ae32a..3a700e7ed 100644 --- a/SDK/Samples/DuplicateViews/CS/DuplicateViews.csproj +++ b/SDK/Samples/DuplicateViews/CS/DuplicateViews.csproj @@ -25,7 +25,6 @@ 4 true bin\Debug\DuplicateViews.XML - pdbonly @@ -35,7 +34,6 @@ prompt 4 true - true @@ -46,8 +44,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -57,8 +54,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/DynamicModelUpdate/CS/DynamicModelUpdate.csproj b/SDK/Samples/DynamicModelUpdate/CS/DynamicModelUpdate.csproj index 0501fb196..d415bb890 100644 --- a/SDK/Samples/DynamicModelUpdate/CS/DynamicModelUpdate.csproj +++ b/SDK/Samples/DynamicModelUpdate/CS/DynamicModelUpdate.csproj @@ -22,7 +22,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -32,7 +31,6 @@ prompt 4 true - true @@ -41,8 +39,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -52,8 +49,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/FilterData.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/FilterData.cs index c903bd806..1f8145f3d 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/FilterData.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/FilterData.cs @@ -70,10 +70,6 @@ public sealed class FilterRuleBuilder /// public double Epsilon { get; private set; } - /// - /// Indicates if string comparison is case sensitive, valid only when ParamType is String - /// - public bool CaseSensitive { get; private set; } #endregion #region Class Public Properties @@ -94,8 +90,7 @@ public ElementId ParamId /// Parameter of FilterRule. /// Rule criteria. /// Rule value. - /// Indicates if rule value is case sensitive. - public FilterRuleBuilder(BuiltInParameter param, String ruleCriteria, String ruleValue, bool caseSensitive) + public FilterRuleBuilder(BuiltInParameter param, String ruleCriteria, String ruleValue) { InitializeMemebers(); // @@ -104,7 +99,6 @@ public FilterRuleBuilder(BuiltInParameter param, String ruleCriteria, String rul Parameter = param; RuleCriteria = ruleCriteria; RuleValue = ruleValue; - CaseSensitive = caseSensitive; } /// @@ -172,29 +166,29 @@ public FilterRule AsFilterRule() switch(RuleCriteria) { case RuleCriteraNames.BeginWith: - return PFRF.CreateBeginsWithRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateBeginsWithRule(paramId, RuleValue); case RuleCriteraNames.Contains: - return PFRF.CreateContainsRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateContainsRule(paramId, RuleValue); case RuleCriteraNames.EndsWith: - return PFRF.CreateEndsWithRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateEndsWithRule(paramId, RuleValue); case RuleCriteraNames.Equals_: - return PFRF.CreateEqualsRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateEqualsRule(paramId, RuleValue); case RuleCriteraNames.Greater: - return PFRF.CreateGreaterRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateGreaterRule(paramId, RuleValue); case RuleCriteraNames.GreaterOrEqual: - return PFRF.CreateGreaterOrEqualRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateGreaterOrEqualRule(paramId, RuleValue); case RuleCriteraNames.Less: - return PFRF.CreateLessRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateLessRule(paramId, RuleValue); case RuleCriteraNames.LessOrEqual: - return PFRF.CreateLessOrEqualRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateLessOrEqualRule(paramId, RuleValue); case RuleCriteraNames.NotBeginWith: - return PFRF.CreateNotBeginsWithRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateNotBeginsWithRule(paramId, RuleValue); case RuleCriteraNames.NotContains: - return PFRF.CreateNotContainsRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateNotContainsRule(paramId, RuleValue); case RuleCriteraNames.NotEndsWith: - return PFRF.CreateNotEndsWithRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateNotEndsWithRule(paramId, RuleValue); case RuleCriteraNames.NotEquals: - return PFRF.CreateNotEqualsRule(paramId, RuleValue, CaseSensitive); + return PFRF.CreateNotEqualsRule(paramId, RuleValue); } } else if (ParamType == StorageType.Double) @@ -238,17 +232,17 @@ public FilterRule AsFilterRule() switch(RuleCriteria) { case RuleCriteraNames.Equals_: - return PFRF.CreateEqualsRule(paramId, new ElementId(int.Parse(RuleValue))); + return PFRF.CreateEqualsRule(paramId, ElementId.Parse(RuleValue)); case RuleCriteraNames.Greater: - return PFRF.CreateGreaterRule(paramId, new ElementId(int.Parse(RuleValue))); + return PFRF.CreateGreaterRule(paramId, ElementId.Parse(RuleValue)); case RuleCriteraNames.GreaterOrEqual: - return PFRF.CreateGreaterOrEqualRule(paramId, new ElementId(int.Parse(RuleValue))); + return PFRF.CreateGreaterOrEqualRule(paramId, ElementId.Parse(RuleValue)); case RuleCriteraNames.Less: - return PFRF.CreateLessRule(paramId, new ElementId(int.Parse(RuleValue))); + return PFRF.CreateLessRule(paramId, ElementId.Parse(RuleValue)); case RuleCriteraNames.LessOrEqual: - return PFRF.CreateLessOrEqualRule(paramId, new ElementId(int.Parse(RuleValue))); + return PFRF.CreateLessOrEqualRule(paramId, ElementId.Parse(RuleValue)); case RuleCriteraNames.NotEquals: - return PFRF.CreateNotEqualsRule(paramId, new ElementId(int.Parse(RuleValue))); + return PFRF.CreateNotEqualsRule(paramId, ElementId.Parse(RuleValue)); } } // @@ -263,12 +257,11 @@ public FilterRule AsFilterRule() /// private void InitializeMemebers() { - Parameter = (BuiltInParameter)(ElementId.InvalidElementId.IntegerValue); + Parameter = BuiltInParameter.INVALID; RuleCriteria = String.Empty; RuleValue = String.Empty; ParamType = StorageType.None; Epsilon = 0.0f; - CaseSensitive = false; } #endregion } @@ -325,15 +318,18 @@ public IList GetCategoryIds() /// If someone parameter of criteria cannot be supported by new categories, /// the old criteria will be cleaned and set to empty /// - public bool SetNewCategories(ICollection newCatIds) + public bool SetNewCategories(List newCats) { // do nothing if new categories are equals to old categories - List newCats = new List(); - foreach (ElementId catId in newCatIds) - newCats.Add((BuiltInCategory)catId.IntegerValue); if (ListCompareUtility.Equals(newCats, m_filterCategories)) return false; m_filterCategories = newCats; // update categories + + List newCatIds = new List(); + foreach (BuiltInCategory cat in newCats) + { + newCatIds.Add(new ElementId(cat)); + } // // Check if need to update file rules: // . if filer rule is empty, do nothing diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/FilterUtil.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/FilterUtil.cs index 00f669089..156d2cf38 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/FilterUtil.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/FilterUtil.cs @@ -74,7 +74,7 @@ public static FilterRuleBuilder CreateFilterRuleBuilder(BuiltInParameter param, { FilterStringRule strRule = innerRule as FilterStringRule; FilterStringRuleEvaluator evaluator = strRule.GetEvaluator(); - return new FilterRuleBuilder(param, GetEvaluatorCriteriaName(evaluator, inverted), strRule.RuleString, strRule.RuleString.ToLower() == strRule.RuleString ? false : true); + return new FilterRuleBuilder(param, GetEvaluatorCriteriaName(evaluator, inverted), strRule.RuleString); } else if (innerRule is FilterDoubleRule) { diff --git a/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.cs b/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.cs index 102cbebab..1fbd542e6 100644 --- a/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.cs +++ b/SDK/Samples/ElementFilter/ViewFilters/CS/ViewFiltersForm.cs @@ -190,7 +190,6 @@ private void categoryCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs // // Get all selected categories, include one which is going to be checked List selCats = new List(); - List selCatIds = new List(); int itemCount = categoryCheckedListBox.Items.Count; for (int ii = 0; ii < itemCount; ii++) { @@ -210,12 +209,11 @@ private void categoryCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs String curCat = categoryCheckedListBox.GetItemText(categoryCheckedListBox.Items[ii]); BuiltInCategory param = EnumParseUtility.Parse(curCat); selCats.Add(param); - selCatIds.Add(new ElementId(param)); } } // // Reset accordingly controls - bool changed = m_currentFilterData.SetNewCategories(selCatIds); + bool changed = m_currentFilterData.SetNewCategories(selCats); if (!changed) return; // @@ -330,7 +328,6 @@ private void paramerComboBox_SelectedIndexChanged(object sender, EventArgs e) { criteriaComboBox.SelectedItem = currentRule.RuleCriteria; ruleValueComboBox.Text = currentRule.RuleValue; - caseSensitiveCheckBox.Checked = currentRule.CaseSensitive; epsilonTextBox.Text = String.Format("{0:N6}", currentRule.Epsilon); } else @@ -338,7 +335,6 @@ private void paramerComboBox_SelectedIndexChanged(object sender, EventArgs e) // set with default value criteriaComboBox.SelectedIndex = 0; ruleValueComboBox.Text = String.Empty; - caseSensitiveCheckBox.Checked = false; epsilonTextBox.Text = "0.0"; } } @@ -690,7 +686,6 @@ void ResetControls_NoFilter() paramerComboBox.Enabled = false; criteriaComboBox.Enabled = false; ruleValueComboBox.Enabled = false; - caseSensitiveCheckBox.Visible = false; epsilonLabel.Visible = false; epsilonTextBox.Visible = false; newRuleButton.Enabled = false; @@ -717,7 +712,6 @@ void ResetControls_NoFilterRule() { criteriaComboBox.Enabled = false; ruleValueComboBox.Enabled = false; - caseSensitiveCheckBox.Enabled = false; newRuleButton.Enabled = false; deleRuleButton.Enabled = false; } @@ -759,19 +753,15 @@ void ResetControlByParamType(StorageType paramType) { if (paramType == StorageType.String) { - caseSensitiveCheckBox.Visible = true; - caseSensitiveCheckBox.Enabled = true; epsilonLabel.Visible = epsilonTextBox.Visible = false; } else if (paramType == StorageType.Double) { - caseSensitiveCheckBox.Visible = false; epsilonLabel.Visible = epsilonTextBox.Visible = true; epsilonLabel.Enabled = epsilonTextBox.Enabled = true; } else { - caseSensitiveCheckBox.Visible = false; epsilonLabel.Visible = epsilonTextBox.Visible = false; } } @@ -887,8 +877,7 @@ FilterRuleBuilder CreateNewFilterRule(BuiltInParameter curParam) String criteria = criteriaComboBox.SelectedItem as String; if (paramType == StorageType.String) { - return new FilterRuleBuilder(curParam, criteria, - ruleValueComboBox.Text, caseSensitiveCheckBox.Checked); + return new FilterRuleBuilder(curParam, criteria, ruleValueComboBox.Text); } else if (paramType == StorageType.Double) { diff --git a/SDK/Samples/ErrorHandling/CS/ErrorHandling.csproj b/SDK/Samples/ErrorHandling/CS/ErrorHandling.csproj index 112c095bf..dd7d5e4da 100644 --- a/SDK/Samples/ErrorHandling/CS/ErrorHandling.csproj +++ b/SDK/Samples/ErrorHandling/CS/ErrorHandling.csproj @@ -24,7 +24,6 @@ false - pdbonly @@ -34,7 +33,6 @@ prompt 4 true - true @@ -43,8 +41,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -54,8 +51,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/Events/AutoStamp/CS/AutoStamp.csproj b/SDK/Samples/Events/AutoStamp/CS/AutoStamp.csproj index 5de464ce9..4f3b28e2b 100644 --- a/SDK/Samples/Events/AutoStamp/CS/AutoStamp.csproj +++ b/SDK/Samples/Events/AutoStamp/CS/AutoStamp.csproj @@ -43,7 +43,6 @@ 4 - pdbonly @@ -53,7 +52,6 @@ prompt 4 true - true @@ -62,8 +60,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -73,8 +70,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/Events/AutoUpdate/CS/AutoUpdate.csproj b/SDK/Samples/Events/AutoUpdate/CS/AutoUpdate.csproj index 21827481b..0e5da6899 100644 --- a/SDK/Samples/Events/AutoUpdate/CS/AutoUpdate.csproj +++ b/SDK/Samples/Events/AutoUpdate/CS/AutoUpdate.csproj @@ -21,7 +21,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -31,7 +30,6 @@ prompt 4 true - true @@ -40,8 +38,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -51,8 +48,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/Events/CancelSave/CS/CancelSave.csproj b/SDK/Samples/Events/CancelSave/CS/CancelSave.csproj index 5eda97bf3..fb92f140b 100644 --- a/SDK/Samples/Events/CancelSave/CS/CancelSave.csproj +++ b/SDK/Samples/Events/CancelSave/CS/CancelSave.csproj @@ -21,7 +21,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -31,7 +30,6 @@ prompt 4 true - true @@ -40,8 +38,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -51,8 +48,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/Events/EventsMonitor/CS/EventManager.cs b/SDK/Samples/Events/EventsMonitor/CS/EventManager.cs index d211b0472..ee234847f 100644 --- a/SDK/Samples/Events/EventsMonitor/CS/EventManager.cs +++ b/SDK/Samples/Events/EventsMonitor/CS/EventManager.cs @@ -188,6 +188,10 @@ private void addEvents(String eventName) case "ProgressChanged": m_app.ControlledApplication.ProgressChanged += new EventHandler(app_eventsHandlerMethod); break; + case "SelectionChanged": + m_app.SelectionChanged += new EventHandler(app_eventsHandlerMethod); + break; + } } @@ -268,8 +272,10 @@ private void subtractEvents(String eventName) case "ProgressChanged": m_app.ControlledApplication.ProgressChanged -= app_eventsHandlerMethod; break; - - } + case "SelectionChanged": + m_app.SelectionChanged -= app_eventsHandlerMethod; + break; + } } /// diff --git a/SDK/Samples/Events/EventsMonitor/CS/EventsMonitor.csproj b/SDK/Samples/Events/EventsMonitor/CS/EventsMonitor.csproj index e6290b604..24eaf61f1 100644 --- a/SDK/Samples/Events/EventsMonitor/CS/EventsMonitor.csproj +++ b/SDK/Samples/Events/EventsMonitor/CS/EventsMonitor.csproj @@ -22,7 +22,6 @@ prompt 4 false - pdbonly @@ -32,7 +31,6 @@ prompt 4 true - true @@ -41,8 +39,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -52,8 +49,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/Events/EventsMonitor/CS/EventsSettingForm.designer.cs b/SDK/Samples/Events/EventsMonitor/CS/EventsSettingForm.designer.cs index 6ba2dcf01..eee3643a9 100644 --- a/SDK/Samples/Events/EventsMonitor/CS/EventsSettingForm.designer.cs +++ b/SDK/Samples/Events/EventsMonitor/CS/EventsSettingForm.designer.cs @@ -28,60 +28,60 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.FinishToggle = new System.Windows.Forms.Button(); - this.checkAllButton = new System.Windows.Forms.Button(); - this.checkNoneButton = new System.Windows.Forms.Button(); - this.cancelButton = new System.Windows.Forms.Button(); - this.AppEventsCheckedList = new System.Windows.Forms.CheckedListBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.SuspendLayout(); - // - // FinishToggle - // - this.FinishToggle.DialogResult = System.Windows.Forms.DialogResult.OK; - this.FinishToggle.Location = new System.Drawing.Point(232, 225); - this.FinishToggle.Name = "FinishToggle"; - this.FinishToggle.Size = new System.Drawing.Size(75, 23); - this.FinishToggle.TabIndex = 1; - this.FinishToggle.Text = "&OK"; - this.FinishToggle.UseVisualStyleBackColor = true; - this.FinishToggle.Click += new System.EventHandler(this.FinishToggle_Click); - // - // checkAllButton - // - this.checkAllButton.Location = new System.Drawing.Point(317, 7); - this.checkAllButton.Name = "checkAllButton"; - this.checkAllButton.Size = new System.Drawing.Size(75, 23); - this.checkAllButton.TabIndex = 3; - this.checkAllButton.Text = "&Select All"; - this.checkAllButton.UseVisualStyleBackColor = true; - this.checkAllButton.Click += new System.EventHandler(this.checkAllButton_Click); - // - // checkNoneButton - // - this.checkNoneButton.Location = new System.Drawing.Point(317, 47); - this.checkNoneButton.Name = "checkNoneButton"; - this.checkNoneButton.Size = new System.Drawing.Size(75, 23); - this.checkNoneButton.TabIndex = 4; - this.checkNoneButton.Text = "&Unselect All"; - this.checkNoneButton.UseVisualStyleBackColor = true; - this.checkNoneButton.Click += new System.EventHandler(this.checkNoneButton_Click); - // - // cancelButton - // - this.cancelButton.Location = new System.Drawing.Point(317, 225); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(75, 23); - this.cancelButton.TabIndex = 4; - this.cancelButton.Text = "&Cancel"; - this.cancelButton.UseVisualStyleBackColor = true; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // AppEventsCheckedList - // - this.AppEventsCheckedList.CheckOnClick = true; - this.AppEventsCheckedList.FormattingEnabled = true; - this.AppEventsCheckedList.Items.AddRange(new object[] { + this.FinishToggle = new System.Windows.Forms.Button(); + this.checkAllButton = new System.Windows.Forms.Button(); + this.checkNoneButton = new System.Windows.Forms.Button(); + this.cancelButton = new System.Windows.Forms.Button(); + this.AppEventsCheckedList = new System.Windows.Forms.CheckedListBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.SuspendLayout(); + // + // FinishToggle + // + this.FinishToggle.DialogResult = System.Windows.Forms.DialogResult.OK; + this.FinishToggle.Location = new System.Drawing.Point(232, 225); + this.FinishToggle.Name = "FinishToggle"; + this.FinishToggle.Size = new System.Drawing.Size(75, 23); + this.FinishToggle.TabIndex = 1; + this.FinishToggle.Text = "&OK"; + this.FinishToggle.UseVisualStyleBackColor = true; + this.FinishToggle.Click += new System.EventHandler(this.FinishToggle_Click); + // + // checkAllButton + // + this.checkAllButton.Location = new System.Drawing.Point(317, 7); + this.checkAllButton.Name = "checkAllButton"; + this.checkAllButton.Size = new System.Drawing.Size(75, 23); + this.checkAllButton.TabIndex = 3; + this.checkAllButton.Text = "&Select All"; + this.checkAllButton.UseVisualStyleBackColor = true; + this.checkAllButton.Click += new System.EventHandler(this.checkAllButton_Click); + // + // checkNoneButton + // + this.checkNoneButton.Location = new System.Drawing.Point(317, 47); + this.checkNoneButton.Name = "checkNoneButton"; + this.checkNoneButton.Size = new System.Drawing.Size(75, 23); + this.checkNoneButton.TabIndex = 4; + this.checkNoneButton.Text = "&Unselect All"; + this.checkNoneButton.UseVisualStyleBackColor = true; + this.checkNoneButton.Click += new System.EventHandler(this.checkNoneButton_Click); + // + // cancelButton + // + this.cancelButton.Location = new System.Drawing.Point(317, 225); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(75, 23); + this.cancelButton.TabIndex = 4; + this.cancelButton.Text = "&Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // AppEventsCheckedList + // + this.AppEventsCheckedList.CheckOnClick = true; + this.AppEventsCheckedList.FormattingEnabled = true; + this.AppEventsCheckedList.Items.AddRange(new object[] { "DocumentCreating", "DocumentCreated", "DocumentOpening", @@ -104,40 +104,41 @@ private void InitializeComponent() "ViewActivated", "DocumentSynchronizingWithCentral", "DocumentSynchronizedWithCentral", - "ProgressChanged"}); - this.AppEventsCheckedList.Location = new System.Drawing.Point(7, 7); - this.AppEventsCheckedList.Name = "AppEventsCheckedList"; - this.AppEventsCheckedList.Size = new System.Drawing.Size(304, 199); - this.AppEventsCheckedList.TabIndex = 2; - // - // groupBox1 - // - this.groupBox1.BackColor = System.Drawing.SystemColors.ActiveCaptionText; - this.groupBox1.Location = new System.Drawing.Point(0, 218); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(406, 1); - this.groupBox1.TabIndex = 5; - this.groupBox1.TabStop = false; - // - // ToggleForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(400, 254); - this.Controls.Add(this.AppEventsCheckedList); - this.Controls.Add(this.groupBox1); - this.Controls.Add(this.checkAllButton); - this.Controls.Add(this.FinishToggle); - this.Controls.Add(this.checkNoneButton); - this.Controls.Add(this.cancelButton); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ToggleForm"; - this.ShowInTaskbar = false; - this.Text = "Events Tracking Setting"; - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ToggleForm_FormClosed); - this.ResumeLayout(false); + "ProgressChanged", + "SelectionChanged"}); + this.AppEventsCheckedList.Location = new System.Drawing.Point(7, 7); + this.AppEventsCheckedList.Name = "AppEventsCheckedList"; + this.AppEventsCheckedList.Size = new System.Drawing.Size(304, 199); + this.AppEventsCheckedList.TabIndex = 2; + // + // groupBox1 + // + this.groupBox1.BackColor = System.Drawing.SystemColors.ActiveCaptionText; + this.groupBox1.Location = new System.Drawing.Point(0, 218); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(406, 1); + this.groupBox1.TabIndex = 5; + this.groupBox1.TabStop = false; + // + // EventsSettingForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(400, 254); + this.Controls.Add(this.AppEventsCheckedList); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.checkAllButton); + this.Controls.Add(this.FinishToggle); + this.Controls.Add(this.checkNoneButton); + this.Controls.Add(this.cancelButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "EventsSettingForm"; + this.ShowInTaskbar = false; + this.Text = "Events Tracking Setting"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ToggleForm_FormClosed); + this.ResumeLayout(false); } diff --git a/SDK/Samples/Events/PrintLog/CS/PrintLog.csproj b/SDK/Samples/Events/PrintLog/CS/PrintLog.csproj index b976fe0c4..dfa688007 100644 --- a/SDK/Samples/Events/PrintLog/CS/PrintLog.csproj +++ b/SDK/Samples/Events/PrintLog/CS/PrintLog.csproj @@ -36,7 +36,6 @@ DEBUG;TRACE prompt 4 - pdbonly @@ -46,7 +45,6 @@ prompt 4 true - true @@ -55,8 +53,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -66,8 +63,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/Events/ProgressNotifier/CS/ProgressNotifier.csproj b/SDK/Samples/Events/ProgressNotifier/CS/ProgressNotifier.csproj index 798536195..fdf513dc1 100644 --- a/SDK/Samples/Events/ProgressNotifier/CS/ProgressNotifier.csproj +++ b/SDK/Samples/Events/ProgressNotifier/CS/ProgressNotifier.csproj @@ -24,7 +24,6 @@ 4 true bin\Debug\ProgressNotifier.xml - pdbonly @@ -34,7 +33,6 @@ prompt 4 true - true @@ -45,8 +43,7 @@ full x64 prompt - - + MinimumRecommendedRules.ruleset bin\x64\Release\ @@ -56,8 +53,7 @@ pdbonly x64 prompt - - + MinimumRecommendedRules.ruleset OnOutputUpdated diff --git a/SDK/Samples/Events/SelectionChanged/CS/Command.cs b/SDK/Samples/Events/SelectionChanged/CS/Command.cs new file mode 100644 index 000000000..b8f5faca0 --- /dev/null +++ b/SDK/Samples/Events/SelectionChanged/CS/Command.cs @@ -0,0 +1,80 @@ +// +// (C) Copyright 2003-2021 by Autodesk, Inc. +// +// Permission to use, copy, modify, and distribute this software in +// object code form for any purpose and without fee is hereby granted, +// provided that the above copyright notice appears in all copies and +// that both that copyright notice and the limited warranty and +// restricted rights notice below appear in all supporting +// documentation. +// +// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. +// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF +// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. +// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE +// UNINTERRUPTED OR ERROR FREE. +// +// Use, duplication, or disclosure by the U.S. Government is subject to +// restrictions set forth in FAR 52.227-19 (Commercial Computer +// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) +// (Rights in Technical Data and Computer Software), as applicable. +// + +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Revit.SDK.Samples.SelectionChanged.CS +{ + /// + /// This class inherits IExternalCommand interface and is used to show the SelectionChanged event + /// monitor window + /// + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + [Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)] + public class Command : IExternalCommand + { + #region Class Interface Implementation + /// + /// Implement this method as an external command for Revit. + /// + /// An object that is passed to the external application + /// which contains data related to the command, + /// such as the application object and active view. + /// 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. + /// A set of elements to which the external application + /// can add elements that are to be highlighted in case of failure or cancellation. + /// 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. + public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, + ref string message, + ElementSet elements) + { + // track the selected events by showing the information in the information windows. + if(SelectionChanged.InfoWindow == null) + { + SelectionChanged.InfoWindow = new InfoWindow(); + SelectionChanged.InfoWindow.Show(); + } + else + { + SelectionChanged.InfoWindow.Focus(); + } + + + + return Autodesk.Revit.UI.Result.Succeeded; + } + #endregion + } +} diff --git a/SDK/Samples/Events/SelectionChanged/CS/InfoWindow.xaml b/SDK/Samples/Events/SelectionChanged/CS/InfoWindow.xaml new file mode 100644 index 000000000..9c8e81f40 --- /dev/null +++ b/SDK/Samples/Events/SelectionChanged/CS/InfoWindow.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + +