添加项目文件。
This commit is contained in:
15
KGdev.BI3D.Revit.Common/IAuthProvider.cs
Normal file
15
KGdev.BI3D.Revit.Common/IAuthProvider.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IAuthProvider
|
||||
{
|
||||
bool TryUpdateToken(string key);
|
||||
|
||||
bool ValidateToken(string token);
|
||||
|
||||
bool IsTrial(string token);
|
||||
|
||||
int LicenseTypeInt(string token);
|
||||
}
|
||||
}
|
||||
15
KGdev.BI3D.Revit.Common/IBI3DViewsProvider.cs
Normal file
15
KGdev.BI3D.Revit.Common/IBI3DViewsProvider.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IBI3DViewsProvider
|
||||
{
|
||||
View3D GetContextView3D(Document document);
|
||||
|
||||
List<View3D> GetScenes(Document document);
|
||||
|
||||
string GetSceneName(View3D view3d);
|
||||
}
|
||||
}
|
||||
15
KGdev.BI3D.Revit.Common/IConstantsProvider.cs
Normal file
15
KGdev.BI3D.Revit.Common/IConstantsProvider.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IConstantsProvider
|
||||
{
|
||||
string ProductId { get; }
|
||||
|
||||
string PurchaseUrl { get; }
|
||||
|
||||
string ViewerAndExamplesFolderName { get; }
|
||||
|
||||
string TrialKey { get; }
|
||||
}
|
||||
}
|
||||
24
KGdev.BI3D.Revit.Common/IDataExporter.cs
Normal file
24
KGdev.BI3D.Revit.Common/IDataExporter.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Autodesk.Revit.DB;
|
||||
using KGdev.BI3D.Revit.Common.Models;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IDataExporter
|
||||
{
|
||||
string Name { get; }
|
||||
|
||||
string Description { get; }
|
||||
|
||||
string Extension { get; }
|
||||
|
||||
List<IOptionDefinition> Options { get; }
|
||||
|
||||
void Export(
|
||||
Document rootDocument,
|
||||
List<LinkedElementIdPath> exportedElementIdPaths,
|
||||
string path
|
||||
);
|
||||
}
|
||||
}
|
||||
10
KGdev.BI3D.Revit.Common/IElementIdProvider.cs
Normal file
10
KGdev.BI3D.Revit.Common/IElementIdProvider.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using KGdev.BI3D.Revit.Common.Models;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IElementIdProvider
|
||||
{
|
||||
string GetElementId(LinkedElementIdPath elementIdPath);
|
||||
}
|
||||
}
|
||||
20
KGdev.BI3D.Revit.Common/IExporter.cs
Normal file
20
KGdev.BI3D.Revit.Common/IExporter.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Autodesk.Revit.DB;
|
||||
using KGdev.BI3D.Revit.Common.Models;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IExporter
|
||||
{
|
||||
string Description { get; }
|
||||
|
||||
List<IOptionDefinition> Options { get; }
|
||||
|
||||
Dictionary<string, LinkedElementIdPath> Export(
|
||||
View3D objectsView,
|
||||
string path,
|
||||
Dictionary<string, object> optionValues
|
||||
);
|
||||
}
|
||||
}
|
||||
22
KGdev.BI3D.Revit.Common/IGlobalStore.cs
Normal file
22
KGdev.BI3D.Revit.Common/IGlobalStore.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IGlobalStore
|
||||
{
|
||||
string GetToken();
|
||||
|
||||
void SetToken(string token);
|
||||
|
||||
string GetKey();
|
||||
|
||||
void SetKey(string key);
|
||||
|
||||
string GetAppTempDirectoryPath();
|
||||
|
||||
Dictionary<string, object> GetDefaultExporterChosenOptionValues();
|
||||
|
||||
void SetDefaultExporterChosenOptionValues(Dictionary<string, object> valuesDictionary);
|
||||
}
|
||||
}
|
||||
19
KGdev.BI3D.Revit.Common/ILinkedDocumentsUtilities.cs
Normal file
19
KGdev.BI3D.Revit.Common/ILinkedDocumentsUtilities.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Autodesk.Revit.DB;
|
||||
using KGdev.BI3D.Revit.Common.Models;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface ILinkedDocumentsUtilities
|
||||
{
|
||||
IList<LinkedDocumentInformation> GetLinkedDocuments(
|
||||
Document rootDocument,
|
||||
Transform baseTransform,
|
||||
bool includeThis,
|
||||
List<ElementId> passedLinkInstanceId
|
||||
);
|
||||
|
||||
Element GetElement(Document rootDocument, LinkedElementIdPath path);
|
||||
}
|
||||
}
|
||||
13
KGdev.BI3D.Revit.Common/IMainWindow.cs
Normal file
13
KGdev.BI3D.Revit.Common/IMainWindow.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IMainWindow
|
||||
{
|
||||
void Show();
|
||||
|
||||
void Close();
|
||||
|
||||
bool IsVisible { get; }
|
||||
}
|
||||
}
|
||||
9
KGdev.BI3D.Revit.Common/IMuidProvider.cs
Normal file
9
KGdev.BI3D.Revit.Common/IMuidProvider.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IMuidProvider
|
||||
{
|
||||
string GetMuid();
|
||||
}
|
||||
}
|
||||
26
KGdev.BI3D.Revit.Common/IOptionDefinition.cs
Normal file
26
KGdev.BI3D.Revit.Common/IOptionDefinition.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IOptionDefinition
|
||||
{
|
||||
string Id { get; }
|
||||
|
||||
string Label { get; }
|
||||
|
||||
string Description { get; }
|
||||
|
||||
OptionValueType OptionValueType { get; }
|
||||
|
||||
List<ISelectOptionDefinitionValue> PossibleValues { get; }
|
||||
|
||||
object DefaultValue { get; }
|
||||
|
||||
double Min { get; }
|
||||
|
||||
double Max { get; }
|
||||
|
||||
double Step { get; }
|
||||
}
|
||||
}
|
||||
12
KGdev.BI3D.Revit.Common/IReduxReducer.cs
Normal file
12
KGdev.BI3D.Revit.Common/IReduxReducer.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface IReduxReducer
|
||||
{
|
||||
event EventHandler<Dictionary<string, object>> OnStateChanged;
|
||||
|
||||
void Reduce(Dictionary<string, object> action);
|
||||
}
|
||||
}
|
||||
11
KGdev.BI3D.Revit.Common/ISelectOptionDefinitionValue.cs
Normal file
11
KGdev.BI3D.Revit.Common/ISelectOptionDefinitionValue.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public interface ISelectOptionDefinitionValue
|
||||
{
|
||||
string Label { get; set; }
|
||||
|
||||
object Value { get; set; }
|
||||
}
|
||||
}
|
||||
42
KGdev.BI3D.Revit.Common/KGdev.BI3D.Revit.Common.csproj
Normal file
42
KGdev.BI3D.Revit.Common/KGdev.BI3D.Revit.Common.csproj
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{1124213F-BDC6-4A9D-BF39-7E916D3FBCA1}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>KGdev.BI3D.Revit.Common</RootNamespace>
|
||||
<AssemblyName>KGdev.BI3D.Revit.Common</AssemblyName>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<EnableDefaultItems>False</EnableDefaultItems>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Compile Include="IAuthProvider.cs" />
|
||||
<Compile Include="IBI3DViewsProvider.cs" />
|
||||
<Compile Include="IConstantsProvider.cs" />
|
||||
<Compile Include="IDataExporter.cs" />
|
||||
<Compile Include="IElementIdProvider.cs" />
|
||||
<Compile Include="IExporter.cs" />
|
||||
<Compile Include="IGlobalStore.cs" />
|
||||
<Compile Include="ILinkedDocumentsUtilities.cs" />
|
||||
<Compile Include="IMainWindow.cs" />
|
||||
<Compile Include="IMuidProvider.cs" />
|
||||
<Compile Include="IOptionDefinition.cs" />
|
||||
<Compile Include="IReduxReducer.cs" />
|
||||
<Compile Include="ISelectOptionDefinitionValue.cs" />
|
||||
<Compile Include="Models\LinkedDocumentInformation.cs" />
|
||||
<Compile Include="Models\LinkedElementIdPath.cs" />
|
||||
<Compile Include="OptionValueType.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RevitAPI">
|
||||
<HintPath>C:\Program Files\Autodesk\Revit 2018\RevitAPI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
15
KGdev.BI3D.Revit.Common/Models/LinkedDocumentInformation.cs
Normal file
15
KGdev.BI3D.Revit.Common/Models/LinkedDocumentInformation.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common.Models
|
||||
{
|
||||
public class LinkedDocumentInformation
|
||||
{
|
||||
public Document Document { get; set; }
|
||||
|
||||
public Transform TransformToRoot { get; set; }
|
||||
|
||||
public List<ElementId> PassedLinkInstanceIds { get; set; } = new List<ElementId>();
|
||||
}
|
||||
}
|
||||
60
KGdev.BI3D.Revit.Common/Models/LinkedElementIdPath.cs
Normal file
60
KGdev.BI3D.Revit.Common/Models/LinkedElementIdPath.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common.Models
|
||||
{
|
||||
public class LinkedElementIdPath
|
||||
{
|
||||
public List<ElementId> ElementIds { get; private set; } = new List<ElementId>();
|
||||
|
||||
public LinkedElementIdPath(IList<ElementId> elementIds)
|
||||
{
|
||||
this.ElementIds.AddRange(elementIds);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
LinkedElementIdPath linkedElementIdPath = obj as LinkedElementIdPath;
|
||||
bool flag = linkedElementIdPath == null;
|
||||
bool flag2;
|
||||
if (flag)
|
||||
{
|
||||
flag2 = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
bool flag3 = this.ElementIds.Count != linkedElementIdPath.ElementIds.Count;
|
||||
if (flag3)
|
||||
{
|
||||
flag2 = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < this.ElementIds.Count; i++)
|
||||
{
|
||||
int integerValue = this.ElementIds[i].IntegerValue;
|
||||
int integerValue2 = linkedElementIdPath.ElementIds[i].IntegerValue;
|
||||
bool flag4 = integerValue != integerValue2;
|
||||
if (flag4)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
flag2 = true;
|
||||
}
|
||||
}
|
||||
return flag2;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int num = this.ElementIds.Count.GetHashCode();
|
||||
foreach (ElementId elementId in this.ElementIds)
|
||||
{
|
||||
num ^= elementId.IntegerValue.GetHashCode();
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
12
KGdev.BI3D.Revit.Common/OptionValueType.cs
Normal file
12
KGdev.BI3D.Revit.Common/OptionValueType.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace KGdev.BI3D.Revit.Common
|
||||
{
|
||||
public enum OptionValueType
|
||||
{
|
||||
STRING,
|
||||
BOOLEAN,
|
||||
NUMBER,
|
||||
SELECT
|
||||
}
|
||||
}
|
||||
13
KGdev.BI3D.Revit.Common/Properties/AssemblyInfo.cs
Normal file
13
KGdev.BI3D.Revit.Common/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
[assembly: AssemblyVersion("1.3.0.0")]
|
||||
[assembly: AssemblyCompany("KGdev.BI3D.Revit.Common")]
|
||||
[assembly: AssemblyConfiguration("Release 2020")]
|
||||
[assembly: AssemblyFileVersion("1.3.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.3.0")]
|
||||
[assembly: AssemblyProduct("KGdev.BI3D.Revit.Common")]
|
||||
[assembly: AssemblyTitle("KGdev.BI3D.Revit.Common")]
|
||||
Reference in New Issue
Block a user