修复图例问题和标记问题
This commit is contained in:
104
AddinDeployer/AddinDeployer.csproj
Normal file
104
AddinDeployer/AddinDeployer.csproj
Normal file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{C60B068A-90A8-4852-B6DC-28A2D3FF2753}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>AddinDeployer</RootNamespace>
|
||||
<AssemblyName>AddinDeployer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AdWindows, Version=2018.11.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Revit_API_x64.2020.0.0\lib\NET470\AdWindows.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="RevitAddInUtility, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Revit_API_x64.2020.0.0\lib\NET470\RevitAddInUtility.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="RevitAPI, Version=20.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\Revit_API_x64.2020.0.0\lib\NET470\RevitAPI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="RevitAPIUI, Version=20.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\Revit_API_x64.2020.0.0\lib\NET470\RevitAPIUI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="UIFramework, Version=20.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\Revit_API_x64.2020.0.0\lib\NET470\UIFramework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="UIFrameworkServices, Version=20.0.0.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<HintPath>..\packages\Revit_API_x64.2020.0.0\lib\NET470\UIFrameworkServices.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CustomActionClass.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
232
AddinDeployer/CustomActionClass.cs
Normal file
232
AddinDeployer/CustomActionClass.cs
Normal file
@@ -0,0 +1,232 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.RevitAddIns;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration.Install;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using static Autodesk.Internal.Windows.SwfMediaPlayer;
|
||||
|
||||
namespace AddinDeployer
|
||||
{
|
||||
[RunInstaller(true)]
|
||||
public class CustomActionClass : Installer
|
||||
{
|
||||
//public static void Main(string[] args)
|
||||
//{
|
||||
//}
|
||||
|
||||
private string path;
|
||||
private static string assemblyname = "RookieStation";
|
||||
private static string addinname = "RookieStation.addin";
|
||||
private static string dllname = "RookieStation.dll";
|
||||
private string fullclassname1 = "RookieStation.RibbonMenu.RsApp";
|
||||
|
||||
public CustomActionClass()
|
||||
{
|
||||
this.BeforeInstall += CustomActionClass_BeforeInstall;
|
||||
this.BeforeUninstall += CustomActionClass_BeforeUninstall;
|
||||
this.AfterInstall += CustomActionClass_AfterInstall;
|
||||
}
|
||||
|
||||
//private string revitvernum = "2020";
|
||||
|
||||
public static void KillProcess(string strProcessesByName)//关闭线程
|
||||
{
|
||||
foreach (Process p in Process.GetProcesses())//GetProcessesByName(strProcessesByName))
|
||||
{
|
||||
if (p.ProcessName.ToUpper().Contains(strProcessesByName))
|
||||
{
|
||||
try
|
||||
{
|
||||
p.Kill();
|
||||
p.WaitForExit(); // possibly with a timeout
|
||||
}
|
||||
catch (Win32Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message.ToString()); // process was terminating or can't be terminated - deal with it
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
MessageBox.Show(e.Message.ToString()); // process has already exited - might be able to let this one go
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CustomActionClass_BeforeUninstall(object sender, InstallEventArgs e)
|
||||
{
|
||||
KillProcess("REVIT");
|
||||
|
||||
//var dialogResult = System.Windows.Forms.MessageBox.Show("是否关闭Revit以卸载插件", "提示", System.Windows.Forms.MessageBoxButtons.YesNo);
|
||||
|
||||
//if (dialogResult == System.Windows.Forms.DialogResult.Yes)
|
||||
//{
|
||||
//}
|
||||
//while (MessageBox.Show("退出当前窗体?", "", MessageBoxButtons.YesNo) == DialogResult.No)
|
||||
//{
|
||||
// for (int j = 1; j <= i; j++)
|
||||
// {
|
||||
// listBox1.Items.Add(j);
|
||||
// }
|
||||
//}
|
||||
//System.Environment.Exit(System.Environment.ExitCode);
|
||||
//var ps = Process.GetProcessesByName("Revit.exe");
|
||||
//foreach (var p in ps)
|
||||
//{
|
||||
// p.Kill();
|
||||
//}
|
||||
}
|
||||
|
||||
private void CustomActionClass_BeforeInstall(object sender, InstallEventArgs e)
|
||||
{
|
||||
KillProcess("REVIT");
|
||||
|
||||
//var dialogResult = System.Windows.Forms.MessageBox.Show("是否关闭Revit以安装插件", "提示", System.Windows.Forms.MessageBoxButtons.YesNo);
|
||||
|
||||
//if (dialogResult == System.Windows.Forms.DialogResult.Yes)
|
||||
//{
|
||||
//}
|
||||
//var ps = Process.GetProcessesByName("Revit.exe");
|
||||
//foreach (var p in ps)
|
||||
//{
|
||||
// p.Kill();
|
||||
//}
|
||||
|
||||
//else
|
||||
//{
|
||||
// //this.Exit()
|
||||
//}
|
||||
}
|
||||
|
||||
private static void CustomActionClass_AfterInstall(object sender, InstallEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private static void CustomActionClass_AfterUninstall(object sender, InstallEventArgs e)
|
||||
{
|
||||
//DeleteFolder(path);
|
||||
//DelAddinFromPath("C:\\ProgramData\\Autodesk\\Revit\\Addins");
|
||||
List<RevitProduct> revitProducts = RevitProductUtility.GetAllInstalledRevitProducts();
|
||||
foreach (var p in revitProducts)
|
||||
{
|
||||
string version = p.Version.ToString();
|
||||
string versionnum = version.Trim("Revit".ToCharArray());
|
||||
AddInInstaller addin = new AddInInstaller(versionnum);
|
||||
addin.Uninstall();
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteFolder(string dir)
|
||||
{
|
||||
if (Directory.Exists(dir)) //如果存在这个文件夹删除之
|
||||
{
|
||||
foreach (string d in Directory.GetFileSystemEntries(dir))
|
||||
{
|
||||
if (File.Exists(d))
|
||||
File.Delete(d); //直接删除其中的文件
|
||||
else
|
||||
DeleteFolder(d); //递归删除子文件夹
|
||||
}
|
||||
Directory.Delete(dir, true); //删除已空文件夹
|
||||
}
|
||||
}
|
||||
|
||||
public static void DelAddinFromPath(string dir)
|
||||
{
|
||||
if (Directory.Exists(dir))
|
||||
{
|
||||
foreach (string d in Directory.GetFileSystemEntries(dir))
|
||||
{
|
||||
if (File.Exists(d) && d.EndsWith(addinname))
|
||||
File.Delete(d); //直接删除其中的文件
|
||||
else
|
||||
DelAddinFromPath(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Rollback(IDictionary savedState)
|
||||
{
|
||||
base.Rollback(savedState);
|
||||
}
|
||||
|
||||
public override void Commit(IDictionary savedState)
|
||||
{
|
||||
base.Commit(savedState);
|
||||
}
|
||||
|
||||
public override void Install(IDictionary stateSaver)
|
||||
{
|
||||
base.Install(stateSaver);
|
||||
}
|
||||
|
||||
public override void Uninstall(IDictionary savedState)
|
||||
{
|
||||
base.Uninstall(savedState);
|
||||
}
|
||||
}
|
||||
|
||||
internal class AddInInstaller
|
||||
{
|
||||
private string addinname = "RookieStation.addin";
|
||||
private string vendorid = "YTX";
|
||||
private string vendorDescription = "YTX";
|
||||
|
||||
internal AddInInstaller(string revitVersion)
|
||||
{
|
||||
this.Manifest = new RevitAddInManifest();
|
||||
this.ManifestPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Autodesk\\Revit\\Addins", revitVersion, addinname);
|
||||
}
|
||||
|
||||
private RevitAddInManifest Manifest { get; }
|
||||
|
||||
private string ManifestPath { get; }
|
||||
|
||||
internal void CreateApplication(string name, string assemblyPath, string fullClassName)
|
||||
{
|
||||
RevitAddInApplication item = new RevitAddInApplication(name, assemblyPath, Guid.NewGuid(), fullClassName, vendorid)
|
||||
{
|
||||
VendorDescription = vendorDescription
|
||||
};
|
||||
this.Manifest.AddInApplications.Add(item);
|
||||
}
|
||||
|
||||
internal void CreateCommand(string assemblyPath, string fullClassName)
|
||||
{
|
||||
RevitAddInCommand item = new RevitAddInCommand(assemblyPath, Guid.NewGuid(), fullClassName, vendorid)
|
||||
{
|
||||
VendorDescription = vendorDescription
|
||||
};
|
||||
this.Manifest.AddInCommands.Add(item);
|
||||
}
|
||||
|
||||
internal void Install()
|
||||
{
|
||||
DirectoryInfo directory = new FileInfo(this.ManifestPath).Directory;
|
||||
if (directory == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!directory.Exists)
|
||||
{
|
||||
Directory.CreateDirectory(directory.FullName);
|
||||
}
|
||||
this.Manifest.SaveAs(this.ManifestPath);
|
||||
}
|
||||
|
||||
internal void Uninstall()
|
||||
{
|
||||
if (File.Exists(this.ManifestPath))
|
||||
{
|
||||
File.Delete(this.ManifestPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
AddinDeployer/Properties/AssemblyInfo.cs
Normal file
36
AddinDeployer/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("AddinDeployer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("AddinDeployer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("c60b068a-90a8-4852-b6dc-28a2d3ff2753")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
4
AddinDeployer/packages.config
Normal file
4
AddinDeployer/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Revit_API_x64" version="2020.0.0" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -1,24 +1,44 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31025.218
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.31911.260
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RookieStation", "RookieStation\RookieStation.csproj", "{057C7E8D-42A1-4912-B522-498DB7484894}"
|
||||
EndProject
|
||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "RookieStationSetup", "RookieStationSetup\RookieStationSetup.vdproj", "{ACB3490C-778E-4EC3-99F7-243388ACCE4C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinDeployer", "AddinDeployer\AddinDeployer.csproj", "{C60B068A-90A8-4852-B6DC-28A2D3FF2753}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{057C7E8D-42A1-4912-B522-498DB7484894}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{057C7E8D-42A1-4912-B522-498DB7484894}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{057C7E8D-42A1-4912-B522-498DB7484894}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{057C7E8D-42A1-4912-B522-498DB7484894}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{057C7E8D-42A1-4912-B522-498DB7484894}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{057C7E8D-42A1-4912-B522-498DB7484894}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{057C7E8D-42A1-4912-B522-498DB7484894}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{057C7E8D-42A1-4912-B522-498DB7484894}.Release|x64.Build.0 = Release|Any CPU
|
||||
{ACB3490C-778E-4EC3-99F7-243388ACCE4C}.Debug|Any CPU.ActiveCfg = Debug
|
||||
{ACB3490C-778E-4EC3-99F7-243388ACCE4C}.Debug|x64.ActiveCfg = Debug
|
||||
{ACB3490C-778E-4EC3-99F7-243388ACCE4C}.Debug|x64.Build.0 = Debug
|
||||
{ACB3490C-778E-4EC3-99F7-243388ACCE4C}.Release|Any CPU.ActiveCfg = Release
|
||||
{ACB3490C-778E-4EC3-99F7-243388ACCE4C}.Release|x64.ActiveCfg = Release
|
||||
{ACB3490C-778E-4EC3-99F7-243388ACCE4C}.Release|x64.Build.0 = Release
|
||||
{C60B068A-90A8-4852-B6DC-28A2D3FF2753}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C60B068A-90A8-4852-B6DC-28A2D3FF2753}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C60B068A-90A8-4852-B6DC-28A2D3FF2753}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C60B068A-90A8-4852-B6DC-28A2D3FF2753}.Debug|x64.Build.0 = Debug|x64
|
||||
{C60B068A-90A8-4852-B6DC-28A2D3FF2753}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C60B068A-90A8-4852-B6DC-28A2D3FF2753}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C60B068A-90A8-4852-B6DC-28A2D3FF2753}.Release|x64.ActiveCfg = Release|x64
|
||||
{C60B068A-90A8-4852-B6DC-28A2D3FF2753}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -3,6 +3,8 @@ using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.CommonTools.ViewModels;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.CommonTools.ViewModels;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using RookieStation.CommonTools.Models;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using RookieStation.CommonTools.Views;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace RookieStation.CommonTools.Views
|
||||
{
|
||||
var fileinfos = new ObservableCollection<FamilyInfo>();
|
||||
DirectoryInfo directory = new DirectoryInfo(folder);
|
||||
var files = directory.GetFiles("*.rfa");
|
||||
var files = directory.GetFiles("*.rfa", SearchOption.AllDirectories);
|
||||
for (int i = 0; i < files.Count(); i++)
|
||||
{
|
||||
FamilyInfo fi = new FamilyInfo(files[i].FullName);
|
||||
|
||||
127
RookieStation/Drawing/ExecuteCmds/AutoAlignTags.cs
Normal file
127
RookieStation/Drawing/ExecuteCmds/AutoAlignTags.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using HandyControl.Controls;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RookieStation.Drawing.ExecuteCmds
|
||||
{
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
internal class AutoAlignTags : IExternalCommand
|
||||
{
|
||||
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
||||
{
|
||||
UIApplication uiapp = commandData.Application;
|
||||
UIDocument uidoc = uiapp.ActiveUIDocument;
|
||||
Autodesk.Revit.ApplicationServices.Application app = uiapp.Application;
|
||||
Document doc = uidoc.Document;
|
||||
var view = doc.ActiveView;
|
||||
var distance = 7 * doc.ActiveView.Scale / 304.8;
|
||||
var independentTags = new FilteredElementCollector(doc, doc.ActiveView.Id).OfClass(typeof(IndependentTag)).Cast<IndependentTag>().ToList();
|
||||
if (independentTags.Count == 0)
|
||||
{
|
||||
message = "当前视图没有标记。";
|
||||
return Result.Failed;
|
||||
}
|
||||
if (view.ViewType == ViewType.ThreeD)
|
||||
{
|
||||
message = "请在三维视图以外的视图使用该命令。";
|
||||
return Result.Failed;
|
||||
}
|
||||
var groups = tagGroup(independentTags);
|
||||
try
|
||||
{
|
||||
doc.InvokeGroup(tg =>
|
||||
{
|
||||
foreach (var tags in groups)
|
||||
{
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
foreach (var tag in tags)
|
||||
{
|
||||
if (tag.LeaderEndCondition == LeaderEndCondition.Attached)
|
||||
{
|
||||
tag.LeaderEndCondition = LeaderEndCondition.Free;
|
||||
tag.TagOrientation = TagOrientation.Horizontal;
|
||||
}
|
||||
}
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
//平面或天花视图
|
||||
if (view.ViewType == ViewType.FloorPlan || view.ViewType == ViewType.CeilingPlan)
|
||||
{
|
||||
RsRevitUtils.ArrangePlaneTags(distance, tags);
|
||||
}
|
||||
//立面剖面
|
||||
else if (view.ViewType == ViewType.Section || view.ViewType == ViewType.Elevation)
|
||||
{
|
||||
RsRevitUtils.ArrangeElevationTags(view, distance, tags);
|
||||
}
|
||||
else if (view.ViewType == ViewType.Detail)
|
||||
{
|
||||
RsRevitUtils.ArrangeDetailTags(view, distance, tags);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, "自动整理标记");
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException ex)
|
||||
{
|
||||
return Result.Succeeded;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
|
||||
private List<List<IndependentTag>> groups = new List<List<IndependentTag>>();
|
||||
|
||||
private List<List<IndependentTag>> tagGroup(List<IndependentTag> independentTags)
|
||||
{
|
||||
var tags = new List<IndependentTag>();
|
||||
groups.Add(tags);
|
||||
var tagsToRemove = new List<IndependentTag>();
|
||||
var loc = independentTags.FirstOrDefault().TagHeadPosition;
|
||||
foreach (var t in independentTags)
|
||||
{
|
||||
var pOnPlane = new XYZ(t.TagHeadPosition.X, t.TagHeadPosition.Y, t.TagHeadPosition.Z);
|
||||
var pOnElevation = new XYZ(t.TagHeadPosition.X, t.TagHeadPosition.Y, t.TagHeadPosition.Z);
|
||||
//var pOnElevation1 = new XYZ(0, t.TagHeadPosition.Y, t.TagHeadPosition.Z);
|
||||
Autodesk.Revit.DB.View view = t.Document.GetElement(t.OwnerViewId) as Autodesk.Revit.DB.View;
|
||||
if (view.ViewType == ViewType.FloorPlan || view.ViewType == ViewType.CeilingPlan)
|
||||
{
|
||||
if (pOnPlane.DistanceTo(new XYZ(loc.X, loc.Y, 0)) < 1500 / 304.8)
|
||||
{
|
||||
tags.Add(t);
|
||||
tagsToRemove.Add(t);
|
||||
}
|
||||
}
|
||||
//立面剖面
|
||||
else if (view.ViewType == ViewType.Section || view.ViewType == ViewType.Detail || view.ViewType == ViewType.Elevation)
|
||||
{
|
||||
if (pOnElevation.DistanceTo(loc) < 1500 / 304.8)
|
||||
{
|
||||
tags.Add(t);
|
||||
tagsToRemove.Add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in tagsToRemove)
|
||||
{
|
||||
independentTags.Remove(item);
|
||||
}
|
||||
if (independentTags.Count > 0)
|
||||
{
|
||||
tagGroup(independentTags);
|
||||
}
|
||||
return groups;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,8 @@
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Drawing.Models;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.ProjectConfig;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Controls;
|
||||
@@ -30,7 +29,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
var viewPlan = doc.GetElement(viewport.ViewId);
|
||||
if (!(viewPlan is ViewPlan))
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
message = "请选择平面视图的视口";
|
||||
//TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
@@ -40,12 +40,15 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
View legend = null;
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
legend = RsRevitUtils.CreateNewLegend(doc, "家具图例", viewScale);
|
||||
legend = RsRevitUtils.NewLegend(doc, "家具图例", viewScale);
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
var furnitureData = GetData(doc);
|
||||
CreateLegend(doc, furnitureData, legend);
|
||||
var furnitureData = GetData(doc, viewport.ViewId);
|
||||
if (furnitureData.Count > 0)
|
||||
{
|
||||
CreateLegendContent(doc, furnitureData, legend);
|
||||
}
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
@@ -59,7 +62,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
message = "请打开图纸视图";
|
||||
//TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
@@ -70,9 +74,9 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
/// </summary>
|
||||
/// <param name="doc"></param>
|
||||
/// <returns></returns>
|
||||
private List<dynamic> GetData(Document doc)
|
||||
private List<dynamic> GetData(Document doc, ElementId viewId)
|
||||
{
|
||||
var furnitures = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_Furniture).Cast<FamilyInstance>();
|
||||
var furnitures = new FilteredElementCollector(doc, viewId).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_Furniture).Cast<FamilyInstance>();
|
||||
//按族分组
|
||||
var familyGroups = furnitures.GroupBy(g => g.Symbol.FamilyName);
|
||||
var data = new List<dynamic>();
|
||||
@@ -96,7 +100,7 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
return data;
|
||||
}
|
||||
|
||||
private void CreateLegend(Document doc, List<dynamic> data, View newLegend)
|
||||
private void CreateLegendContent(Document doc, List<dynamic> data, View newLegend)
|
||||
{
|
||||
TextNoteType textNoteType = RsRevitUtils.GetOrNewTextNoteType(doc, UserConstant.TextSymbolName);
|
||||
double fontSize = textNoteType.get_Parameter(BuiltInParameter.TEXT_SIZE).AsDouble();
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.ProjectConfig;
|
||||
|
||||
namespace RookieStation.Drawing.ExecuteCmds
|
||||
@@ -31,7 +30,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
var viewPlan = doc.GetElement(viewport.ViewId);
|
||||
if (!(viewPlan is ViewPlan))
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
message = "请选择平面视图的视口";
|
||||
//TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
@@ -41,12 +41,15 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
View legend = null;
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
legend = RsRevitUtils.CreateNewLegend(doc, "地面铺贴图例", viewScale);
|
||||
legend = RsRevitUtils.NewLegend(doc, "地面铺贴图例", viewScale);
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
var items = GetData(doc);
|
||||
CreateLegend(doc, items, legend);
|
||||
var items = GetData(doc, viewport.ViewId);
|
||||
if (items.Count > 0)
|
||||
{
|
||||
CreateLegendContent(doc, items, legend);
|
||||
}
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
@@ -60,7 +63,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
message = "请打开图纸视图";
|
||||
//TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
@@ -71,10 +75,10 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
/// </summary>
|
||||
/// <param name="doc"></param>
|
||||
/// <returns></returns>
|
||||
private List<dynamic> GetData(Document doc)
|
||||
private List<dynamic> GetData(Document doc, ElementId viewId)
|
||||
{
|
||||
var floors = new FilteredElementCollector(doc).OfClass(typeof(Floor)).OfCategory(BuiltInCategory.OST_Floors);
|
||||
var sites = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_Site);
|
||||
var floors = new FilteredElementCollector(doc, viewId).OfClass(typeof(Floor)).OfCategory(BuiltInCategory.OST_Floors);
|
||||
var sites = new FilteredElementCollector(doc, viewId).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_Site);
|
||||
var filledRegionTypes = new FilteredElementCollector(doc).OfClass(typeof(FilledRegionType)).OfCategory(BuiltInCategory.OST_DetailComponents);
|
||||
var data = new List<dynamic>();
|
||||
|
||||
@@ -253,7 +257,7 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
//填充图案默认为空
|
||||
}
|
||||
|
||||
private void CreateLegend(Document doc, List<dynamic> data, View newLegend)
|
||||
private void CreateLegendContent(Document doc, List<dynamic> data, View newLegend)
|
||||
{
|
||||
TextNoteType textNoteType = RsRevitUtils.GetOrNewTextNoteType(doc, UserConstant.TextSymbolName);
|
||||
double fontSize = textNoteType.get_Parameter(BuiltInParameter.TEXT_SIZE).AsDouble();
|
||||
|
||||
@@ -7,7 +7,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RookieStation.Extension;
|
||||
using System.Windows.Controls;
|
||||
using RookieStation.Drawing.Models;
|
||||
using RookieStation.ProjectConfig;
|
||||
@@ -33,7 +32,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
var viewPlan = doc.GetElement(viewport.ViewId);
|
||||
if (!(viewPlan is ViewPlan))
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
message = "请选择平面视图的视口";
|
||||
//TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
@@ -43,12 +43,15 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
View legend = null;
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
legend = RsRevitUtils.CreateNewLegend(doc, "灯具图例", viewScale);
|
||||
legend = RsRevitUtils.NewLegend(doc, "灯具图例", viewScale);
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
var items = GetData(doc);
|
||||
CreateLegend(doc, items, legend);
|
||||
var items = GetData(doc, viewport.ViewId);
|
||||
if (items.Count > 0)
|
||||
{
|
||||
CreateLegendContent(doc, items, legend);
|
||||
}
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
@@ -62,21 +65,22 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
message = "请打开图纸视图";
|
||||
//TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
return Result.Succeeded;
|
||||
}
|
||||
|
||||
private List<LightingDevices> GetData(Document doc)
|
||||
private List<LightingDevices> GetData(Document doc, ElementId viewId)
|
||||
{
|
||||
var lights = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_LightingFixtures).Cast<FamilyInstance>().Where(s => s.Symbol.FamilyName.Contains("灯"));
|
||||
var lights = new FilteredElementCollector(doc, viewId).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_LightingFixtures).Cast<FamilyInstance>();
|
||||
var lightFamilyGroup = lights.GroupBy(g => g.Symbol.FamilyName);//按族分组
|
||||
|
||||
List<LightingDevices> items = new List<LightingDevices>();
|
||||
//常规注释
|
||||
var lightAnnotationSymboltypes = new FilteredElementCollector(doc).OfClass(typeof(FamilySymbol)).OfCategory(BuiltInCategory.OST_GenericAnnotation).Cast<FamilySymbol>().Where(s => s.Name.Contains("灯"));
|
||||
var lightAnnotationSymboltypes = new FilteredElementCollector(doc).OfClass(typeof(FamilySymbol)).OfCategory(BuiltInCategory.OST_GenericAnnotation).Cast<FamilySymbol>();
|
||||
|
||||
foreach (var g1 in lightFamilyGroup)
|
||||
{
|
||||
@@ -106,7 +110,7 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
return items;
|
||||
}
|
||||
|
||||
private void CreateLegend(Document doc, List<LightingDevices> items, View newLegend)
|
||||
private void CreateLegendContent(Document doc, List<LightingDevices> items, View newLegend)
|
||||
{
|
||||
TextNoteType textNoteType = RsRevitUtils.GetOrNewTextNoteType(doc, UserConstant.TextSymbolName);
|
||||
double fontSize = textNoteType.get_Parameter(BuiltInParameter.TEXT_SIZE).AsDouble();
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Drawing.Models;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.ProjectConfig;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -32,7 +31,7 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
|
||||
var sql = SQLiteUtil.GetInstance();
|
||||
sql.CreateDb(UserConstant.DbFolder + "Inventory.db");
|
||||
List<string[]> tableRow = sql.QueryTable("MainMaterials");
|
||||
List<string[]> tableRow = sql.QueryTable("DecorativeMaterials");
|
||||
sql.CloseConncetion();
|
||||
//FilteredElementCollector collectorAll = new FilteredElementCollector(doc);
|
||||
//collectorAll.WherePasses(new LogicalOrFilter(new ElementIsElementTypeFilter(false), new ElementIsElementTypeFilter(true)));
|
||||
@@ -212,7 +211,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
message = "请打开图纸视图";
|
||||
//TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.ProjectConfig;
|
||||
using Autodesk.Revit.DB.Architecture;
|
||||
using RookieStation.Drawing.Models;
|
||||
using System.Windows.Controls;
|
||||
@@ -35,7 +34,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
var viewPlan = doc.GetElement(viewport.ViewId);
|
||||
if (!(viewPlan is ViewPlan))
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
message = "请选择平面视图的视口";
|
||||
//TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
View legend = null;
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
legend = RsRevitUtils.CreateNewLegend(doc, "平面图例", viewScale);
|
||||
legend = RsRevitUtils.NewLegend(doc, "平面图例", viewScale);
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
@@ -64,7 +64,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请在图纸视图下使用该命令");
|
||||
message = "请打开图纸视图";
|
||||
//TaskDialog.Show("温馨提示", "请在图纸视图下使用该命令");
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
@@ -80,7 +81,11 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
var shelves = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_Furniture).Cast<FamilyInstance>().Where(s => s.Symbol.FamilyName.Contains("货架"));
|
||||
var rooms = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms).Cast<Room>();
|
||||
double area = 0.0;
|
||||
int orders = 0;
|
||||
double orders = 0;
|
||||
if (rooms.Count() == 0)
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "未发现房间");
|
||||
}
|
||||
foreach (var room in rooms)
|
||||
{
|
||||
area += RsRevitUtils.ConvertSquareFeetToSquareMetre(room.get_Parameter(BuiltInParameter.ROOM_AREA).AsDouble());
|
||||
@@ -93,10 +98,10 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
var instance = group.ElementAt(0);
|
||||
//当前分组货架的长度
|
||||
var l = instance.Symbol.GetParameters("长度").FirstOrDefault().AsValueString();
|
||||
orders = group.Count() * Convert.ToInt16(l) / 1000 * 80;
|
||||
orders += group.Count() * Convert.ToInt16(l) / 1000.0 * 80.0;
|
||||
}
|
||||
statistics.Add(UserConstant.Orders.ToString());
|
||||
statistics.Add(orders.ToString());
|
||||
statistics.Add(UserConstant.Orders.ToString());
|
||||
statistics.Add(Convert.ToInt16(area).ToString());
|
||||
|
||||
return statistics;
|
||||
@@ -141,8 +146,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
HorizontalAlignment = HorizontalTextAlignment.Center
|
||||
};
|
||||
var y = XYZ.BasisY * tableCellHeight * 1.5;
|
||||
TextNote.Create(doc, newLegend.Id, XYZ.BasisX * tableCellWidth * 0.5 + y, "设计单量", opts);
|
||||
TextNote.Create(doc, newLegend.Id, XYZ.BasisX * (tableCellWidth * 1.5) + y, "日均单量", opts);
|
||||
TextNote.Create(doc, newLegend.Id, XYZ.BasisX * tableCellWidth * 0.5 + y, "日均单量", opts);
|
||||
TextNote.Create(doc, newLegend.Id, XYZ.BasisX * (tableCellWidth * 1.5) + y, "设计单量", opts);
|
||||
TextNote.Create(doc, newLegend.Id, XYZ.BasisX * (tableCellWidth * 2.5) + y, "场地面积", opts);
|
||||
var li = GetData(doc);
|
||||
TextNote.Create(doc, newLegend.Id, XYZ.BasisX * (tableCellWidth * 0.5) + XYZ.BasisY * tableCellHeight * 0.5, li[0], opts);
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Drawing.Models;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.ProjectConfig;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -32,7 +31,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
var viewPlan = doc.GetElement(viewport.ViewId);
|
||||
if (!(viewPlan is ViewPlan))
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
message = "请选择平面视图的视口";
|
||||
//TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
@@ -42,12 +42,15 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
View legend = null;
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
legend = RsRevitUtils.CreateNewLegend(doc, "插座图例", viewScale);
|
||||
legend = RsRevitUtils.NewLegend(doc, "插座图例", viewScale);
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
var items = GetData(doc);
|
||||
CreateLegend(doc, items, legend);
|
||||
var items = GetData(doc, viewport.ViewId);
|
||||
if (items.Count > 0)
|
||||
{
|
||||
CreateLegendContent(doc, items, legend);
|
||||
}
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
@@ -61,20 +64,21 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
message = "请打开图纸视图";
|
||||
//TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
return Result.Succeeded;
|
||||
}
|
||||
|
||||
private List<LightingDevices> GetData(Document doc)
|
||||
private List<LightingDevices> GetData(Document doc, ElementId viewId)
|
||||
{
|
||||
ElementCategoryFilter filter1 = new ElementCategoryFilter(BuiltInCategory.OST_CommunicationDevices);
|
||||
ElementCategoryFilter filter2 = new ElementCategoryFilter(BuiltInCategory.OST_ElectricalFixtures);
|
||||
LogicalOrFilter logicalOrFilter = new LogicalOrFilter(filter1, filter2);
|
||||
var sockets = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).WherePasses(logicalOrFilter).Cast<FamilyInstance>().Where(s => s.Symbol.FamilyName.Contains("插座"));
|
||||
var socketAnnotationSymboltypes = new FilteredElementCollector(doc).OfClass(typeof(FamilySymbol)).OfCategory(BuiltInCategory.OST_GenericAnnotation).Cast<FamilySymbol>().Where(s => s.Name.Contains("插座"));
|
||||
var sockets = new FilteredElementCollector(doc, viewId).OfClass(typeof(FamilyInstance)).WherePasses(logicalOrFilter).Cast<FamilyInstance>();
|
||||
var socketAnnotationSymboltypes = new FilteredElementCollector(doc).OfClass(typeof(FamilySymbol)).OfCategory(BuiltInCategory.OST_GenericAnnotation).Cast<FamilySymbol>();
|
||||
|
||||
var socketFamilyGroup = sockets.GroupBy(g => g.Symbol.FamilyName);//按族分组
|
||||
List<LightingDevices> items = new List<LightingDevices>();
|
||||
@@ -102,7 +106,7 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
return items;
|
||||
}
|
||||
|
||||
private void CreateLegend(Document doc, List<LightingDevices> items, View newLegend)
|
||||
private void CreateLegendContent(Document doc, List<LightingDevices> items, View newLegend)
|
||||
{
|
||||
TextNoteType textNoteType = RsRevitUtils.GetOrNewTextNoteType(doc, UserConstant.TextSymbolName);
|
||||
double fontSize = textNoteType.get_Parameter(BuiltInParameter.TEXT_SIZE).AsDouble();
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Drawing.Models;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.ProjectConfig;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -32,7 +31,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
var viewPlan = doc.GetElement(viewport.ViewId);
|
||||
if (!(viewPlan is ViewPlan))
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
message = "请选择平面视图的视口";
|
||||
//TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
@@ -42,12 +42,15 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
View legend = null;
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
legend = RsRevitUtils.CreateNewLegend(doc, "开关图例", viewScale);
|
||||
legend = RsRevitUtils.NewLegend(doc, "开关图例", viewScale);
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
var items = GetData(doc);
|
||||
CreateLegend(doc, GetData(doc), legend);
|
||||
var items = GetData(doc, viewport.ViewId);
|
||||
if (items.Count > 0)
|
||||
{
|
||||
CreateLegendContent(doc, items, legend);
|
||||
}
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
@@ -61,15 +64,16 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
message = "请打开图纸视图";
|
||||
//TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
}
|
||||
|
||||
private List<LightingDevices> GetData(Document doc)
|
||||
private List<LightingDevices> GetData(Document doc, ElementId viewId)
|
||||
{
|
||||
var switchs = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_LightingDevices).Cast<FamilyInstance>().Where(s => s.Symbol.FamilyName.Contains("开关"));
|
||||
var switchs = new FilteredElementCollector(doc, viewId).OfClass(typeof(FamilyInstance)).OfCategory(BuiltInCategory.OST_LightingDevices).Cast<FamilyInstance>().Where(s => s.Symbol.FamilyName.Contains("开关"));
|
||||
|
||||
var socketFamilyGroup = switchs.GroupBy(g => g.Symbol.FamilyName).Reverse();//按族分组
|
||||
List<LightingDevices> items = new List<LightingDevices>();
|
||||
@@ -101,7 +105,7 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
return items; ;
|
||||
}
|
||||
|
||||
private void CreateLegend(Document doc, List<LightingDevices> items, View newLegend)
|
||||
private void CreateLegendContent(Document doc, List<LightingDevices> items, View newLegend)
|
||||
{
|
||||
TextNoteType textNoteType = RsRevitUtils.GetOrNewTextNoteType(doc, UserConstant.TextSymbolName);
|
||||
double fontSize = textNoteType.get_Parameter(BuiltInParameter.TEXT_SIZE).AsDouble();
|
||||
|
||||
@@ -5,7 +5,6 @@ using Autodesk.Revit.UI.Selection;
|
||||
using Autodesk.Revit.UI;
|
||||
using RookieStation.Utils;
|
||||
using System.Windows.Controls;
|
||||
using RookieStation.Extension;
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Windows.Media.Media3D;
|
||||
@@ -62,7 +61,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "需在平面视图使用此命令");
|
||||
message = "需在平面视图使用此命令";
|
||||
//TaskDialog.Show("温馨提示", "需在平面视图使用此命令");
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -68,7 +67,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "需在立面视图使用此命令");
|
||||
message = "需在立面视图使用此命令";
|
||||
//TaskDialog.Show("温馨提示", "需在立面视图使用此命令");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ using System.Threading.Tasks;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Utils;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Extension;
|
||||
|
||||
namespace RookieStation.Drawing.ExecuteCmds
|
||||
{
|
||||
@@ -31,7 +30,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
var viewPlan = doc.GetElement(viewport.ViewId);
|
||||
if (!(viewPlan is ViewPlan))
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
message = "请选择平面视图的视口";
|
||||
//TaskDialog.Show("温馨提示", "请选择平面视图的视口");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
@@ -41,12 +41,15 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
View legend = null;
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
legend = RsRevitUtils.CreateNewLegend(doc, "墙体图例", viewScale);
|
||||
legend = RsRevitUtils.NewLegend(doc, "墙体图例", viewScale);
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
var items = GetData(doc);
|
||||
CreateLegend(doc, items, legend);
|
||||
var items = GetData(doc, viewport.ViewId);
|
||||
if (items.Count > 0)
|
||||
{
|
||||
CreateLegendContent(doc, items, legend);
|
||||
}
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
@@ -60,7 +63,8 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
else
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
message = "请打开图纸视图";
|
||||
//TaskDialog.Show("温馨提示", "请打开图纸视图");
|
||||
return Result.Failed;
|
||||
}
|
||||
return Result.Succeeded;
|
||||
@@ -71,9 +75,9 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
/// </summary>
|
||||
/// <param name="doc"></param>
|
||||
/// <returns></returns>
|
||||
private List<dynamic> GetData(Document doc)
|
||||
private List<dynamic> GetData(Document doc, ElementId viewId)
|
||||
{
|
||||
var walls = new FilteredElementCollector(doc).OfClass(typeof(Wall)).OfCategory(BuiltInCategory.OST_Walls);
|
||||
var walls = new FilteredElementCollector(doc, viewId).OfClass(typeof(Wall)).OfCategory(BuiltInCategory.OST_Walls);
|
||||
var filledRegionTypes = new FilteredElementCollector(doc).OfClass(typeof(FilledRegionType)).OfCategory(BuiltInCategory.OST_DetailComponents);
|
||||
//按族分组
|
||||
var wallTypeGroups = walls.GroupBy(g => g.Name);
|
||||
@@ -96,7 +100,7 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
{
|
||||
var t = filledRegionTypes.ElementAt(i) as FilledRegionType;
|
||||
//通过名称,类型,把不需要的墙体过滤掉
|
||||
if (wallType.Name.Contains("墙饰面") || wallType.Name.Contains("踢脚线") || wallType.Kind != WallKind.Basic)
|
||||
if (wallType.Name.Contains("墙饰面") || wallType.Name.Contains("脚线") || wallType.Name.Contains("墙基层") || wallType.Kind != WallKind.Basic)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -170,7 +174,7 @@ namespace RookieStation.Drawing.ExecuteCmds
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateLegend(Document doc, List<dynamic> data, View newLegend)
|
||||
private void CreateLegendContent(Document doc, List<dynamic> data, View newLegend)
|
||||
{
|
||||
TextNoteType textNoteType = RsRevitUtils.GetOrNewTextNoteType(doc, UserConstant.TextSymbolName);
|
||||
double fontSize = textNoteType.get_Parameter(BuiltInParameter.TEXT_SIZE).AsDouble();
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
using Autodesk.Revit.DB.Electrical;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.ParcelAreaModule.Views;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.ParcelAreaModule.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
88
RookieStation/Drawing/ExecuteCmds/ManualAlignTags.cs
Normal file
88
RookieStation/Drawing/ExecuteCmds/ManualAlignTags.cs
Normal file
@@ -0,0 +1,88 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RookieStation.Drawing.ExecuteCmds
|
||||
{
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
internal class ManualAlignTags : IExternalCommand
|
||||
{
|
||||
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
||||
{
|
||||
UIApplication uiapp = commandData.Application;
|
||||
UIDocument uidoc = uiapp.ActiveUIDocument;
|
||||
Autodesk.Revit.ApplicationServices.Application app = uiapp.Application;
|
||||
Document doc = uidoc.Document;
|
||||
DocumentSet docset = uiapp.Application.Documents;
|
||||
var view = doc.ActiveView;
|
||||
var distance = 7 * doc.ActiveView.Scale / 304.8;
|
||||
bool isContinue = true;
|
||||
if (view.ViewType == ViewType.ThreeD)
|
||||
{
|
||||
message = "请在三维视图以外的视图使用该命令。";
|
||||
return Result.Failed;
|
||||
}
|
||||
try
|
||||
{
|
||||
while (isContinue)
|
||||
{
|
||||
var tags = uidoc.Selection.PickElementsByRectangle(new SelectFilter<IndependentTag>(), "请框选要整理成组的标记").Cast<IndependentTag>().ToList();
|
||||
if (tags.Count > 0)
|
||||
{
|
||||
//var referTag = uidoc.Selection.PickObject(ObjectType.Element, new SelectFilter<IndependentTag>(), "请选择基准标注");
|
||||
//var tags = uidoc.Selection.PickObjects(ObjectType.Element, new SelectFilter<IndependentTag>(), "请选择需要对齐的标注").Select(p =>
|
||||
//{
|
||||
// var tag = doc.GetElement(p) as IndependentTag;
|
||||
// return tag;
|
||||
//});
|
||||
//var baseTag = doc.GetElement(referTag) as IndependentTag;
|
||||
doc.InvokeGroup(tg =>
|
||||
{
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
foreach (var tag in tags)
|
||||
{
|
||||
if (tag.LeaderEndCondition == LeaderEndCondition.Attached)
|
||||
{
|
||||
tag.LeaderEndCondition = LeaderEndCondition.Free;
|
||||
tag.TagOrientation = TagOrientation.Horizontal;
|
||||
}
|
||||
}
|
||||
});
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
//平面或天花视图
|
||||
if (view.ViewType == ViewType.FloorPlan || view.ViewType == ViewType.CeilingPlan)
|
||||
{
|
||||
RsRevitUtils.ArrangePlaneTags(distance, tags);
|
||||
}
|
||||
//立面剖面
|
||||
else if (view.ViewType == ViewType.Section || view.ViewType == ViewType.Elevation)
|
||||
{
|
||||
RsRevitUtils.ArrangeElevationTags(view, distance, tags);
|
||||
}
|
||||
else if (view.ViewType == ViewType.Detail)
|
||||
{
|
||||
RsRevitUtils.ArrangeDetailTags(view, distance, tags);
|
||||
}
|
||||
});
|
||||
}, "手动整理标记");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Autodesk.Revit.Exceptions.OperationCanceledException ex)
|
||||
{
|
||||
return Result.Succeeded;
|
||||
}
|
||||
|
||||
return Result.Succeeded;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<Window
|
||||
x:Class="RookieStation.Drawing.Views.WpfLegendCreator"
|
||||
x:Class="RookieStation.Drawing.Views.WpfArrangeTags"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:local="clr-namespace:RookieStation.Drawing.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
MinWidth="300"
|
||||
@@ -13,6 +14,16 @@
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<ComboBox x:Name="cbbTextType" />
|
||||
<GroupBox>
|
||||
<StackPanel>
|
||||
<RadioButton Content="左对齐" />
|
||||
<RadioButton Content="右对齐" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox>
|
||||
<StackPanel>
|
||||
<hc:TextBox />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -19,9 +19,9 @@ namespace RookieStation.Drawing.Views
|
||||
/// <summary>
|
||||
/// WpfLegendCreator.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class WpfLegendCreator
|
||||
public partial class WpfArrangeTags
|
||||
{
|
||||
public WpfLegendCreator()
|
||||
public WpfArrangeTags()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
using Autodesk.Revit.DB.Architecture;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Finishes.Views;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.Finishes.Views;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
using Autodesk.Revit.DB.Architecture;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.Finishes.Views;
|
||||
using RookieStation.RibbonMenu;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -73,7 +72,8 @@ namespace RookieStation.Finishes.ExecuteCmds
|
||||
var rooms = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms);
|
||||
if (rooms.Count() == 0)
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "项目中当前没有房间");
|
||||
message = "项目中当前没有房间";
|
||||
//TaskDialog.Show("温馨提示", "项目中当前没有房间");
|
||||
//message = "项目中当前没有房间";
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ using Autodesk.Revit.DB.Architecture;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -28,8 +27,8 @@ namespace RookieStation.Finishes.ExecuteCmds
|
||||
var rooms = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms);
|
||||
if (rooms.Count() == 0)
|
||||
{
|
||||
//message = "项目中当前没有房间";
|
||||
TaskDialog.Show("温馨提示", "项目中当前没有房间");
|
||||
message = "项目中当前没有房间";
|
||||
//TaskDialog.Show("温馨提示", "项目中当前没有房间");
|
||||
return Result.Failed;
|
||||
}
|
||||
WpfFloorFinishes floorCovering = CommonUtils.ShowDialog<WpfFloorFinishes>();
|
||||
@@ -102,7 +101,7 @@ namespace RookieStation.Finishes.ExecuteCmds
|
||||
double lengthCount = basePoint.DistanceTo(referline.GetEndPoint(0)) + basePoint.DistanceTo(referline.GetEndPoint(1));
|
||||
if (referline.Length - lengthCount > 0.001)
|
||||
{
|
||||
MessageBox.Show("请选择基准线上的点", "温馨提示");
|
||||
TaskDialog.Show("温馨提示", "请选择基准线上的点");
|
||||
return Result.Cancelled;
|
||||
}
|
||||
//if (basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(0)) || basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(1)))
|
||||
@@ -134,8 +133,9 @@ namespace RookieStation.Finishes.ExecuteCmds
|
||||
{
|
||||
if (endpoint1.DistanceTo(basePoint) < length)
|
||||
{
|
||||
//message = "基准点与基准线端点距离太近";
|
||||
System.Windows.MessageBox.Show("基准点与基准线端点距离太近");
|
||||
return Result.Cancelled;
|
||||
return Result.Failed;
|
||||
}
|
||||
zdir1 = v1.CrossProduct(v0).Normalize();
|
||||
//偏移的方向,直线的侧方向
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -200,12 +199,12 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds
|
||||
Curve tempCurve = curves[i];
|
||||
var baseEndXyz = initcurve.GetEndPoint(0);
|
||||
//把初始的第一个添加进集合
|
||||
if (tempCurve.GetEndPoint(0).IsAlmostEqualTo(baseEndXyz) || tempCurve.GetEndPoint(1).IsAlmostEqualTo(baseEndXyz))//可以为重合的线,做剔除
|
||||
if (tempCurve.GetEndPoint(0).IsAlmostEqualTo(baseEndXyz) || tempCurve.GetEndPoint(1).IsAlmostEqualTo(baseEndXyz))//可以为重合的线
|
||||
{
|
||||
initCurveArray.Append(tempCurve);
|
||||
curves.Remove(tempCurve);
|
||||
//将tempcurve作为起点继续查找
|
||||
SearchCurveConnected(curves, tempCurve, initCurveArray, curveArrArray);//最后一次执行方法在此处,因为size为0,停止继续执行
|
||||
SearchCurveConnected(curves, tempCurve, initCurveArray, curveArrArray);//最后一次执行方法在此处,因为Count为0,停止继续执行
|
||||
}
|
||||
|
||||
//遍历完一个线串时,寻找下一个线串,即查找到最后,都找不到相连的曲线时
|
||||
|
||||
@@ -3,7 +3,6 @@ using Autodesk.Revit.DB.Events;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.UI;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -54,7 +53,7 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds
|
||||
//阻燃板厚度
|
||||
double fireRetardantBoardWidth = 15 / 304.8;
|
||||
//踢脚线高度
|
||||
double skirtingLineHeight = 50 / 304.8;
|
||||
double skirtingLineHeight = 60 / 304.8;
|
||||
//踢脚线厚度
|
||||
double skirtingLineWidth = 1.2 / 304.8;
|
||||
//铝塑板长度
|
||||
@@ -76,6 +75,7 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds
|
||||
//灯高度
|
||||
double lampsHeight = 0;
|
||||
string fullFileName = string.Empty;
|
||||
bool? isGroup = false;
|
||||
|
||||
if (receptionAreaPlacement.DialogResult == true)
|
||||
{
|
||||
@@ -92,6 +92,7 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds
|
||||
lampsInterval = receptionAreaPlacement.LampsInterval / 304.8;
|
||||
lampsHeight = receptionAreaPlacement.LampsHeight / 304.8;
|
||||
fullFileName = receptionAreaPlacement.DwgPath;
|
||||
isGroup = receptionAreaPlacement.IsGroup;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -102,16 +103,16 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc);
|
||||
if (guideSymbol == null)
|
||||
{
|
||||
message = "定位族丢失";
|
||||
return Result.Failed;
|
||||
}
|
||||
return doc.InvokeGroup(tg =>
|
||||
{
|
||||
try
|
||||
{
|
||||
FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc);
|
||||
if (guideSymbol == null)
|
||||
{
|
||||
TaskDialog.Show("错误", "定位族丢失");
|
||||
return Result.Failed;
|
||||
}
|
||||
eleIdsAdded.Clear();
|
||||
uiapp.Application.DocumentChanged += Application_DocumentChanged;
|
||||
uidoc.PromptForFamilyInstancePlacement(guideSymbol);
|
||||
@@ -130,11 +131,11 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds
|
||||
Line referline = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded);
|
||||
|
||||
double backgroundWallLength = referline.Length;
|
||||
if (backgroundWallLength < 3000 / 304.8)
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "背景墙长度需大于3000mm,否则无法生成寄件接待台");
|
||||
return Result.Cancelled;
|
||||
}
|
||||
//if (backgroundWallLength < 3000 / 304.8)
|
||||
//{
|
||||
// TaskDialog.Show("温馨提示", "背景墙长度需大于3000mm,否则无法生成寄件接待台");
|
||||
// return Result.Cancelled;
|
||||
//}
|
||||
List<ElementId> wallIds = new List<ElementId>();
|
||||
WallType fireRetardantBoard = RsRevitUtils.GetWallTypeByName(doc, "阻燃板");
|
||||
WallType greyEmulsionPaint = RsRevitUtils.GetWallTypeByName(doc, "灰色乳胶漆");
|
||||
@@ -199,7 +200,10 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds
|
||||
}
|
||||
|
||||
doc.Regenerate();
|
||||
if (isGroup == true)
|
||||
{
|
||||
doc.Create.NewGroup(wallIds);
|
||||
}
|
||||
}, "背景墙创建");
|
||||
|
||||
CreateCaiNiaoDuty(doc, skirtingLineHeight + aluminumPlasticPanelHeight, greyEmulsionPaintWidth + fireRetardantBoardWidth, referline);
|
||||
@@ -426,7 +430,7 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds
|
||||
{
|
||||
doc.Invoke(ts =>
|
||||
{
|
||||
string file = UserConstant.FamilyLibraryDirectory + "标识标牌\\菜鸟使命.rfa";
|
||||
string file = UserConstant.FamilyLibraryDirectory + "标识标牌\\菜鸟使命贴字.rfa";
|
||||
var dutySymbol = RsRevitUtils.GetAndActiveDefaultFamilySymbol(doc, file);
|
||||
|
||||
var endPoint = referline.GetEndPoint(0);
|
||||
|
||||
@@ -128,11 +128,16 @@
|
||||
ToolTip="双击选择Dwg文件路径" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<CheckBox
|
||||
x:Name="CbGroup"
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Content="墙体成组"
|
||||
IsChecked="True" />
|
||||
<Button
|
||||
x:Name="btnConfirm"
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Column="1"
|
||||
Width="80"
|
||||
Height="30"
|
||||
Click="btnConfirm_Click"
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace RookieStation.MailingAreaModule.Views
|
||||
public double LampWallDistance;
|
||||
public string GlowTextSymbol;
|
||||
public string DwgPath;
|
||||
public bool? IsGroup;
|
||||
|
||||
//public double glow_text_elevation;
|
||||
public double AluminumpLasticPanelGgap;
|
||||
@@ -64,6 +65,7 @@ namespace RookieStation.MailingAreaModule.Views
|
||||
AluminumpLasticPanelGgap = panelGap;
|
||||
GlowTextSymbol = cbbsymbol.Text;
|
||||
DwgPath = h;
|
||||
IsGroup = CbGroup.IsChecked;
|
||||
DialogResult = true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -41,16 +40,24 @@ namespace RookieStation.ParcelAreaModule.ExecuteCmds
|
||||
{
|
||||
return Result.Cancelled;
|
||||
}
|
||||
FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc);
|
||||
if (guideSymbol == null)
|
||||
{
|
||||
message = "定位族丢失";
|
||||
//TaskDialog.Show("错误", "定位族丢失");
|
||||
return Result.Failed;
|
||||
}
|
||||
return doc.InvokeGroup<Result>(tg =>
|
||||
{
|
||||
try
|
||||
{
|
||||
FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc);
|
||||
if (guideSymbol == null)
|
||||
{
|
||||
TaskDialog.Show("错误", "定位族丢失");
|
||||
return Result.Failed;
|
||||
}
|
||||
//FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc);
|
||||
//if (guideSymbol == null)
|
||||
//{
|
||||
// //message = "定位族丢失";
|
||||
// TaskDialog.Show("错误", "定位族丢失");
|
||||
// return Result.Failed;
|
||||
//}
|
||||
eleIdsAdded.Clear();
|
||||
uiapp.Application.DocumentChanged += Application_DocumentChanged;
|
||||
uidoc.PromptForFamilyInstancePlacement(guideSymbol);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Autodesk.Revit.DB.Events;
|
||||
using Autodesk.Revit.UI;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -57,17 +56,25 @@ namespace RookieStation.ParcelAreaModule.ExecuteCmds
|
||||
}
|
||||
double interval = (1030 + PassageWidth + 50);
|
||||
List<FamilyInstance> instances = new List<FamilyInstance>();
|
||||
|
||||
FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc); ;
|
||||
if (guideSymbol == null)
|
||||
{
|
||||
message = "定位族丢失";
|
||||
//TaskDialog.Show("错误", "定位族丢失");
|
||||
return Result.Failed;
|
||||
}
|
||||
int orders = UserConstant.Orders;
|
||||
int n = GetGateCountByOrders(orders);//根据单量得到收检台数量
|
||||
if (orders.Equals(0) || n == 0)
|
||||
{
|
||||
message = "单量有误";
|
||||
//TaskDialog.Show("温馨提示", "单量有误");
|
||||
return Result.Failed;
|
||||
}
|
||||
return doc.InvokeGroup<Result>(tg =>
|
||||
{
|
||||
try
|
||||
{
|
||||
FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc); ;
|
||||
if (guideSymbol == null)
|
||||
{
|
||||
TaskDialog.Show("错误", "定位族丢失");
|
||||
return Result.Failed;
|
||||
}
|
||||
eleIdsAdded.Clear();
|
||||
uiapp.Application.DocumentChanged += Application_DocumentChanged;
|
||||
uidoc.PromptForFamilyInstancePlacement(guideSymbol);
|
||||
@@ -83,15 +90,6 @@ namespace RookieStation.ParcelAreaModule.ExecuteCmds
|
||||
//直线向量
|
||||
Line referline = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded);
|
||||
|
||||
int orders = UserConstant.Orders;
|
||||
int n = GetGateCountByOrders(orders);//根据单量得到收检台数量
|
||||
if (orders.Equals(0) || n == 0)
|
||||
{
|
||||
//message = "单量有误";
|
||||
TaskDialog.Show("温馨提示", "单量有误");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
int m = (int)Math.Floor((referline.Length * 304.8 / (PassageWidth + 1030 + 50)) + 0.5);
|
||||
|
||||
if (m < n)//如果实际场地设置的数量无法满足单量要求,按实际场地设置
|
||||
|
||||
@@ -3,7 +3,6 @@ using Autodesk.Revit.DB.Architecture;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -30,7 +29,8 @@ namespace RookieStation.ParcelAreaModule.ExecuteCmds
|
||||
var rooms = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms);
|
||||
if (rooms.Count() == 0)
|
||||
{
|
||||
TaskDialog.Show("温馨提示", "项目中当前没有房间");
|
||||
message = "项目中当前没有房间";
|
||||
//TaskDialog.Show("温馨提示", "项目中当前没有房间");
|
||||
return Result.Cancelled;
|
||||
}
|
||||
WpfLampsLayout placeLamps = CommonUtils.ShowDialog<WpfLampsLayout>();
|
||||
@@ -102,7 +102,7 @@ namespace RookieStation.ParcelAreaModule.ExecuteCmds
|
||||
double lengthCount = basePoint.DistanceTo(line.GetEndPoint(0)) + basePoint.DistanceTo(line.GetEndPoint(1));
|
||||
if (line.Length - lengthCount > 0.001)
|
||||
{
|
||||
System.Windows.MessageBox.Show("请选择基准线上的点", "温馨提示");
|
||||
TaskDialog.Show("温馨提示", "请选择基准线上的点");
|
||||
return Result.Cancelled;
|
||||
}
|
||||
//if (basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(0)) || basepoint.IsAlmostEqualTo(ml.GeometryCurve.GetEndPoint(1)))
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -59,17 +58,19 @@ namespace RookieStation.ParcelAreaModule.ExecuteCmds
|
||||
{
|
||||
return Result.Failed;
|
||||
}
|
||||
FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc);
|
||||
if (guideSymbol == null)
|
||||
{
|
||||
message = "定位族丢失";
|
||||
//TaskDialog.Show("错误", "定位族丢失");
|
||||
return Result.Failed;
|
||||
}
|
||||
return doc.InvokeGroup(tg =>
|
||||
{
|
||||
try
|
||||
{
|
||||
//定位线
|
||||
FamilySymbol guideSymbol = RsRevitUtils.GetGuideSymbol(doc);
|
||||
if (guideSymbol == null)
|
||||
{
|
||||
TaskDialog.Show("错误", "定位族丢失");
|
||||
return Result.Failed;
|
||||
}
|
||||
|
||||
eleIdsAdded.Clear();
|
||||
uiapp.Application.DocumentChanged += Application_DocumentChanged;
|
||||
uidoc.PromptForFamilyInstancePlacement(guideSymbol);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.UI.Selection;
|
||||
using RookieStation.ProjectConfig;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using RookieStation.Extension;
|
||||
using RookieStation.ProjectConfig.Views;
|
||||
using RookieStation.Utils;
|
||||
using RookieStation.ProjectConfig.Views;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
xmlns:local="clr-namespace:RookieStation.ProjectConfig"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
Width="121"
|
||||
Width="463"
|
||||
Height="112"
|
||||
MinWidth="500"
|
||||
MinWidth="400"
|
||||
MinHeight="300"
|
||||
ShowInTaskbar="False"
|
||||
mc:Ignorable="d">
|
||||
@@ -23,10 +23,8 @@
|
||||
</Window.Resources>
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.6*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="0.6*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
@@ -37,196 +35,161 @@
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="项目名:" />
|
||||
<TextBox
|
||||
|
||||
<hc:TextBox
|
||||
x:Name="tbProjectName"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="项目名称:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
InputMethod.IsInputMethodEnabled="True"
|
||||
TextAlignment="Center" />
|
||||
<Separator
|
||||
Grid.Row="0"
|
||||
Grid.ColumnSpan="4"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0,0,0,2"
|
||||
VerticalAlignment="Bottom" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"><Run Text="建设单位" /><Run Language="zh-cn" Text=":" /></TextBlock>
|
||||
|
||||
<!-- 允许输出法 -->
|
||||
<TextBox
|
||||
<hc:TextBox
|
||||
x:Name="tbConstrctionOrg"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="建设单位:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
InputMethod.IsInputMethodEnabled="True"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="阶段:" />
|
||||
|
||||
<!-- 允许输出法 -->
|
||||
<TextBox
|
||||
<hc:TextBox
|
||||
x:Name="tbPhase"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,3"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="设计阶段:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="层高(mm):" />
|
||||
<TextBox
|
||||
<hc:TextBox
|
||||
x:Name="tbHeight"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
VerticalContentAlignment="Center"
|
||||
Margin="0,4,0,4"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Title="层高(mm):"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
PreviewTextInput="tb_PreviewTextInput"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="日均单量:" />
|
||||
<TextBox
|
||||
<hc:TextBox
|
||||
x:Name="tbOrders"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="日均单量:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
PreviewTextInput="tb_PreviewTextInput"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="平面图比例:1/ " />
|
||||
<hc:TextBox
|
||||
x:Name="tbScale"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="比例尺:1/"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
PreviewTextInput="tb_PreviewTextInput"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="6"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="图纸日期:" />
|
||||
<DatePicker
|
||||
<hc:DatePicker
|
||||
x:Name="tpDate"
|
||||
Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="图纸日期:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
SelectedDate="{x:Static sys:DateTime.Today}" />
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="项目负责人:" />
|
||||
<TextBox
|
||||
|
||||
<hc:TextBox
|
||||
x:Name="tbLeader"
|
||||
Grid.Row="0"
|
||||
Grid.Column="3"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="负责人:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="专业:" />
|
||||
<TextBox
|
||||
<hc:TextBox
|
||||
x:Name="tbMajor"
|
||||
Grid.Row="1"
|
||||
Grid.Column="3"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="专业:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="设计:" />
|
||||
<TextBox
|
||||
|
||||
<hc:TextBox
|
||||
x:Name="tbDesigner"
|
||||
Grid.Row="2"
|
||||
Grid.Column="3"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,3"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="设计:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="校对:" />
|
||||
<TextBox
|
||||
|
||||
<hc:TextBox
|
||||
x:Name="tbProofReader"
|
||||
Grid.Row="3"
|
||||
Grid.Column="3"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="校对:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="审核:" />
|
||||
<TextBox
|
||||
|
||||
<hc:TextBox
|
||||
x:Name="tbReviewer"
|
||||
Grid.Row="4"
|
||||
Grid.Column="3"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="审核:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
TextAlignment="Center" />
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Text="审定:" />
|
||||
<TextBox
|
||||
|
||||
<hc:TextBox
|
||||
x:Name="tbApprover"
|
||||
Grid.Row="5"
|
||||
Grid.Column="3"
|
||||
Grid.Column="1"
|
||||
Height="30"
|
||||
Margin="0,4,0,4"
|
||||
VerticalContentAlignment="Center"
|
||||
hc:InfoElement.Title="审定:"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
TextAlignment="Center" />
|
||||
<Button
|
||||
x:Name="btnConfirm"
|
||||
Grid.Row="6"
|
||||
Grid.Column="3"
|
||||
Width="75"
|
||||
Grid.Column="1"
|
||||
Width="74"
|
||||
Height="30"
|
||||
Margin="128,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
Click="btnConfirm_Click"
|
||||
Content="确定" />
|
||||
</Grid>
|
||||
|
||||
50
RookieStation/Properties/Resources.Designer.cs
generated
50
RookieStation/Properties/Resources.Designer.cs
generated
@@ -60,6 +60,16 @@ namespace RookieStation.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap AutoArrangeTags {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("AutoArrangeTags", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
@@ -150,6 +160,26 @@ namespace RookieStation.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap FurnitureLegend {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("FurnitureLegend", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap GroundLegend {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GroundLegend", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
@@ -190,6 +220,16 @@ namespace RookieStation.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap ManualArrangeTags {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("ManualArrangeTags", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
@@ -310,6 +350,16 @@ namespace RookieStation.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap WallLegend {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("WallLegend", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="AutoArrangeTags" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ArrangeTags.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Background" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Background.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -145,6 +148,12 @@
|
||||
<data name="FloorFinishes" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\floorfinishes.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="FurnitureLegend" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\FurnitureLegend.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="GroundLegend" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\GroundLegend.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Lamp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\lamp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -157,6 +166,9 @@
|
||||
<data name="MainMaterials" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MainMaterials.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="ManualArrangeTags" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ManualArrangeTags.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="PlaneLegend" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\PlaneLegend.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@@ -193,6 +205,9 @@
|
||||
<data name="WallFinishes" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\wallfinishes.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="WallLegend" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\WallLegend.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Wire" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Wire.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
||||
2
RookieStation/Properties/Settings.Designer.cs
generated
2
RookieStation/Properties/Settings.Designer.cs
generated
@@ -61,7 +61,7 @@ namespace RookieStation.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("C:\\ProgramData\\Autodesk\\Revit\\Addins\\2020\\RsTools\\FamilyLibrary")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("C:\\ProgramData\\Autodesk\\RVT 2020\\Libraries\\China")]
|
||||
public string FamilyFolder {
|
||||
get {
|
||||
return ((string)(this["FamilyFolder"]));
|
||||
|
||||
BIN
RookieStation/Resources/ArrangeTags.png
Normal file
BIN
RookieStation/Resources/ArrangeTags.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 979 B |
BIN
RookieStation/Resources/FurnitureLegend.png
Normal file
BIN
RookieStation/Resources/FurnitureLegend.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 345 B |
BIN
RookieStation/Resources/GroundLegend.png
Normal file
BIN
RookieStation/Resources/GroundLegend.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 635 B |
BIN
RookieStation/Resources/ManualArrangeTags.png
Normal file
BIN
RookieStation/Resources/ManualArrangeTags.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 663 B |
BIN
RookieStation/Resources/WallLegend.png
Normal file
BIN
RookieStation/Resources/WallLegend.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 506 B |
@@ -102,6 +102,7 @@
|
||||
<Compile Include="CommonTools\Views\ProgressMonitorView.xaml.cs">
|
||||
<DependentUpon>ProgressMonitorView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Drawing\ExecuteCmds\ManualAlignTags.cs" />
|
||||
<Compile Include="Drawing\ExecuteCmds\CreateGroundPavingLegend.cs" />
|
||||
<Compile Include="Drawing\ExecuteCmds\CreateLightLegend.cs" />
|
||||
<Compile Include="Drawing\ExecuteCmds\CreateFurnitureLegend.cs" />
|
||||
@@ -113,6 +114,7 @@
|
||||
<Compile Include="Drawing\ExecuteCmds\CreateViewSectionAnnotation.cs" />
|
||||
<Compile Include="Drawing\ExecuteCmds\CreateWallLegend.cs" />
|
||||
<Compile Include="Drawing\ExecuteCmds\CreateWires.cs" />
|
||||
<Compile Include="Drawing\ExecuteCmds\AutoAlignTags.cs" />
|
||||
<Compile Include="Drawing\ExecuteCmds\UnifyViewportOnViewSheet.cs" />
|
||||
<Compile Include="Drawing\Models\LightingDevices.cs" />
|
||||
<Compile Include="Drawing\Models\MaterialItem.cs" />
|
||||
@@ -208,108 +210,6 @@
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\其他\雨棚.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\出入口\收检台-右.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\出入口\收检台-左.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\出入口\智能翼闸.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\绿动回收台-单.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\绿动回收台-双.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\绿动回收台.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\开关\三联开关 - 暗装.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\开关\单联开关 - 暗装.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\开关\双联开关 - 暗装.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\插座\单相地面二三孔插座.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\插座\单相暗装二三孔插座.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\亚克力水晶字.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\壁挂灯箱.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\精工背发光字.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\腰封玻璃贴.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\灯具\平板灯.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\灯具\支架灯.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\灯具\明装筒灯.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\灯具\艺术吊灯.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\灯具\轨道射灯.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\设备\家用配电箱.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\设备\配电箱.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\设备\高拍仪.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\货架\仓储货架.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\门\双扇平开防火子母门.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\门\防火卷帘-中装.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\设备\自助寄件机.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\圆形餐桌组.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\咖餐厅座椅组.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\钢制桌椅.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\出入口\三辊闸机.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\其他\吊线.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\墙饰面\背景墙.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\Inventory.db">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
@@ -317,75 +217,9 @@
|
||||
<None Include="RsLibrary\Document\样板工程量清单.xlsx">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\门\幕墙门-双扇无边框.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\门\幕墙门-玻璃门.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\板饰面\地砖.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\寄件接待台-带收检台.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\寄件接待台.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\拆包桌.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\家具\绿动箱.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\出入口\L型收检台.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\出入口\直线形收检台.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\出入口\简易收检台.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\出入口\闸机.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\其他\定位线.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\货架\货架端牌.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\台卡.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\四牌.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\地贴.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\墙贴.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\寄件收费标准.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\常规门头.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\快递指导规范.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\玻璃贴.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\标识标牌\菜鸟使命.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="RsLibrary\FamilyLibrary\墙饰面\校园文化墙.rfa">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="RookieStation.addin">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
@@ -399,7 +233,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Page Include="CommonTools\Views\ProgressMonitorView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -460,6 +293,9 @@
|
||||
<None Include="Resources\Encrypt.png" />
|
||||
<None Include="Resources\ExportDwg.png" />
|
||||
<None Include="Resources\LightLegend.png" />
|
||||
<None Include="Resources\GroundLegend.png" />
|
||||
<None Include="Resources\FurnitureLegend.png" />
|
||||
<None Include="Resources\ArrangeTags.png" />
|
||||
<Content Include="Resources\LogoExtrusion.png" />
|
||||
<None Include="Resources\ViewPlanDim.png" />
|
||||
<None Include="Resources\ViewSectionDim.png" />
|
||||
@@ -468,8 +304,10 @@
|
||||
<None Include="Resources\SwitchLegend.png" />
|
||||
<None Include="Resources\SocketLegend.png" />
|
||||
<None Include="Resources\PlaneLegend.png" />
|
||||
<None Include="Resources\ManualArrangeTags.png" />
|
||||
<Content Include="Resources\WallFinishes.png" />
|
||||
<None Include="Resources\Wire.png" />
|
||||
<None Include="Resources\WallLegend.png" />
|
||||
<Content Include="Resources\YTX.ico" />
|
||||
<None Include="Resources\WorkSchedule.png" />
|
||||
<None Include="Resources\视口.png" />
|
||||
|
||||
@@ -14,6 +14,7 @@ using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media.Imaging;
|
||||
using RookieStation.Drawing.ExecuteCmds;
|
||||
using System.Reflection;
|
||||
|
||||
namespace RookieStation.RibbonMenu
|
||||
{
|
||||
@@ -27,6 +28,38 @@ namespace RookieStation.RibbonMenu
|
||||
private const string StatisticsPanelName = "统计";
|
||||
private const string DrawingPanelName = "出图";
|
||||
private const string CommonTools = "通用工具";
|
||||
///// <summary>
|
||||
///// 帮助文档
|
||||
///// </summary>
|
||||
///// <param name="helpFile"></param>
|
||||
///// <returns></returns>
|
||||
//private static ContextualHelp CreateContextualHelp(string helpFile)
|
||||
//{
|
||||
// FileInfo dllFileInfo = new FileInfo(Assembly.GetExecutingAssembly().Location);
|
||||
|
||||
// string helpFilePath = Path.Combine(dllFileInfo.Directory.Parent.FullName, "help.htm");
|
||||
|
||||
// FileInfo helpFileInfo = new FileInfo(helpFilePath);
|
||||
// if (helpFileInfo.Exists)
|
||||
// {
|
||||
// return new ContextualHelp(ContextualHelpType.Url, helpFilePath);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// string dirPath = dllFileInfo.Directory.FullName;
|
||||
// //Get the english documentation
|
||||
// string HelpName = helpFile;
|
||||
|
||||
// string HelpPath = Path.Combine(dirPath, HelpName);
|
||||
|
||||
// //if the help file does not exist, extract it in the HelpDirectory
|
||||
// //Extract the english documentation
|
||||
|
||||
// Tools.ExtractRessource("AlignTag.Resources.AlignHelp.chm", HelpPath);
|
||||
|
||||
// return new ContextualHelp(ContextualHelpType.ChmFile, HelpPath);
|
||||
// }
|
||||
//}
|
||||
|
||||
//获取Ribbon类所在的通用类库目录
|
||||
private static readonly string AddInPath = typeof(RsApp).Assembly.Location;
|
||||
@@ -37,6 +70,7 @@ namespace RookieStation.RibbonMenu
|
||||
private static readonly string ViewPlanCmdEnabled = typeof(EnableCmdInViewPlan).ToString();
|
||||
private static readonly string DrawingSheetCmdEnabled = typeof(EnableCmdInViewSheet).ToString();
|
||||
private static readonly string ViewSectionCmdEnabled = typeof(EnableCmdInViewSection).ToString();
|
||||
private static readonly string NotView3dCmdEnabled = typeof(EnableCmdNotInView3D).ToString();
|
||||
|
||||
private BitmapSource ConvertFromBitmap(System.Drawing.Bitmap bitmap)
|
||||
{
|
||||
@@ -62,18 +96,18 @@ namespace RookieStation.RibbonMenu
|
||||
//项目设置
|
||||
RibbonPanel projectPanel = application.CreateRibbonPanel(TabName, ProjectSettingsPanelName);
|
||||
|
||||
CreatePushButton<CmdProjectSettings>(projectPanel, "项目设置", Properties.Resources.cainiao, null);
|
||||
NewPushButtonData<CmdProjectSettings>(projectPanel, "项目设置", Properties.Resources.cainiao, null);
|
||||
//前台布置
|
||||
RibbonPanel receptionAreaPanel = application.CreateRibbonPanel(TabName, ReceptionPanelName);
|
||||
|
||||
CreatePushButton<CmdPlaceReceptionArea>(receptionAreaPanel, "前台布置", Properties.Resources.Reception, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CmdPlaceReceptionArea>(receptionAreaPanel, "前台布置", Properties.Resources.Reception, ViewPlanCmdEnabled);
|
||||
|
||||
CreatePushButton<CmdLogoExtrusion>(receptionAreaPanel, "标识挤出", Properties.Resources.LogoExtrusion, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CmdLogoExtrusion>(receptionAreaPanel, "标识挤出", Properties.Resources.LogoExtrusion, ViewPlanCmdEnabled);
|
||||
|
||||
//出入口布置
|
||||
RibbonPanel packAreaPanel = application.CreateRibbonPanel(TabName, EntranceAndExitGatePanelName);
|
||||
CreatePushButton<CmdPlaceEntranceGate>(packAreaPanel, "入口布置", Properties.Resources.EntranceGate, ViewPlanCmdEnabled);
|
||||
CreatePushButton<CmdPlaceExitGate>(packAreaPanel, "出口布置", Properties.Resources.ExitGate, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CmdPlaceEntranceGate>(packAreaPanel, "入口布置", Properties.Resources.EntranceGate, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CmdPlaceExitGate>(packAreaPanel, "出口布置", Properties.Resources.ExitGate, ViewPlanCmdEnabled);
|
||||
|
||||
//PushButtonData exitGateLayoutPBD = new PushButtonData("出口布置", "出口收检台", AddInPath, typeof(CmdPlaceExitGate).FullName)
|
||||
//{
|
||||
@@ -86,74 +120,121 @@ namespace RookieStation.RibbonMenu
|
||||
////var entranceBtn = (PushButton)gateItemsStacked[0];
|
||||
////var exitBtn = (PushButton)gateItemsStacked[1];
|
||||
//寄件区布置
|
||||
CreatePushButton<CmdPlaceShelves>(packAreaPanel, "货架布置", Properties.Resources.Shelf, ViewPlanCmdEnabled);
|
||||
CreatePushButton<CmdArrangeShelfCards>(packAreaPanel, "货架端牌", Properties.Resources.ShelfCard, ViewPlanCmdEnabled);
|
||||
CreatePushButton<CmdPlaceLamps>(packAreaPanel, "灯具布置", Properties.Resources.Lamp, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CmdPlaceShelves>(packAreaPanel, "货架布置", Properties.Resources.Shelf, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CmdArrangeShelfCards>(packAreaPanel, "货架端牌", Properties.Resources.ShelfCard, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CmdPlaceLamps>(packAreaPanel, "灯具布置", Properties.Resources.Lamp, ViewPlanCmdEnabled);
|
||||
|
||||
//饰面,完成面
|
||||
RibbonPanel finishesPanel = application.CreateRibbonPanel(TabName, FinishesPanelName);
|
||||
CreatePushButton<CmdPlaceFloorFinishes>(finishesPanel, "板饰面", Properties.Resources.FloorFinishes, ViewPlanCmdEnabled);
|
||||
CreatePushButton<CmdPlaceWallFinishes>(finishesPanel, "墙饰面", Properties.Resources.WallFinishes, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CmdPlaceFloorFinishes>(finishesPanel, "板饰面", Properties.Resources.FloorFinishes, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CmdPlaceWallFinishes>(finishesPanel, "墙饰面", Properties.Resources.WallFinishes, ViewPlanCmdEnabled);
|
||||
|
||||
//统计面板
|
||||
RibbonPanel statisticsPanel = application.CreateRibbonPanel(TabName, StatisticsPanelName);
|
||||
CreatePushButton<CmdExportBudgetInventory>(statisticsPanel, "工程量导出", Properties.Resources.WorkSchedule, null);
|
||||
NewPushButtonData<CmdExportBudgetInventory>(statisticsPanel, "工程量导出", Properties.Resources.WorkSchedule, null);
|
||||
//出图面板
|
||||
RibbonPanel drawingPanel = application.CreateRibbonPanel(TabName, DrawingPanelName);
|
||||
|
||||
CreatePushButton<CreateMainMaterialsTable>(drawingPanel, "主材表", Properties.Resources.MainMaterials, DrawingSheetCmdEnabled);
|
||||
NewPushButtonData<CreateMainMaterialsTable>(drawingPanel, "主材表", Properties.Resources.MainMaterials, DrawingSheetCmdEnabled);
|
||||
|
||||
SplitButtonData splitButtonData = new SplitButtonData("创建图例", "创建图例");
|
||||
var spb = drawingPanel.AddItem(splitButtonData) as SplitButton;
|
||||
SplitButtonData legendSplitButtonData = new SplitButtonData("创建图例", "创建图例");
|
||||
var lspb = drawingPanel.AddItem(legendSplitButtonData) as SplitButton;
|
||||
|
||||
PushButtonData shelfButtonData = new PushButtonData("平面图例", "平面图例", AddInPath, typeof(CreatePlaneGraphLegend).FullName)
|
||||
PushButtonData planeGraphButtonData = new PushButtonData("平面图例", "平面图例", AddInPath, typeof(CreatePlaneGraphLegend).FullName)
|
||||
{
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.PlaneLegend),
|
||||
Image = ConvertFromBitmap(Properties.Resources.PlaneLegend),
|
||||
ToolTip = "在菜鸟驿站平面布置图中创建图例。",
|
||||
AvailabilityClassName = DrawingSheetCmdEnabled
|
||||
};
|
||||
|
||||
PushButtonData furnitureButtonData = new PushButtonData("家具图例", "家具图例", AddInPath, typeof(CreateFurnitureLegend).FullName)
|
||||
{
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.ShelfLegend),
|
||||
Image = ConvertFromBitmap(Properties.Resources.ShelfLegend),
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.FurnitureLegend),
|
||||
Image = ConvertFromBitmap(Properties.Resources.FurnitureLegend),
|
||||
ToolTip = "在家具尺寸图中创建家具图例。",
|
||||
AvailabilityClassName = DrawingSheetCmdEnabled
|
||||
};
|
||||
PushButtonData wallButtonData = new PushButtonData("墙体图例", "墙体图例", AddInPath, typeof(CreateWallLegend).FullName)
|
||||
{
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.WallLegend),
|
||||
Image = ConvertFromBitmap(Properties.Resources.WallLegend),
|
||||
ToolTip = "在墙体定位图中创建墙体图例。",
|
||||
AvailabilityClassName = DrawingSheetCmdEnabled
|
||||
};
|
||||
PushButtonData floorButtonData = new PushButtonData("地面图例", "地面图例", AddInPath, typeof(CreateGroundPavingLegend).FullName)
|
||||
{
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.GroundLegend),
|
||||
Image = ConvertFromBitmap(Properties.Resources.GroundLegend),
|
||||
ToolTip = "在地面铺贴图中创建地面铺贴图例。",
|
||||
AvailabilityClassName = DrawingSheetCmdEnabled
|
||||
};
|
||||
PushButtonData lightButtonData = new PushButtonData("灯具图例", "灯具图例", AddInPath, typeof(CreateLightLegend).FullName)
|
||||
{
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.LightLegend),
|
||||
Image = ConvertFromBitmap(Properties.Resources.LightLegend),
|
||||
ToolTip = "在灯具定位图中创建灯具图例。",
|
||||
AvailabilityClassName = DrawingSheetCmdEnabled
|
||||
};
|
||||
PushButtonData socketButtonData = new PushButtonData("插座图例", "插座图例", AddInPath, typeof(CreateSocketLegend).FullName)
|
||||
{
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.SocketLegend),
|
||||
Image = ConvertFromBitmap(Properties.Resources.SocketLegend),
|
||||
ToolTip = "在强弱电点位图中创建插座图例。",
|
||||
AvailabilityClassName = DrawingSheetCmdEnabled
|
||||
};
|
||||
PushButtonData switchButtonData = new PushButtonData("开关图例", "开关图例", AddInPath, typeof(CreateSwitchLegend).FullName)
|
||||
{
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.SwitchLegend),
|
||||
Image = ConvertFromBitmap(Properties.Resources.SwitchLegend),
|
||||
ToolTip = "在开关控制图中创建开关图例。",
|
||||
AvailabilityClassName = DrawingSheetCmdEnabled
|
||||
};
|
||||
spb.AddPushButton(shelfButtonData);
|
||||
spb.AddPushButton(lightButtonData);
|
||||
spb.AddPushButton(socketButtonData);
|
||||
spb.AddPushButton(switchButtonData);
|
||||
lspb.AddPushButton(planeGraphButtonData);
|
||||
lspb.AddPushButton(furnitureButtonData);
|
||||
lspb.AddPushButton(wallButtonData);
|
||||
lspb.AddPushButton(floorButtonData);
|
||||
lspb.AddPushButton(lightButtonData);
|
||||
lspb.AddPushButton(socketButtonData);
|
||||
lspb.AddPushButton(switchButtonData);
|
||||
|
||||
CreatePushButton<CreateViewPlanAnnotation>(drawingPanel, "平面标注", Properties.Resources.ViewPlanDim, ViewPlanCmdEnabled);
|
||||
CreatePushButton<CreateViewSectionAnnotation>(drawingPanel, "立面标注", Properties.Resources.ViewSectionDim, ViewSectionCmdEnabled);
|
||||
CreatePushButton<CreateWires>(drawingPanel, "创建导线", Properties.Resources.Wire, ViewPlanCmdEnabled);
|
||||
var UnifyViewportPBD = CreatePushButton<UnifyViewportOnViewSheet>(drawingPanel, "统一视口", Properties.Resources.UnifyViewport, ViewPlanCmdEnabled);
|
||||
SplitButtonData tagSplitButtonData = new SplitButtonData("标记整理", "标记整理");
|
||||
var tspb = drawingPanel.AddItem(tagSplitButtonData) as SplitButton;
|
||||
//PulldownButtonData tagPullButtonData = new PulldownButtonData("标记整理", "标记整理");
|
||||
//var tpbb = drawingPanel.AddItem(tagPullButtonData) as PulldownButton;
|
||||
|
||||
//var ManualAlignPBD = NewPushButtonData<ManualAlign>(drawingPanel, "手动", Properties.Resources.ArrangeTags, null);
|
||||
PushButtonData ManualAlignPBD = new PushButtonData("手动", "手动", AddInPath, typeof(ManualAlignTags).FullName)
|
||||
{
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.ManualArrangeTags),
|
||||
Image = ConvertFromBitmap(Properties.Resources.ManualArrangeTags),
|
||||
ToolTip = "对当前视图的标记进行手动整理。",
|
||||
AvailabilityClassName = NotView3dCmdEnabled
|
||||
};
|
||||
//var autoAlignPBD = NewPushButtonData<AutoAlign>(drawingPanel, "自动", Properties.Resources.ArrangeTags, null);
|
||||
PushButtonData autoAlignPBD = new PushButtonData("自动", "自动", AddInPath, typeof(AutoAlignTags).FullName)
|
||||
{
|
||||
LargeImage = ConvertFromBitmap(Properties.Resources.AutoArrangeTags),
|
||||
Image = ConvertFromBitmap(Properties.Resources.AutoArrangeTags),
|
||||
ToolTip = "对当前视图的所有标记进行分组自动整理。",
|
||||
AvailabilityClassName = NotView3dCmdEnabled
|
||||
};
|
||||
tspb.AddPushButton(ManualAlignPBD);
|
||||
tspb.AddPushButton(autoAlignPBD);
|
||||
|
||||
NewPushButtonData<CreateViewPlanAnnotation>(drawingPanel, "平面标注", Properties.Resources.ViewPlanDim, ViewPlanCmdEnabled);
|
||||
NewPushButtonData<CreateViewSectionAnnotation>(drawingPanel, "立面标注", Properties.Resources.ViewSectionDim, ViewSectionCmdEnabled);
|
||||
NewPushButtonData<CreateWires>(drawingPanel, "创建导线", Properties.Resources.Wire, ViewPlanCmdEnabled);
|
||||
var UnifyViewportPBD = NewPushButtonData<UnifyViewportOnViewSheet>(drawingPanel, "统一视口", Properties.Resources.UnifyViewport, ViewPlanCmdEnabled);
|
||||
UnifyViewportPBD.ToolTip = "请选择一个合适的楼层平面,以该楼层平面视口范围作为图纸视口范围";
|
||||
CreatePushButton<BatchExportDwg>(drawingPanel, "批量导出DWG", Properties.Resources.ExportDWG, null);
|
||||
NewPushButtonData<BatchExportDwg>(drawingPanel, "批量导出DWG", Properties.Resources.ExportDWG, null);
|
||||
|
||||
//通用面板
|
||||
RibbonPanel commonToolsPanel = application.CreateRibbonPanel(TabName, CommonTools);
|
||||
//CreatePushButton<CmdEncryptFamily>(commonToolsPanel, "加密族", Properties.Resources.Encrypt, null);
|
||||
//CreatePushButton<CmdDecryptFamily>(commonToolsPanel, "解密族", Properties.Resources.Decrypt, null);
|
||||
CreatePushButton<UseFamilyPane>(commonToolsPanel, "族库浏览", Properties.Resources.FamilyLib, null);
|
||||
CreatePushButton<ChangeBackgroundColor>(commonToolsPanel, "切换背景色", Properties.Resources.Background, null);
|
||||
NewPushButtonData<UseFamilyPane>(commonToolsPanel, "族库浏览", Properties.Resources.FamilyLib, null);
|
||||
NewPushButtonData<ChangeBackgroundColor>(commonToolsPanel, "切换背景色", Properties.Resources.Background, null);
|
||||
RegisterDockPane(application);
|
||||
return Result.Succeeded;
|
||||
}
|
||||
@@ -171,8 +252,8 @@ namespace RookieStation.RibbonMenu
|
||||
/// <param name="panel">面板</param>
|
||||
/// <param name="btnContent">按钮名</param>
|
||||
/// <param name="bitmap">按钮图片</param>
|
||||
/// <param name="className">控制可用性</param>
|
||||
public PushButtonData CreatePushButton<T>(RibbonPanel panel, string btnContent, Bitmap bitmap, string className)
|
||||
/// <param name="availabilityClassName">控制可用性</param>
|
||||
public PushButtonData NewPushButtonData<T>(RibbonPanel panel, string btnContent, Bitmap bitmap, string availabilityClassName)
|
||||
{
|
||||
string AddInPath = typeof(T).Assembly.Location;
|
||||
PushButtonData btnData = new PushButtonData(btnContent, btnContent, AddInPath, typeof(T).FullName)
|
||||
@@ -181,9 +262,9 @@ namespace RookieStation.RibbonMenu
|
||||
Image = ConvertFromBitmap(bitmap),
|
||||
};
|
||||
var placeShelvesBtn = (PushButton)panel.AddItem(btnData);
|
||||
if (className != null)
|
||||
if (availabilityClassName != null)
|
||||
{
|
||||
placeShelvesBtn.AvailabilityClassName = className;
|
||||
placeShelvesBtn.AvailabilityClassName = availabilityClassName;
|
||||
}
|
||||
return btnData;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user