Skip to content

Update code to SAP2000 v.20 API #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
9 changes: 9 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ExpandedNodes": [
"",
"\\src",
"\\src\\SAPConnection"
],
"SelectedNode": "\\src\\SAPConnection\\Utilities.cs",
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
Binary file added src/.vs/DynamoSAP/DesignTimeBuild/.dtbcache
Binary file not shown.
Empty file.
Binary file added src/.vs/DynamoSAP/v15/Server/sqlite3/storage.ide
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/DynamoSAP/Analysis/RunAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Autodesk.DesignScript.Runtime;

//SAP
using SAP2000v16;
using SAP2000v20;
using SAPConnection;
using DynamoSAP.Assembly;
using DynamoSAP.Structure;
Expand Down
6 changes: 3 additions & 3 deletions src/DynamoSAP/Assembly/Bake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using DynamoUnits;

//SAP
using SAP2000v16;
using SAP2000v20;

namespace DynamoSAP.Assembly
{
Expand Down Expand Up @@ -396,7 +396,7 @@ private static void CreateorUpdateSAPModel(ref StructuralModel StructuralModel,
//1. INSTANTIATE NEW OR GRAB OPEN SAPMODEL

// check if any SAP file is open, grab
SAP2000v16.SapObject mySapObject = null;
SAP2000v20.cSapModel mySapObject = null;
string ModelUnits = string.Empty;

// Open & instantiate SAP file
Expand All @@ -411,7 +411,7 @@ private static void CreateorUpdateSAPModel(ref StructuralModel StructuralModel,
}
catch (Exception)
{
SAPConnection.Initialize.Release(ref mySapObject, ref mySapModel);
//SAPConnection.Initialize.Release(ref mySapObject, ref mySapModel);
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/DynamoSAP/Assembly/Read.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using Autodesk.DesignScript.Runtime;

using SAPConnection;
using SAP2000v16;
using SAP2000v20;

namespace DynamoSAP.Assembly
{
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoSAP/Definitions/SectionProp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Autodesk.DesignScript.Runtime;

//SAP
using SAP2000v16;
using SAP2000v20;
using SAPConnection;

namespace DynamoSAP.Definitions
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoSAP/Definitions/ShellProp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Autodesk.DesignScript.Runtime;

//SAP
using SAP2000v16;
using SAP2000v20;
using SAPConnection;

namespace DynamoSAP.Definitions
Expand Down
117 changes: 91 additions & 26 deletions src/DynamoSAP/DynamoSAP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,45 +41,94 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="DSCoreNodes">
<HintPath>$(DYNAMO_API)\DSCoreNodes.dll</HintPath>
<Private>False</Private>
<Reference Include="Analysis, Version=1.3.0.1281, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.DynamoCoreNodes.1.3.0\lib\net45\Analysis.dll</HintPath>
</Reference>
<Reference Include="DynamoCore">
<HintPath>$(DYNAMO_API)\DynamoCore.dll</HintPath>
<Private>False</Private>
<Reference Include="CoreNodeModels, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.WpfUILibrary.1.3.0\lib\net45\CoreNodeModels.dll</HintPath>
</Reference>
<Reference Include="DynamoServices">
<HintPath>$(DYNAMO_API)\DynamoServices.dll</HintPath>
<Private>False</Private>
<Reference Include="CoreNodeModelsWpf, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.WpfUILibrary.1.3.0\lib\net45\CoreNodeModelsWpf.dll</HintPath>
</Reference>
<Reference Include="DynamoUnits">
<HintPath>$(DYNAMO_API)\DynamoUnits.dll</HintPath>
<Private>False</Private>
<Reference Include="Display, Version=1.3.0.1281, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.DynamoCoreNodes.1.3.0\lib\net45\Display.dll</HintPath>
</Reference>
<Reference Include="DSCoreNodes, Version=1.3.0.1281, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.DynamoCoreNodes.1.3.0\lib\net45\DSCoreNodes.dll</HintPath>
</Reference>
<Reference Include="DSIronPython, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.Core.1.3.0\lib\net45\DSIronPython.dll</HintPath>
</Reference>
<Reference Include="DynamoApplications, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.Core.1.3.0\lib\net45\DynamoApplications.dll</HintPath>
</Reference>
<Reference Include="DynamoCore, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.Core.1.3.0\lib\net45\DynamoCore.dll</HintPath>
</Reference>
<Reference Include="DynamoCoreWpf, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.WpfUILibrary.1.3.0\lib\net45\DynamoCoreWpf.dll</HintPath>
</Reference>
<Reference Include="DynamoInstallDetective, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.Core.1.3.0\lib\net45\DynamoInstallDetective.dll</HintPath>
</Reference>
<Reference Include="DynamoServices, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.DynamoServices.1.3.0\lib\net45\DynamoServices.dll</HintPath>
</Reference>
<Reference Include="DynamoShapeManager, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.Core.1.3.0\lib\net45\DynamoShapeManager.dll</HintPath>
</Reference>
<Reference Include="DynamoUnits, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.ZeroTouchLibrary.1.3.0\lib\net45\DynamoUnits.dll</HintPath>
</Reference>
<Reference Include="DynamoUtilities, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.Core.1.3.0\lib\net45\DynamoUtilities.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.4.1.0.0\lib\NET40\Microsoft.Expression.Interactions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Practices.Prism, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.4.1.0.0\lib\NET40\Microsoft.Practices.Prism.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Practices.Prism.Interactivity, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.4.1.0.0\lib\NET40\Microsoft.Practices.Prism.Interactivity.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.1.0\lib\NET35\Microsoft.Practices.ServiceLocation.dll</HintPath>
</Reference>
<Reference Include="NodeServices2, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.DynamoServices.1.3.0\lib\net45\NodeServices2.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="ProtoCore">
<HintPath>$(DYNAMO_API)\ProtoCore.dll</HintPath>
<Private>False</Private>
<Reference Include="PresentationFramework" />
<Reference Include="ProtoCore, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.Core.1.3.0\lib\net45\ProtoCore.dll</HintPath>
</Reference>
<Reference Include="ProtoGeometry">
<HintPath>$(DYNAMO_API)\ProtoGeometry.dll</HintPath>
<Private>False</Private>
<Reference Include="ProtoGeometry, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.ZeroTouchLibrary.1.3.0\lib\net45\ProtoGeometry.dll</HintPath>
</Reference>
<Reference Include="SAP2000v16">
<HintPath>$(SAP2000v16_API)\SAP2000v16.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
<Reference Include="RevitAPI">
<HintPath>C:\Program Files\Autodesk\Revit 2018\RevitAPI.dll</HintPath>
</Reference>
<Reference Include="SAPConnection">
<HintPath>..\SAPConnection\bin\SAPConnection.dll</HintPath>
<Reference Include="SAP2000v20">
<HintPath>C:\Program Files\Computers and Structures\SAP2000 20\SAP2000v20.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.4.1.0.0\lib\NET40\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="VMDataBridge, Version=1.3.0.961, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynamoVisualProgramming.Core.1.3.0\lib\net45\VMDataBridge.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
Expand All @@ -106,13 +155,29 @@
<Compile Include="Text.cs" />
<Compile Include="TracedFrameManager.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="DynamoSAP_DynamoCustomization.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SAPConnection\SAPConnection.csproj">
<Project>{c9658348-abb5-4369-80b9-eb46f21df577}</Project>
<Name>SAPConnection</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)\DynamoSAP_DynamoCustomization.xml" "$(TargetDir)\DynamoSAP_DynamoCustomization.xml"</PostBuildEvent>
<PostBuildEvent>copy "$(ProjectDir)\DynamoSAP_DynamoCustomization.xml" "$(TargetDir)\DynamoSAP_DynamoCustomization.xml"

xcopy /Y "$(TargetDir)*.*" "$(AppData)\Dynamo\Dynamo Revit\1.3\packages\DynamoSap2\bin\"

xcopy /Y "$(ProjectDir)pkg.json" "$(AppData)\Dynamo\Dynamo Revit\1.3\packages\DynamoSap2"

xcopy /Y "$(TargetDir)*.*" "$(AppData)\Dynamo\Dynamo Core\1.3\packages\DynamoSap2\bin\"

xcopy /Y "$(ProjectDir)pkg.json" "$(AppData)\Dynamo\Dynamo Core\1.3\packages\DynamoSap2"</PostBuildEvent>
</PropertyGroup>
<Target Name="AfterBuild">
<ItemGroup>
Expand All @@ -135,4 +200,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
2 changes: 1 addition & 1 deletion src/DynamoSAP/Structure/Frame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using DynamoServices;

//SAP
using SAP2000v16;
using SAP2000v20;
using SAPConnection;


Expand Down
2 changes: 1 addition & 1 deletion src/DynamoSAP/Structure/Joint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using DynamoServices;

//SAP
using SAP2000v16;
using SAP2000v20;
using SAPConnection;


Expand Down
2 changes: 1 addition & 1 deletion src/DynamoSAP/Structure/Shell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using DynamoServices;

//SAP
using SAP2000v16;
using SAP2000v20;
using SAPConnection;


Expand Down
11 changes: 11 additions & 0 deletions src/DynamoSAP/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="1.0" targetFramework="net45" />
<package id="DynamoVisualProgramming.Core" version="1.3.0" targetFramework="net45" />
<package id="DynamoVisualProgramming.DynamoCoreNodes" version="1.3.0" targetFramework="net45" />
<package id="DynamoVisualProgramming.DynamoServices" version="1.3.0" targetFramework="net45" />
<package id="DynamoVisualProgramming.WpfUILibrary" version="1.3.0" targetFramework="net45" />
<package id="DynamoVisualProgramming.ZeroTouchLibrary" version="1.3.0" targetFramework="net45" />
<package id="NUnit" version="2.6.3" targetFramework="net45" />
<package id="Prism" version="4.1.0.0" targetFramework="net45" />
</packages>
Loading