mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-09-10 05:30:47 +00:00
added Revit 2022 SDK minus except *rvt and *rfa
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Diagnostics;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Autodesk.Revit;
|
||||
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
#region IExternalCommand Members Implementation
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData,
|
||||
ref string message, Autodesk.Revit.DB.ElementSet elements)
|
||||
{
|
||||
|
||||
// try to initialize necessary data to create framing
|
||||
FrameData data = FrameData.CreateInstance(commandData);
|
||||
// display UI for user's input
|
||||
using (CreateFrameForm framingForm = new CreateFrameForm(data))
|
||||
{
|
||||
if (framingForm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
// create framing
|
||||
FrameBuilder builder = new FrameBuilder(data);
|
||||
builder.CreateFraming();
|
||||
}
|
||||
else
|
||||
{
|
||||
// cancel the command
|
||||
return Autodesk.Revit.UI.Result.Cancelled;
|
||||
}
|
||||
}
|
||||
|
||||
return Autodesk.Revit.UI.Result.Succeeded;
|
||||
}
|
||||
#endregion IExternalCommand Members Implementation
|
||||
}
|
||||
}
|
||||
+453
@@ -0,0 +1,453 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
partial class CreateFrameForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.unitLabel = new System.Windows.Forms.Label();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.floornumberLabel = new System.Windows.Forms.Label();
|
||||
this.XLabel = new System.Windows.Forms.Label();
|
||||
this.YLabel = new System.Windows.Forms.Label();
|
||||
this.DistanceLabel = new System.Windows.Forms.Label();
|
||||
this.floorNumberTextBox = new System.Windows.Forms.TextBox();
|
||||
this.distanceTextBox = new System.Windows.Forms.TextBox();
|
||||
this.yNumberTextBox = new System.Windows.Forms.TextBox();
|
||||
this.xNumberTextBox = new System.Windows.Forms.TextBox();
|
||||
this.braceLabel = new System.Windows.Forms.Label();
|
||||
this.beamLabel = new System.Windows.Forms.Label();
|
||||
this.columnLabel = new System.Windows.Forms.Label();
|
||||
this.braceTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.beamTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.columnTypeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.columnDuplicateButton = new System.Windows.Forms.Button();
|
||||
this.beamDuplicateButton = new System.Windows.Forms.Button();
|
||||
this.braceDuplicateButton = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.levelHeightTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.originXtextBox = new System.Windows.Forms.TextBox();
|
||||
this.originYtextBox = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.originAngletextBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// unitLabel
|
||||
//
|
||||
this.unitLabel.Location = new System.Drawing.Point(133, 36);
|
||||
this.unitLabel.Name = "unitLabel";
|
||||
this.unitLabel.Size = new System.Drawing.Size(32, 18);
|
||||
this.unitLabel.TabIndex = 35;
|
||||
this.unitLabel.Text = "feet";
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(516, 324);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.cancelButton.TabIndex = 27;
|
||||
this.cancelButton.Text = "&Cancel";
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// floornumberLabel
|
||||
//
|
||||
this.floornumberLabel.Location = new System.Drawing.Point(12, 177);
|
||||
this.floornumberLabel.Name = "floornumberLabel";
|
||||
this.floornumberLabel.Size = new System.Drawing.Size(144, 21);
|
||||
this.floornumberLabel.TabIndex = 34;
|
||||
this.floornumberLabel.Text = "Number of Floors:";
|
||||
//
|
||||
// XLabel
|
||||
//
|
||||
this.XLabel.Location = new System.Drawing.Point(12, 65);
|
||||
this.XLabel.Name = "XLabel";
|
||||
this.XLabel.Size = new System.Drawing.Size(200, 21);
|
||||
this.XLabel.TabIndex = 33;
|
||||
this.XLabel.Text = "Number of Columns in the X Direction:";
|
||||
//
|
||||
// YLabel
|
||||
//
|
||||
this.YLabel.Location = new System.Drawing.Point(12, 121);
|
||||
this.YLabel.Name = "YLabel";
|
||||
this.YLabel.Size = new System.Drawing.Size(200, 21);
|
||||
this.YLabel.TabIndex = 32;
|
||||
this.YLabel.Text = "Number of Columns in the Y Direction:";
|
||||
//
|
||||
// DistanceLabel
|
||||
//
|
||||
this.DistanceLabel.Location = new System.Drawing.Point(12, 9);
|
||||
this.DistanceLabel.Name = "DistanceLabel";
|
||||
this.DistanceLabel.Size = new System.Drawing.Size(152, 21);
|
||||
this.DistanceLabel.TabIndex = 31;
|
||||
this.DistanceLabel.Text = "Distance between Columns:";
|
||||
//
|
||||
// floorNumberTextBox
|
||||
//
|
||||
this.floorNumberTextBox.Location = new System.Drawing.Point(15, 200);
|
||||
this.floorNumberTextBox.Name = "floorNumberTextBox";
|
||||
this.floorNumberTextBox.Size = new System.Drawing.Size(112, 20);
|
||||
this.floorNumberTextBox.TabIndex = 22;
|
||||
this.floorNumberTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.floorNumberTextBox_Validating);
|
||||
//
|
||||
// distanceTextBox
|
||||
//
|
||||
this.distanceTextBox.Location = new System.Drawing.Point(15, 33);
|
||||
this.distanceTextBox.Name = "distanceTextBox";
|
||||
this.distanceTextBox.Size = new System.Drawing.Size(112, 20);
|
||||
this.distanceTextBox.TabIndex = 19;
|
||||
this.distanceTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.distanceTextBox_Validating);
|
||||
//
|
||||
// yNumberTextBox
|
||||
//
|
||||
this.yNumberTextBox.Location = new System.Drawing.Point(15, 145);
|
||||
this.yNumberTextBox.Name = "yNumberTextBox";
|
||||
this.yNumberTextBox.Size = new System.Drawing.Size(112, 20);
|
||||
this.yNumberTextBox.TabIndex = 21;
|
||||
this.yNumberTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.yNumberTextBox_Validating);
|
||||
//
|
||||
// xNumberTextBox
|
||||
//
|
||||
this.xNumberTextBox.Location = new System.Drawing.Point(15, 89);
|
||||
this.xNumberTextBox.Name = "xNumberTextBox";
|
||||
this.xNumberTextBox.Size = new System.Drawing.Size(112, 20);
|
||||
this.xNumberTextBox.TabIndex = 20;
|
||||
this.xNumberTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.xNumberTextBox_Validating);
|
||||
//
|
||||
// braceLabel
|
||||
//
|
||||
this.braceLabel.Location = new System.Drawing.Point(214, 121);
|
||||
this.braceLabel.Name = "braceLabel";
|
||||
this.braceLabel.Size = new System.Drawing.Size(120, 20);
|
||||
this.braceLabel.TabIndex = 30;
|
||||
this.braceLabel.Text = "Type of Braces:";
|
||||
//
|
||||
// beamLabel
|
||||
//
|
||||
this.beamLabel.Location = new System.Drawing.Point(214, 64);
|
||||
this.beamLabel.Name = "beamLabel";
|
||||
this.beamLabel.Size = new System.Drawing.Size(120, 21);
|
||||
this.beamLabel.TabIndex = 29;
|
||||
this.beamLabel.Text = "Type of Beams:";
|
||||
//
|
||||
// columnLabel
|
||||
//
|
||||
this.columnLabel.Location = new System.Drawing.Point(214, 9);
|
||||
this.columnLabel.Name = "columnLabel";
|
||||
this.columnLabel.Size = new System.Drawing.Size(120, 20);
|
||||
this.columnLabel.TabIndex = 28;
|
||||
this.columnLabel.Text = "Type of Columns:";
|
||||
//
|
||||
// braceTypeComboBox
|
||||
//
|
||||
this.braceTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.braceTypeComboBox.Location = new System.Drawing.Point(214, 144);
|
||||
this.braceTypeComboBox.MaxDropDownItems = 10;
|
||||
this.braceTypeComboBox.Name = "braceTypeComboBox";
|
||||
this.braceTypeComboBox.Size = new System.Drawing.Size(281, 21);
|
||||
this.braceTypeComboBox.TabIndex = 25;
|
||||
this.braceTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.braceTypeComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// beamTypeComboBox
|
||||
//
|
||||
this.beamTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.beamTypeComboBox.Location = new System.Drawing.Point(214, 88);
|
||||
this.beamTypeComboBox.MaxDropDownItems = 10;
|
||||
this.beamTypeComboBox.Name = "beamTypeComboBox";
|
||||
this.beamTypeComboBox.Size = new System.Drawing.Size(281, 21);
|
||||
this.beamTypeComboBox.TabIndex = 24;
|
||||
this.beamTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.beamTypeComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// columnTypeComboBox
|
||||
//
|
||||
this.columnTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.columnTypeComboBox.Location = new System.Drawing.Point(214, 32);
|
||||
this.columnTypeComboBox.MaxDropDownItems = 10;
|
||||
this.columnTypeComboBox.Name = "columnTypeComboBox";
|
||||
this.columnTypeComboBox.Size = new System.Drawing.Size(281, 21);
|
||||
this.columnTypeComboBox.TabIndex = 23;
|
||||
this.columnTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.columnTypeComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
this.OKButton.Location = new System.Drawing.Point(435, 324);
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.OKButton.TabIndex = 26;
|
||||
this.OKButton.Text = "&OK";
|
||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// columnDuplicateButton
|
||||
//
|
||||
this.columnDuplicateButton.Location = new System.Drawing.Point(501, 30);
|
||||
this.columnDuplicateButton.Name = "columnDuplicateButton";
|
||||
this.columnDuplicateButton.Size = new System.Drawing.Size(102, 24);
|
||||
this.columnDuplicateButton.TabIndex = 36;
|
||||
this.columnDuplicateButton.Text = "&ColumnDuplicate";
|
||||
this.columnDuplicateButton.UseVisualStyleBackColor = true;
|
||||
this.columnDuplicateButton.Click += new System.EventHandler(this.columnDuplicateButton_Click);
|
||||
//
|
||||
// beamDuplicateButton
|
||||
//
|
||||
this.beamDuplicateButton.Location = new System.Drawing.Point(501, 85);
|
||||
this.beamDuplicateButton.Name = "beamDuplicateButton";
|
||||
this.beamDuplicateButton.Size = new System.Drawing.Size(102, 24);
|
||||
this.beamDuplicateButton.TabIndex = 37;
|
||||
this.beamDuplicateButton.Text = "&BeamDuplicate";
|
||||
this.beamDuplicateButton.UseVisualStyleBackColor = true;
|
||||
this.beamDuplicateButton.Click += new System.EventHandler(this.beamDuplicateButton_Click);
|
||||
//
|
||||
// braceDuplicateButton
|
||||
//
|
||||
this.braceDuplicateButton.Location = new System.Drawing.Point(501, 142);
|
||||
this.braceDuplicateButton.Name = "braceDuplicateButton";
|
||||
this.braceDuplicateButton.Size = new System.Drawing.Size(102, 23);
|
||||
this.braceDuplicateButton.TabIndex = 38;
|
||||
this.braceDuplicateButton.Text = "B&raceDuplicate";
|
||||
this.braceDuplicateButton.UseVisualStyleBackColor = true;
|
||||
this.braceDuplicateButton.Click += new System.EventHandler(this.braceDuplicateButton_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(12, 233);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(175, 21);
|
||||
this.label1.TabIndex = 40;
|
||||
this.label1.Text = "Height of Auto Generated Levels:";
|
||||
//
|
||||
// levelHeightTextBox
|
||||
//
|
||||
this.levelHeightTextBox.Enabled = false;
|
||||
this.levelHeightTextBox.Location = new System.Drawing.Point(15, 255);
|
||||
this.levelHeightTextBox.Name = "levelHeightTextBox";
|
||||
this.levelHeightTextBox.Size = new System.Drawing.Size(112, 20);
|
||||
this.levelHeightTextBox.TabIndex = 39;
|
||||
this.levelHeightTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.levelHeightTextBox_Validating);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Location = new System.Drawing.Point(132, 258);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(32, 18);
|
||||
this.label2.TabIndex = 41;
|
||||
this.label2.Text = "feet";
|
||||
//
|
||||
// originXtextBox
|
||||
//
|
||||
this.originXtextBox.Location = new System.Drawing.Point(12, 45);
|
||||
this.originXtextBox.Name = "originXtextBox";
|
||||
this.originXtextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.originXtextBox.TabIndex = 42;
|
||||
this.originXtextBox.Validating += new System.ComponentModel.CancelEventHandler(this.originXtextBox_Validating);
|
||||
//
|
||||
// originYtextBox
|
||||
//
|
||||
this.originYtextBox.Location = new System.Drawing.Point(156, 45);
|
||||
this.originYtextBox.Name = "originYtextBox";
|
||||
this.originYtextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.originYtextBox.TabIndex = 43;
|
||||
this.originYtextBox.Validating += new System.ComponentModel.CancelEventHandler(this.originYtextBox_Validating);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(9, 21);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(50, 13);
|
||||
this.label4.TabIndex = 45;
|
||||
this.label4.Text = "Origin (X)";
|
||||
//
|
||||
// originAngletextBox
|
||||
//
|
||||
this.originAngletextBox.Location = new System.Drawing.Point(12, 100);
|
||||
this.originAngletextBox.Name = "originAngletextBox";
|
||||
this.originAngletextBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.originAngletextBox.TabIndex = 46;
|
||||
this.originAngletextBox.Validating += new System.ComponentModel.CancelEventHandler(this.originAngletextBox_Validating);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Controls.Add(this.label7);
|
||||
this.groupBox1.Controls.Add(this.label6);
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.originYtextBox);
|
||||
this.groupBox1.Controls.Add(this.originAngletextBox);
|
||||
this.groupBox1.Controls.Add(this.originXtextBox);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Location = new System.Drawing.Point(214, 179);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(377, 139);
|
||||
this.groupBox1.TabIndex = 47;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Location";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Location = new System.Drawing.Point(262, 48);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(32, 18);
|
||||
this.label3.TabIndex = 50;
|
||||
this.label3.Text = "feet";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.Location = new System.Drawing.Point(118, 48);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(32, 18);
|
||||
this.label7.TabIndex = 49;
|
||||
this.label7.Text = "feet,";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(161, 21);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(20, 13);
|
||||
this.label6.TabIndex = 48;
|
||||
this.label6.Text = "(Y)";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(12, 76);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(69, 13);
|
||||
this.label5.TabIndex = 47;
|
||||
this.label5.Text = "Rotate Angle";
|
||||
//
|
||||
// CreateFrameForm
|
||||
//
|
||||
this.AcceptButton = this.OKButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(607, 353);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.levelHeightTextBox);
|
||||
this.Controls.Add(this.braceDuplicateButton);
|
||||
this.Controls.Add(this.beamDuplicateButton);
|
||||
this.Controls.Add(this.columnDuplicateButton);
|
||||
this.Controls.Add(this.unitLabel);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.floornumberLabel);
|
||||
this.Controls.Add(this.XLabel);
|
||||
this.Controls.Add(this.YLabel);
|
||||
this.Controls.Add(this.DistanceLabel);
|
||||
this.Controls.Add(this.floorNumberTextBox);
|
||||
this.Controls.Add(this.distanceTextBox);
|
||||
this.Controls.Add(this.yNumberTextBox);
|
||||
this.Controls.Add(this.xNumberTextBox);
|
||||
this.Controls.Add(this.braceLabel);
|
||||
this.Controls.Add(this.beamLabel);
|
||||
this.Controls.Add(this.columnLabel);
|
||||
this.Controls.Add(this.braceTypeComboBox);
|
||||
this.Controls.Add(this.beamTypeComboBox);
|
||||
this.Controls.Add(this.columnTypeComboBox);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CreateFrameForm";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Frame Builder";
|
||||
this.Load += new System.EventHandler(this.CreateFramingForm_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label unitLabel;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Label floornumberLabel;
|
||||
private System.Windows.Forms.Label XLabel;
|
||||
private System.Windows.Forms.Label YLabel;
|
||||
private System.Windows.Forms.Label DistanceLabel;
|
||||
private System.Windows.Forms.TextBox floorNumberTextBox;
|
||||
private System.Windows.Forms.TextBox distanceTextBox;
|
||||
private System.Windows.Forms.TextBox yNumberTextBox;
|
||||
private System.Windows.Forms.TextBox xNumberTextBox;
|
||||
private System.Windows.Forms.Label braceLabel;
|
||||
private System.Windows.Forms.Label beamLabel;
|
||||
private System.Windows.Forms.Label columnLabel;
|
||||
private System.Windows.Forms.ComboBox braceTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox beamTypeComboBox;
|
||||
private System.Windows.Forms.ComboBox columnTypeComboBox;
|
||||
private System.Windows.Forms.Button OKButton;
|
||||
private System.Windows.Forms.Button columnDuplicateButton;
|
||||
private System.Windows.Forms.Button beamDuplicateButton;
|
||||
private System.Windows.Forms.Button braceDuplicateButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox levelHeightTextBox;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox originXtextBox;
|
||||
private System.Windows.Forms.TextBox originYtextBox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox originAngletextBox;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label5;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,465 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
/// <summary>
|
||||
/// main form to create framing
|
||||
/// </summary>
|
||||
public partial class CreateFrameForm : System.Windows.Forms.Form
|
||||
{
|
||||
private FrameData m_frameData; // necessary data to create framing
|
||||
|
||||
/// <summary>
|
||||
/// constructor without parameter is forbidden
|
||||
/// </summary>
|
||||
private CreateFrameForm()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor
|
||||
/// </summary>
|
||||
/// <param name="data">necessary data to create</param>
|
||||
public CreateFrameForm(FrameData data)
|
||||
{
|
||||
InitializeComponent();
|
||||
m_frameData = data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// initialize controls
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void CreateFramingForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
distanceTextBox.Text = m_frameData.Distance.ToString();
|
||||
xNumberTextBox.Text = m_frameData.XNumber.ToString();
|
||||
yNumberTextBox.Text = m_frameData.YNumber.ToString();
|
||||
floorNumberTextBox.Text = m_frameData.FloorNumber.ToString();
|
||||
levelHeightTextBox.Text = m_frameData.LevelHeight.ToString();
|
||||
originXtextBox.Text = m_frameData.FrameOrigin.U.ToString();
|
||||
originYtextBox.Text = m_frameData.FrameOrigin.V.ToString();
|
||||
originAngletextBox.Text = m_frameData.FrameOriginAngle.ToString();
|
||||
|
||||
RefreshListControl(columnTypeComboBox, m_frameData.ColumnSymbolsMgr);
|
||||
RefreshListControl(beamTypeComboBox, m_frameData.BeamSymbolsMgr);
|
||||
RefreshListControl(braceTypeComboBox, m_frameData.BraceSymbolsMgr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// duplicate column type
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void columnDuplicateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DuplicateSymbol(m_frameData.ColumnSymbolsMgr, columnTypeComboBox.SelectedValue))
|
||||
{
|
||||
RefreshListControl(columnTypeComboBox, m_frameData.ColumnSymbolsMgr);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// duplicate beam type
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void beamDuplicateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DuplicateSymbol(m_frameData.BeamSymbolsMgr, beamTypeComboBox.SelectedValue))
|
||||
{
|
||||
RefreshListControl(beamTypeComboBox, m_frameData.BeamSymbolsMgr);
|
||||
RefreshListControl(braceTypeComboBox, m_frameData.BraceSymbolsMgr);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// duplicate brace type
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void braceDuplicateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DuplicateSymbol(m_frameData.BraceSymbolsMgr, braceTypeComboBox.SelectedValue))
|
||||
{
|
||||
RefreshListControl(beamTypeComboBox, m_frameData.BeamSymbolsMgr);
|
||||
RefreshListControl(braceTypeComboBox, m_frameData.BraceSymbolsMgr);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// provide user UI to duplicate FamilySymbols
|
||||
/// </summary>
|
||||
/// <param name="typesMgr">data manager of FamilySymbols</param>
|
||||
/// <param name="symbol">FamilySymbol to be copied</param>
|
||||
/// <returns>does duplicate</returns>
|
||||
private static bool DuplicateSymbol(FrameTypesMgr typesMgr, Object symbol)
|
||||
{
|
||||
bool result = false;
|
||||
using (DuplicateTypeForm typeFrm = new DuplicateTypeForm(symbol, typesMgr))
|
||||
{
|
||||
if (typeFrm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// refresh the ListControl's datasource
|
||||
/// </summary>
|
||||
/// <param name="list">ListControl to be refreshed</param>
|
||||
private static void RefreshListControl(ListControl list, FrameTypesMgr typesMgr)
|
||||
{
|
||||
// refresh control's data
|
||||
list.DataSource = null;
|
||||
list.DataSource = typesMgr.FramingSymbols;
|
||||
list.DisplayMember = "Name";
|
||||
list.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// validate the input value
|
||||
/// set back to its old value if input is invalid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void distanceTextBox_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
double value;
|
||||
try
|
||||
{
|
||||
value = double.Parse(distanceTextBox.Text);
|
||||
m_frameData.Distance = value;
|
||||
}
|
||||
catch (FormatException formatEx)
|
||||
{
|
||||
Debug.WriteLine(formatEx.Message);
|
||||
TaskDialog.Show("Revit", "Please input a integer.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (ErrorMessageException msgEx)
|
||||
{
|
||||
distanceTextBox.Text = m_frameData.Distance.ToString();
|
||||
TaskDialog.Show("Revit", msgEx.Message);
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// validate the input value
|
||||
/// set back to its old value if input is invalid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void xNumberTextBox_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
int value;
|
||||
try
|
||||
{
|
||||
value = int.Parse(xNumberTextBox.Text);
|
||||
m_frameData.XNumber = value;
|
||||
}
|
||||
catch (FormatException formatEx)
|
||||
{
|
||||
Debug.WriteLine(formatEx.Message);
|
||||
TaskDialog.Show("Revit", "Please input a integer.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (ErrorMessageException msgEx)
|
||||
{
|
||||
xNumberTextBox.Text = m_frameData.XNumber.ToString();
|
||||
TaskDialog.Show("Revit", msgEx.Message);
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
TaskDialog.Show("Revit", "Please input a valid integer.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// validate the input value
|
||||
/// set back to its old value if input is invalid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void yNumberTextBox_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
int value;
|
||||
try
|
||||
{
|
||||
value = int.Parse(yNumberTextBox.Text);
|
||||
m_frameData.YNumber = value;
|
||||
}
|
||||
catch (FormatException formatEx)
|
||||
{
|
||||
Debug.WriteLine(formatEx.Message);
|
||||
TaskDialog.Show("Revit", "Please input a integer.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (ErrorMessageException msgEx)
|
||||
{
|
||||
yNumberTextBox.Text = m_frameData.YNumber.ToString();
|
||||
TaskDialog.Show("Revit", msgEx.Message);
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
TaskDialog.Show("Revit", "Please input a valid integer.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// validate the input value
|
||||
/// set back to its old value if input is invalid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void floorNumberTextBox_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
int value;
|
||||
try
|
||||
{
|
||||
value = int.Parse(floorNumberTextBox.Text);
|
||||
m_frameData.FloorNumber = value;
|
||||
}
|
||||
catch (FormatException formatEx)
|
||||
{
|
||||
Debug.WriteLine(formatEx.Message);
|
||||
TaskDialog.Show("Revit", "Please input a integer.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (ErrorMessageException msgEx)
|
||||
{
|
||||
floorNumberTextBox.Text = m_frameData.FloorNumber.ToString();
|
||||
TaskDialog.Show("Revit", msgEx.Message);
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
TaskDialog.Show("Revit", "Please input a valid integer.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
// change readonly property of levelHeightTextBox
|
||||
if ((m_frameData.FloorNumber + 1) > m_frameData.Levels.Count)
|
||||
{
|
||||
levelHeightTextBox.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
levelHeightTextBox.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// validate the input value
|
||||
/// set back to its old value if input is invalid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void levelHeightTextBox_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
double value;
|
||||
try
|
||||
{
|
||||
value = double.Parse(levelHeightTextBox.Text);
|
||||
m_frameData.LevelHeight = value;
|
||||
}
|
||||
catch (FormatException formatEx)
|
||||
{
|
||||
Debug.WriteLine(formatEx.Message);
|
||||
TaskDialog.Show("Revit", "Please input a integer.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (ErrorMessageException msgEx)
|
||||
{
|
||||
levelHeightTextBox.Text = m_frameData.LevelHeight.ToString();
|
||||
TaskDialog.Show("Revit", msgEx.Message);
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// validate the input value
|
||||
/// set back to its old value if input is invalid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void originXtextBox_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
double value = double.Parse(originXtextBox.Text);
|
||||
Autodesk.Revit.DB.UV oldValue = m_frameData.FrameOrigin;
|
||||
m_frameData.FrameOrigin = new Autodesk.Revit.DB.UV(value, oldValue.V);
|
||||
}
|
||||
catch (FormatException formatEx)
|
||||
{
|
||||
Debug.WriteLine(formatEx.Message);
|
||||
TaskDialog.Show("Revit", "Please input a number.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (ErrorMessageException msgEx)
|
||||
{
|
||||
originXtextBox.Text = m_frameData.FrameOrigin.U.ToString();
|
||||
TaskDialog.Show("Revit", msgEx.Message);
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// validate the input value
|
||||
/// set back to its old value if input is invalid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void originYtextBox_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
double value = double.Parse(originYtextBox.Text);
|
||||
Autodesk.Revit.DB.UV oldValue = m_frameData.FrameOrigin;
|
||||
m_frameData.FrameOrigin = new Autodesk.Revit.DB.UV(oldValue.U, value);
|
||||
}
|
||||
catch (FormatException formatEx)
|
||||
{
|
||||
Debug.WriteLine(formatEx.Message);
|
||||
TaskDialog.Show("Revit", "Please input a number.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (ErrorMessageException msgEx)
|
||||
{
|
||||
originYtextBox.Text = m_frameData.FrameOrigin.V.ToString();
|
||||
TaskDialog.Show("Revit", msgEx.Message);
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// validate the input value
|
||||
/// set back to its old value if input is invalid
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void originAngletextBox_Validating(object sender, CancelEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
PropertyInfo pInfo = typeof(FrameData).GetProperty("FrameOriginAngle");
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.Assert(true, "Reflection binding failed because interface of FrameData changed");
|
||||
}
|
||||
try
|
||||
{
|
||||
m_frameData.FrameOriginAngle = double.Parse(originAngletextBox.Text);
|
||||
}
|
||||
catch (FormatException formatEx)
|
||||
{
|
||||
Debug.WriteLine(formatEx.Message);
|
||||
TaskDialog.Show("Revit", "Please input a number.");
|
||||
e.Cancel = true;
|
||||
}
|
||||
catch (ErrorMessageException msgEx)
|
||||
{
|
||||
originAngletextBox.Text = m_frameData.FrameOriginAngle.ToString();
|
||||
TaskDialog.Show("Revit", msgEx.Message);
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// create the Frame
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// cancel all command
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// set type of column
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void columnTypeComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_frameData.SetColumnSymbol(columnTypeComboBox.SelectedItem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// set type of beam
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void beamTypeComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_frameData.SetBeamSymbol(beamTypeComboBox.SelectedItem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// set type of brace
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void braceTypeComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_frameData.SetBraceSymbol(braceTypeComboBox.SelectedItem);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,175 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
partial class DuplicateTypeForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.familyTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.typeNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.typeParameterPropertyGrid = new System.Windows.Forms.PropertyGrid();
|
||||
this.typeParametersGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.typeParametersGroupBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// familyTextBox
|
||||
//
|
||||
this.familyTextBox.Location = new System.Drawing.Point(86, 12);
|
||||
this.familyTextBox.Name = "familyTextBox";
|
||||
this.familyTextBox.ReadOnly = true;
|
||||
this.familyTextBox.Size = new System.Drawing.Size(280, 20);
|
||||
this.familyTextBox.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 15);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(39, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Family:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 47);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(34, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Type:";
|
||||
//
|
||||
// typeNameTextBox
|
||||
//
|
||||
this.typeNameTextBox.Location = new System.Drawing.Point(86, 44);
|
||||
this.typeNameTextBox.Name = "typeNameTextBox";
|
||||
this.typeNameTextBox.ReadOnly = true;
|
||||
this.typeNameTextBox.Size = new System.Drawing.Size(280, 20);
|
||||
this.typeNameTextBox.TabIndex = 3;
|
||||
//
|
||||
// typeParameterPropertyGrid
|
||||
//
|
||||
this.typeParameterPropertyGrid.Location = new System.Drawing.Point(6, 19);
|
||||
this.typeParameterPropertyGrid.Name = "typeParameterPropertyGrid";
|
||||
this.typeParameterPropertyGrid.Size = new System.Drawing.Size(348, 271);
|
||||
this.typeParameterPropertyGrid.TabIndex = 4;
|
||||
//
|
||||
// typeParametersGroupBox
|
||||
//
|
||||
this.typeParametersGroupBox.Controls.Add(this.typeParameterPropertyGrid);
|
||||
this.typeParametersGroupBox.Location = new System.Drawing.Point(12, 75);
|
||||
this.typeParametersGroupBox.Name = "typeParametersGroupBox";
|
||||
this.typeParametersGroupBox.Size = new System.Drawing.Size(360, 296);
|
||||
this.typeParametersGroupBox.TabIndex = 5;
|
||||
this.typeParametersGroupBox.TabStop = false;
|
||||
this.typeParametersGroupBox.Text = "Type Parameters:";
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
this.OKButton.Location = new System.Drawing.Point(207, 379);
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.OKButton.TabIndex = 6;
|
||||
this.OKButton.Text = "&OK";
|
||||
this.OKButton.UseVisualStyleBackColor = true;
|
||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(291, 379);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.cancelButton.TabIndex = 7;
|
||||
this.cancelButton.Text = "&Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// DuplicateTypeForm
|
||||
//
|
||||
this.AcceptButton = this.OKButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(383, 414);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.typeParametersGroupBox);
|
||||
this.Controls.Add(this.typeNameTextBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.familyTextBox);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "DuplicateTypeForm";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Type Properties";
|
||||
this.Load += new System.EventHandler(this.DuplicateTypeForm_Load);
|
||||
this.typeParametersGroupBox.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox familyTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox typeNameTextBox;
|
||||
private System.Windows.Forms.PropertyGrid typeParameterPropertyGrid;
|
||||
private System.Windows.Forms.GroupBox typeParametersGroupBox;
|
||||
private System.Windows.Forms.Button OKButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
/// <summary>
|
||||
/// form to duplicate FamilySymbol and edit its name and parameters
|
||||
/// </summary>
|
||||
public partial class DuplicateTypeForm : System.Windows.Forms.Form
|
||||
{
|
||||
private FamilySymbol m_copiedSymbol; // FamilySymbol object to be copied
|
||||
private FamilySymbol m_newSymbol; // duplicate FamilySymbol
|
||||
private FrameTypesMgr m_typesMgr; // object manage FamilySymbols
|
||||
|
||||
/// <summary>
|
||||
/// constructor
|
||||
/// </summary>
|
||||
/// <param name="obj">FamilySymbol object</param>
|
||||
/// <param name="typesMgr">FamilySymbols' manager</param>
|
||||
public DuplicateTypeForm(object obj, FrameTypesMgr typesMgr)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
m_copiedSymbol = obj as FamilySymbol;
|
||||
m_typesMgr = typesMgr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// hidden subclass' method;
|
||||
/// display EditTypeNameForm to get type name;
|
||||
/// then duplicate FamilySymbol
|
||||
/// </summary>
|
||||
public new DialogResult ShowDialog()
|
||||
{
|
||||
try
|
||||
{
|
||||
// generate the duplicate one's initial Name
|
||||
string initialTypeName = m_typesMgr.GenerateSymbolName(m_copiedSymbol.Name);
|
||||
// provide UI for user to edit the duplicate one's name
|
||||
using (EditTypeNameForm typeNameFrm = new EditTypeNameForm(initialTypeName))
|
||||
{
|
||||
// cancel the command of duplicate
|
||||
if (typeNameFrm.ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
return DialogResult.Cancel;
|
||||
}
|
||||
|
||||
// generate the duplicate one's Name used to create with Name edited in EditTypeNameForm
|
||||
string finalTypeName = m_typesMgr.GenerateSymbolName(typeNameFrm.TypeName);
|
||||
// duplicate FamilySymbol
|
||||
m_newSymbol = m_typesMgr.DuplicateSymbol(m_copiedSymbol, finalTypeName);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
TaskDialog.Show("Revit", "Failed to duplicate Type.");
|
||||
TaskDialog.Show("Revit", "Failed to duplicate Type.");
|
||||
return DialogResult.Abort;
|
||||
}
|
||||
return base.ShowDialog();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor without parameter is forbidden
|
||||
/// </summary>
|
||||
private DuplicateTypeForm()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// provide UI to edit is parameter
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void DuplicateTypeForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
// initialize controls
|
||||
typeNameTextBox.Text = m_newSymbol.Name;
|
||||
familyTextBox.Text = m_newSymbol.Family.Name;
|
||||
FrameTypeParameters symbolParas = FrameTypeParameters.CreateInstance(m_newSymbol);
|
||||
if (null != symbolParas)
|
||||
{
|
||||
typeParameterPropertyGrid.SelectedObject = symbolParas;
|
||||
}
|
||||
else
|
||||
{
|
||||
typeParameterPropertyGrid.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// to finish duplicate process
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// cancel the duplicate and roll back the command
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
// delete the duplicate one
|
||||
bool result = m_typesMgr.DeleteSymbol(m_newSymbol);
|
||||
if (result == false)
|
||||
{
|
||||
throw new ErrorMessageException("can not delete the new duplicate symbol");
|
||||
}
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,126 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
partial class EditTypeNameForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.typeNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.OKButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 15);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(38, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Name:";
|
||||
//
|
||||
// typeNameTextBox
|
||||
//
|
||||
this.typeNameTextBox.Location = new System.Drawing.Point(56, 12);
|
||||
this.typeNameTextBox.Name = "typeNameTextBox";
|
||||
this.typeNameTextBox.Size = new System.Drawing.Size(259, 20);
|
||||
this.typeNameTextBox.TabIndex = 1;
|
||||
//
|
||||
// OKButton
|
||||
//
|
||||
this.OKButton.Location = new System.Drawing.Point(159, 51);
|
||||
this.OKButton.Name = "OKButton";
|
||||
this.OKButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.OKButton.TabIndex = 2;
|
||||
this.OKButton.Text = "&OK";
|
||||
this.OKButton.UseVisualStyleBackColor = true;
|
||||
this.OKButton.Click += new System.EventHandler(this.OKButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(240, 51);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.cancelButton.TabIndex = 3;
|
||||
this.cancelButton.Text = "&Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// EditTypeNameForm
|
||||
//
|
||||
this.AcceptButton = this.OKButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(327, 91);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.OKButton);
|
||||
this.Controls.Add(this.typeNameTextBox);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "EditTypeNameForm";
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Name";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox typeNameTextBox;
|
||||
private System.Windows.Forms.Button OKButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
/// <summary>
|
||||
/// form to edit Type's name
|
||||
/// </summary>
|
||||
public partial class EditTypeNameForm : System.Windows.Forms.Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Type name to be edited
|
||||
/// </summary>
|
||||
public string TypeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return typeNameTextBox.Text;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor
|
||||
/// </summary>
|
||||
/// <param name="typeName">original Type name</param>
|
||||
public EditTypeNameForm(string typeName)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
typeNameTextBox.Text = typeName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor without constructor is forbidden
|
||||
/// </summary>
|
||||
private EditTypeNameForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// return with OK
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OKButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// return with Cancel
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
/// <summary>
|
||||
/// pass error message to UI or back to internal error messagebox by Execute method in IExternalCommand
|
||||
/// </summary>
|
||||
class ErrorMessageException : ApplicationException
|
||||
{
|
||||
/// <summary>
|
||||
/// constructor entirely using baseclass'
|
||||
/// </summary>
|
||||
public ErrorMessageException()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor entirely using baseclass'
|
||||
/// </summary>
|
||||
/// <param name="message">error message</param>
|
||||
public ErrorMessageException(String message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RevitAddIns>
|
||||
<AddIn Type="Command">
|
||||
<Assembly>FrameBuilder.dll</Assembly>
|
||||
<ClientId>22e12823-e4f0-4014-92f5-a9819cb22323</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.FrameBuilder.CS.Command</FullClassName>
|
||||
<Text>Frame Builder</Text>
|
||||
<Description>Add a new concrete column and beam size.</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
</RevitAddIns>
|
||||
@@ -0,0 +1,329 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
using Autodesk.Revit.ApplicationServices;
|
||||
|
||||
using ModelElement = Autodesk.Revit.DB.Element;
|
||||
|
||||
/// <summary>
|
||||
/// create columns, beams and braces to create framing
|
||||
/// </summary>
|
||||
public class FrameBuilder
|
||||
{
|
||||
FrameData m_data; // necessary data to create frame
|
||||
Autodesk.Revit.Creation.Document m_docCreator; // buffer of API object
|
||||
Autodesk.Revit.Creation.Application m_appCreator; // buffer of API object
|
||||
|
||||
/// <summary>
|
||||
/// constructor
|
||||
/// </summary>
|
||||
/// <param name="data">data necessary to initialize object</param>
|
||||
public FrameBuilder(FrameData data)
|
||||
{
|
||||
// initialize members
|
||||
if (null == data)
|
||||
{
|
||||
throw new ArgumentNullException("data",
|
||||
"constructor FrameBuilder(FrameData data)'s parameter shouldn't be null ");
|
||||
}
|
||||
m_data = data;
|
||||
|
||||
m_appCreator = data.CommandData.Application.Application.Create;
|
||||
m_docCreator = data.CommandData.Application.ActiveUIDocument.Document.Create;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// create framing according to FramingData
|
||||
/// </summary>
|
||||
/// <returns>columns, beams and braces</returns>
|
||||
public void CreateFraming()
|
||||
{
|
||||
Transaction t = new Transaction(m_data.CommandData.Application.ActiveUIDocument.Document, Guid.NewGuid().GetHashCode().ToString());
|
||||
t.Start();
|
||||
m_data.UpdateLevels();
|
||||
List<FamilyInstance> frameElems = new List<FamilyInstance>();
|
||||
Autodesk.Revit.DB.UV[,] matrixUV = CreateMatrix(m_data.XNumber, m_data.YNumber, m_data.Distance);
|
||||
|
||||
// iterate levels from lower one to higher one by one according to FloorNumber
|
||||
for (int ii = 0; ii < m_data.FloorNumber; ii++)
|
||||
{
|
||||
Level baseLevel = m_data.Levels.Values[ii];
|
||||
Level topLevel = m_data.Levels.Values[ii + 1];
|
||||
|
||||
int matrixXSize = matrixUV.GetLength(0); //length of matrix's x range
|
||||
int matrixYSize = matrixUV.GetLength(1); //length of matrix's y range
|
||||
|
||||
// insert columns in an array format according to the calculated matrix
|
||||
foreach (Autodesk.Revit.DB.UV point2D in matrixUV)
|
||||
{
|
||||
frameElems.Add(NewColumn(point2D, baseLevel, topLevel));
|
||||
}
|
||||
|
||||
// insert beams between the tops of each adjacent column in the X and Y direction
|
||||
for (int j = 0; j < matrixYSize; j++)
|
||||
{
|
||||
for (int i = 0; i < matrixXSize; i++)
|
||||
{
|
||||
//create beams in x direction
|
||||
if (i != (matrixXSize - 1))
|
||||
{
|
||||
frameElems.Add(NewBeam(matrixUV[i, j], matrixUV[i + 1, j], topLevel));
|
||||
}
|
||||
//create beams in y direction
|
||||
if (j != (matrixYSize - 1))
|
||||
{
|
||||
frameElems.Add(NewBeam(matrixUV[i, j], matrixUV[i, j + 1], topLevel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// insert braces between the mid point of each column
|
||||
// and the mid point of each adjoining beam
|
||||
for (int j = 0; j < matrixYSize; j++)
|
||||
{
|
||||
for (int i = 0; i < matrixXSize; i++)
|
||||
{
|
||||
//create braces in x direction
|
||||
if (i != (matrixXSize - 1))
|
||||
{
|
||||
frameElems.AddRange(
|
||||
NewBraces(matrixUV[i, j], matrixUV[i + 1, j], baseLevel, topLevel));
|
||||
}
|
||||
//create braces in y direction
|
||||
if (j != (matrixYSize - 1))
|
||||
{
|
||||
frameElems.AddRange(
|
||||
NewBraces(matrixUV[i, j], matrixUV[i, j + 1], baseLevel, topLevel));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoveRotateFrame(frameElems);
|
||||
t.Commit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor without parameter is forbidden
|
||||
/// </summary>
|
||||
private FrameBuilder()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// create a 2D matrix of coordinates to form an array format
|
||||
/// </summary>
|
||||
/// <param name="xNumber">number of Columns in the X direction</param>
|
||||
/// <param name="yNumber">number of Columns in the Y direction</param>
|
||||
/// <param name="distance">distance between columns</param>
|
||||
private static Autodesk.Revit.DB.UV[,] CreateMatrix(int xNumber, int yNumber, double distance)
|
||||
{
|
||||
Autodesk.Revit.DB.UV[,] result = new Autodesk.Revit.DB.UV[xNumber, yNumber];
|
||||
|
||||
for (int i = 0; i < xNumber; i++)
|
||||
{
|
||||
for (int j = 0; j < yNumber; j++)
|
||||
{
|
||||
result[i, j] = new Autodesk.Revit.DB.UV(i * distance, j * distance);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// create column of certain type in given position
|
||||
/// </summary>
|
||||
/// <param name="point2D">2D coordinate of the column</param>
|
||||
/// <param name="columnType">specified type of the column</param>
|
||||
/// <param name="baseLevel">base level of the column</param>
|
||||
/// <param name="topLevel">top level of the colunm</param>
|
||||
private FamilyInstance NewColumn(Autodesk.Revit.DB.UV point2D, Level baseLevel, Level topLevel)
|
||||
{
|
||||
//create column of specified type with certain level and start point
|
||||
Autodesk.Revit.DB.XYZ point = new Autodesk.Revit.DB.XYZ(point2D.U, point2D.V, 0);
|
||||
|
||||
if (!m_data.ColumnSymbol.IsActive)
|
||||
m_data.ColumnSymbol.Activate();
|
||||
FamilyInstance column =
|
||||
m_docCreator.NewFamilyInstance(point, m_data.ColumnSymbol, baseLevel, StructuralType.Column);
|
||||
|
||||
//set baselevel & toplevel of the column
|
||||
SetParameter(column, BuiltInParameter.FAMILY_TOP_LEVEL_PARAM, topLevel.Id);
|
||||
SetParameter(column, BuiltInParameter.FAMILY_BASE_LEVEL_PARAM, baseLevel.Id);
|
||||
SetParameter(column, BuiltInParameter.FAMILY_TOP_LEVEL_OFFSET_PARAM, 0.0);
|
||||
SetParameter(column, BuiltInParameter.FAMILY_BASE_LEVEL_OFFSET_PARAM, 0.0);
|
||||
return column;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// create beam of certain type in given position
|
||||
/// </summary>
|
||||
/// <param name="point2D1">first point of the location line in 2D</param>
|
||||
/// <param name="point2D2">second point of the location line in 2D</param>
|
||||
/// <param name="baseLevel">base level of the beam</param>
|
||||
/// <param name="topLevel">top level of the beam</param>
|
||||
/// <returns>nothing</returns>
|
||||
private FamilyInstance NewBeam(Autodesk.Revit.DB.UV point2D1, Autodesk.Revit.DB.UV point2D2, Level topLevel)
|
||||
{
|
||||
// calculate the start point and end point of Beam's location line in 3D
|
||||
double height = topLevel.Elevation;
|
||||
Autodesk.Revit.DB.XYZ startPoint = new Autodesk.Revit.DB.XYZ(point2D1.U, point2D1.V, height);
|
||||
Autodesk.Revit.DB.XYZ endPoint = new Autodesk.Revit.DB.XYZ(point2D2.U, point2D2.V, height);
|
||||
// create Beam and set its location
|
||||
Line baseLine = Line.CreateBound(startPoint, endPoint);
|
||||
if (!m_data.BeamSymbol.IsActive)
|
||||
m_data.BeamSymbol.Activate();
|
||||
FamilyInstance beam =
|
||||
m_docCreator.NewFamilyInstance(baseLine, m_data.BeamSymbol, topLevel, StructuralType.Beam);
|
||||
return beam;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// create 2 braces between the mid point of 2 column and the mid point of adjoining beam
|
||||
/// </summary>
|
||||
/// <param name="point2D1">first point of the location line in 2D</param>
|
||||
/// <param name="point2D2">second point of the location line in 2D</param>
|
||||
/// <param name="baseLevel">the base level of the brace</param>
|
||||
/// <param name="topLevel">the top level of the brace</param>
|
||||
private List<FamilyInstance> NewBraces(Autodesk.Revit.DB.UV point2D1, Autodesk.Revit.DB.UV point2D2, Level baseLevel, Level topLevel)
|
||||
{
|
||||
// calculate the start point and end point of the location lines of two braces
|
||||
double topHeight = topLevel.Elevation;
|
||||
double baseHeight = baseLevel.Elevation;
|
||||
double middleElevation = (topHeight + baseHeight) / 2;
|
||||
Autodesk.Revit.DB.XYZ startPoint = new Autodesk.Revit.DB.XYZ(point2D1.U, point2D1.V, middleElevation);
|
||||
Autodesk.Revit.DB.XYZ endPoint = new Autodesk.Revit.DB.XYZ(point2D2.U, point2D2.V, middleElevation);
|
||||
Autodesk.Revit.DB.XYZ middlePoint = new Autodesk.Revit.DB.XYZ((point2D1.U + point2D2.U) / 2, (point2D1.V + point2D2.V) / 2, topHeight);
|
||||
|
||||
Autodesk.Revit.DB.ElementId levelId = topLevel.Id;
|
||||
// create two brace; then set their location line and reference level
|
||||
Line firstBaseLine = Line.CreateBound(startPoint, middlePoint);
|
||||
if (!m_data.BraceSymbol.IsActive)
|
||||
m_data.BraceSymbol.Activate();
|
||||
FamilyInstance firstBrace =
|
||||
m_docCreator.NewFamilyInstance(firstBaseLine, m_data.BraceSymbol, topLevel, StructuralType.Brace);
|
||||
|
||||
Line secondBaseLine = Line.CreateBound(endPoint, middlePoint);
|
||||
FamilyInstance secondBrace =
|
||||
m_docCreator.NewFamilyInstance(secondBaseLine, m_data.BraceSymbol, topLevel, StructuralType.Brace);
|
||||
List<FamilyInstance> result = new List<FamilyInstance>();
|
||||
result.Add(firstBrace);
|
||||
result.Add(secondBrace);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// set parameter whose storage type is Autodesk.Revit.DB.ElementId
|
||||
/// </summary>
|
||||
/// <param name="elem">Element has parameter</param>
|
||||
/// <param name="builtInPara">BuiltInParameter to find parameter</param>
|
||||
/// <param name="value">value to set</param>
|
||||
/// <returns>is successful</returns>
|
||||
private bool SetParameter(ModelElement elem,
|
||||
BuiltInParameter builtInPara, Autodesk.Revit.DB.ElementId value)
|
||||
{
|
||||
Parameter para = elem.get_Parameter(builtInPara);
|
||||
if (null != para && para.StorageType == StorageType.ElementId && !para.IsReadOnly)
|
||||
{
|
||||
var result = para.Set(value);
|
||||
return result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// set parameter whose storage type is double
|
||||
/// </summary>
|
||||
/// <param name="elem">Element has parameter</param>
|
||||
/// <param name="builtInPara">BuiltInParameter to find parameter</param>
|
||||
/// <param name="value">value to set</param>
|
||||
/// <returns>is successful</returns>
|
||||
private bool SetParameter(ModelElement elem,
|
||||
BuiltInParameter builtInPara, double value)
|
||||
{
|
||||
Parameter para = elem.get_Parameter(builtInPara);
|
||||
if (null != para && para.StorageType == StorageType.Double && !para.IsReadOnly)
|
||||
{
|
||||
var result = para.Set(value);
|
||||
return result;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// move and rotate the Frame
|
||||
/// </summary>
|
||||
/// <param name="frameElems">columns, beams and braces included in frame</param>
|
||||
private void MoveRotateFrame(List<FamilyInstance> frameElems)
|
||||
{
|
||||
Application app = m_data.CommandData.Application.Application;
|
||||
Document doc = m_data.CommandData.Application.ActiveUIDocument.Document;
|
||||
foreach (FamilyInstance elem in frameElems)
|
||||
{
|
||||
MoveElement(doc, elem, m_data.FrameOrigin);
|
||||
RotateElement(m_data.CommandData.Application, elem, m_data.FrameOrigin, m_data.FrameOriginAngle);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// move an element in horizontal plane
|
||||
/// </summary>
|
||||
/// <param name="elem">element to be moved</param>
|
||||
/// <param name="translation2D">the 2D vector by which the element is to be moved</param>
|
||||
/// <returns>is successful</returns>
|
||||
private void MoveElement(Document doc, Autodesk.Revit.DB.Element elem, Autodesk.Revit.DB.UV translation2D)
|
||||
{
|
||||
Autodesk.Revit.DB.XYZ translation3D = new Autodesk.Revit.DB.XYZ(translation2D.U, translation2D.V, 0.0);
|
||||
ElementTransformUtils.MoveElement(doc, elem.Id, translation3D);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// rotate an element a specified number of degrees
|
||||
/// around a given center in horizontal plane
|
||||
/// </summary>
|
||||
/// <param name="elem">element to be rotated</param>
|
||||
/// <param name="center">the center of rotation</param>
|
||||
/// <param name="angle">the number of degrees, in radians,
|
||||
/// by which the element is to be rotated around the specified axis</param>
|
||||
/// <returns>is successful</returns>
|
||||
private void RotateElement(UIApplication app, Autodesk.Revit.DB.Element elem, Autodesk.Revit.DB.UV center, double angle)
|
||||
{
|
||||
Autodesk.Revit.DB.XYZ axisPnt1 = new Autodesk.Revit.DB.XYZ(center.U, center.V, 0.0);
|
||||
Autodesk.Revit.DB.XYZ axisPnt2 = new Autodesk.Revit.DB.XYZ(center.U, center.V, 1.0);
|
||||
Line axis = Line.CreateBound(axisPnt1, axisPnt2);
|
||||
//axis.
|
||||
ElementTransformUtils.RotateElement(elem.Document, elem.Id, axis, angle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FCA4DD1E-1C51-4B45-B0E1-95FEFC077548}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Revit.SDK.Samples.FrameBuilder.CS</RootNamespace>
|
||||
<AssemblyName>FrameBuilder</AssemblyName>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<CodeAnalysisRules>
|
||||
</CodeAnalysisRules>
|
||||
<CodeAnalysisRuleSet>Migrated rules for FrameBuilder.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</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>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>Migrated rules for FrameBuilder.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Command.cs" />
|
||||
<Compile Include="CreateFrameForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CreateFrameForm.Designer.cs">
|
||||
<DependentUpon>CreateFrameForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditTypeNameForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="EditTypeNameForm.Designer.cs">
|
||||
<DependentUpon>EditTypeNameForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DuplicateTypeForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DuplicateTypeForm.Designer.cs">
|
||||
<DependentUpon>DuplicateTypeForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ErrorMessageException.cs" />
|
||||
<Compile Include="FrameBuilder.cs" />
|
||||
<Compile Include="FrameData.cs" />
|
||||
<Compile Include="FrameTypeParameters.cs" />
|
||||
<Compile Include="FrameTypesMgr.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="CreateFrameForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>CreateFrameForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="EditTypeNameForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>EditTypeNameForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DuplicateTypeForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>DuplicateTypeForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Migrated rules for FrameBuilder.ruleset" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(SolutionDir)VSProps\SDKSamples.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
|
||||
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,536 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.ApplicationServices;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using UV = Autodesk.Revit.DB.UV;
|
||||
|
||||
/// <summary>
|
||||
/// data class contains information to create framing
|
||||
/// </summary>
|
||||
public class FrameData
|
||||
{
|
||||
const int XNumberMaxValue = 50; // maximum number of Columns in the X Direction
|
||||
const int XNumberMinValue = 2; // minimum number of Columns in the X Direction
|
||||
const int XNumberDefault = 3; // default number of Columns in the X Direction
|
||||
const int YNumberMaxValue = 50; // maximum number of Columns in the Y Direction
|
||||
const int YNumberMinValue = 2; // minimum number of Columns in the Y Direction
|
||||
const int YNumberDefault = 3; // default number of Columns in the Y Direction
|
||||
const int TotalMaxValue = 200; // maximum total number of Columns to create
|
||||
const int FloorNumberMinValue = 1; // minimum number of floors
|
||||
const int FloorNumberMaxValue = 200; // maximum number of floors
|
||||
const double DistanceMaxValue = 3000; // maxinum distance between 2 adjoining columns
|
||||
const double DistanceMinValue = 1; // mininum distance between 2 adjoining columns
|
||||
const double DistanceDefault = 5; // default distance between 2 adjoining columns
|
||||
const double LevelHeightMaxValue = 100; // maximum height between 2 new levels
|
||||
const double LevelHeightMinValue = 1; // minimum height between 2 new levels
|
||||
const int DigitPrecision = 4; // the number of significant digits(precision)
|
||||
|
||||
int m_xNumber = XNumberDefault; // number of Columns in the X Direction
|
||||
int m_yNumber = XNumberDefault; // number of Columns in the Y Direction
|
||||
double m_distance = DistanceDefault; // distance between 2 adjoining columns
|
||||
int m_floorNumber; // number of floors
|
||||
double m_levelHeight; // increaced height of autogenerated levels
|
||||
Autodesk.Revit.DB.UV m_frameOrigin = new Autodesk.Revit.DB.UV(0.0, 0.0); // bottom left point of the frame
|
||||
double m_frameOriginAngle = 0.0; // the angle to rotate around bottom left point
|
||||
int m_originalLevelSize; // the number of levels before invoke external command
|
||||
|
||||
FamilySymbol m_columnSymbol; // column's type
|
||||
FamilySymbol m_beamSymbol; // beam's type
|
||||
FamilySymbol m_braceSymbol; // brace's type
|
||||
|
||||
ExternalCommandData m_commandData;
|
||||
FrameTypesMgr m_columnSymbolsMgr; // object manage all column types
|
||||
FrameTypesMgr m_beambracesSymbolsMgr; // object manage all beam types
|
||||
SortedList<double, Level> m_levels; // list of all levels in the order of Elevation
|
||||
|
||||
/// <summary>
|
||||
/// command data pass from entry point
|
||||
/// </summary>
|
||||
public ExternalCommandData CommandData
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_commandData;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// object manage all column types
|
||||
/// </summary>
|
||||
public FrameTypesMgr ColumnSymbolsMgr
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_columnSymbolsMgr;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// object manage all beam types
|
||||
/// </summary>
|
||||
public FrameTypesMgr BeamSymbolsMgr
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_beambracesSymbolsMgr;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// object manage all brace types
|
||||
/// </summary>
|
||||
public FrameTypesMgr BraceSymbolsMgr
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_beambracesSymbolsMgr;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// number of Columns in the Y Direction
|
||||
/// </summary>
|
||||
public int YNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_yNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < YNumberMinValue || value > YNumberMaxValue)
|
||||
{
|
||||
string message = "Number of Columns in the Y Direction should no less than "
|
||||
+ YNumberMinValue.ToString() + " and no more than "
|
||||
+ YNumberMaxValue.ToString();
|
||||
throw new ErrorMessageException(message);
|
||||
}
|
||||
CheckTotalNumber(value * XNumber * (m_floorNumber - 1));
|
||||
m_yNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// number of Columns in the X Direction
|
||||
/// </summary>
|
||||
public int XNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_xNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < XNumberMinValue || value > XNumberMaxValue)
|
||||
{
|
||||
string message = "Number of Columns in the X Direction should no less than "
|
||||
+ XNumberMinValue.ToString() + " and no more than "
|
||||
+ XNumberMaxValue.ToString();
|
||||
throw new ErrorMessageException(message);
|
||||
}
|
||||
CheckTotalNumber(value * YNumber * (m_floorNumber - 1));
|
||||
m_xNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// distance between 2 adjoining columns
|
||||
/// </summary>
|
||||
public double Distance
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_distance;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < DistanceMinValue || value > DistanceMaxValue)
|
||||
{
|
||||
string message = "The distance between columns shoule no less than "
|
||||
+ DistanceMinValue.ToString() + "and no more than "
|
||||
+ DistanceMaxValue.ToString();
|
||||
throw new ErrorMessageException(message);
|
||||
}
|
||||
m_distance = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// number of floors
|
||||
/// </summary>
|
||||
public int FloorNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_floorNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < FloorNumberMinValue || value > FloorNumberMaxValue)
|
||||
{
|
||||
string message = "Number of floors should no less than "
|
||||
+ FloorNumberMinValue.ToString() + " and no more than "
|
||||
+ FloorNumberMaxValue.ToString();
|
||||
throw new ErrorMessageException(message);
|
||||
}
|
||||
CheckTotalNumber(XNumber * YNumber * (value - 1));
|
||||
m_floorNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// increased height of autogenerated levels
|
||||
/// </summary>
|
||||
public double LevelHeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return Math.Round(m_levelHeight, DigitPrecision);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < LevelHeightMinValue || value > LevelHeightMaxValue)
|
||||
{
|
||||
string message = "The distance between columns shoule no less than "
|
||||
+ LevelHeightMinValue.ToString() + "and no more than "
|
||||
+ LevelHeightMaxValue.ToString();
|
||||
throw new ErrorMessageException(message);
|
||||
}
|
||||
m_distance = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// bottom left point of the frame
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.UV FrameOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_frameOrigin;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_frameOrigin = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the angle to rotate around bottom left point
|
||||
/// </summary>
|
||||
public double FrameOriginAngle
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_frameOriginAngle;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_frameOriginAngle = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// column's type
|
||||
/// </summary>
|
||||
public FamilySymbol ColumnSymbol
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_columnSymbol;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beam's type
|
||||
/// </summary>
|
||||
public FamilySymbol BeamSymbol
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_beamSymbol;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// brace's type
|
||||
/// </summary>
|
||||
public FamilySymbol BraceSymbol
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_braceSymbol;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// list of all levels in the ordr of Elevation
|
||||
/// </summary>
|
||||
public SortedList<double, Level> Levels
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_levels;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the number of levels before invoke external command
|
||||
/// </summary>
|
||||
public int OriginalLevelSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_originalLevelSize;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// create FramingData object. applicationException will throw out,
|
||||
/// if current Revit document doesn't satisfy the condition to create framing
|
||||
/// </summary>
|
||||
/// <param name="commandData"></param>
|
||||
/// <returns></returns>
|
||||
public static FrameData CreateInstance(ExternalCommandData commandData)
|
||||
{
|
||||
FrameData data = new FrameData(commandData);
|
||||
data.Initialize();
|
||||
data.Validate();
|
||||
|
||||
// initialize members after checking precondition
|
||||
data.m_floorNumber = (data.m_levels.Count - 1) > 0 ? (data.m_levels.Count - 1) : 1;
|
||||
data.m_columnSymbol = data.m_columnSymbolsMgr.FramingSymbols[0];
|
||||
data.m_beamSymbol = data.m_beambracesSymbolsMgr.FramingSymbols[0];
|
||||
data.m_braceSymbol = data.m_beambracesSymbolsMgr.FramingSymbols[0];
|
||||
data.m_levelHeight = data.m_levels.Values[data.m_levels.Count - 1].Elevation
|
||||
- data.m_levels.Values[data.m_levels.Count - 2].Elevation;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// cast object to FamilySymbol and set as column's type
|
||||
/// </summary>
|
||||
/// <param name="obj">FamilySymbol object</param>
|
||||
/// <returns>failed to cast and set</returns>
|
||||
public bool SetColumnSymbol(object obj)
|
||||
{
|
||||
FamilySymbol symbol = obj as FamilySymbol;
|
||||
if (null == symbol)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_columnSymbol = symbol;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// cast object to FamilySymbol and set as beam's type
|
||||
/// </summary>
|
||||
/// <param name="obj">FamilySymbol object</param>
|
||||
/// <returns>failed to cast and set</returns>
|
||||
public bool SetBeamSymbol(object obj)
|
||||
{
|
||||
FamilySymbol symbol = obj as FamilySymbol;
|
||||
if (null == symbol)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_beamSymbol = symbol;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// cast object to FamilySymbol and set as brace's type
|
||||
/// </summary>
|
||||
/// <param name="obj">FamilySymbol object</param>
|
||||
/// <returns>failed to cast and set</returns>
|
||||
public bool SetBraceSymbol(object obj)
|
||||
{
|
||||
FamilySymbol symbol = obj as FamilySymbol;
|
||||
if (null == symbol)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_braceSymbol = symbol;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// add more levels so that level number can meet floor number
|
||||
/// </summary>
|
||||
public void UpdateLevels()
|
||||
{
|
||||
double baseElevation = m_levels.Values[m_levels.Count - 1].Elevation;
|
||||
Autodesk.Revit.Creation.Document createDoc = m_commandData.Application.ActiveUIDocument.Document.Create;
|
||||
Autodesk.Revit.DB.Document m_Doc = m_commandData.Application.ActiveUIDocument.Document;
|
||||
|
||||
FilteredElementCollector collector = new FilteredElementCollector(m_Doc);
|
||||
IList<Element> viewFamilyTypes = collector.OfClass(typeof(ViewFamilyType)).ToElements();
|
||||
ElementId floorPlanId = new ElementId(-1);
|
||||
foreach (Element e in viewFamilyTypes)
|
||||
{
|
||||
ViewFamilyType v = e as ViewFamilyType;
|
||||
|
||||
if (v != null && v.ViewFamily == ViewFamily.FloorPlan)
|
||||
{
|
||||
floorPlanId = e.Id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int newLevelSize = (m_floorNumber + 1) - m_levels.Count;
|
||||
if (newLevelSize == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (int ii = 0; ii < newLevelSize; ii++)
|
||||
{
|
||||
double elevation = baseElevation + m_levelHeight * (ii + 1);
|
||||
Level newLevel = Level.Create(m_commandData.Application.ActiveUIDocument.Document, elevation);
|
||||
//createDoc.NewViewPlan(newLevel.Name, newLevel, Autodesk.Revit.DB.ViewPlanType.FloorPlan);
|
||||
ViewPlan viewPlan = ViewPlan.Create(m_Doc, floorPlanId, newLevel.Id);
|
||||
viewPlan.Name = newLevel.Name;
|
||||
m_levels.Add(elevation, newLevel);
|
||||
}
|
||||
m_originalLevelSize = m_levels.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// it is only used for object factory method
|
||||
/// </summary>
|
||||
/// <param name="commandData"></param>
|
||||
private FrameData(ExternalCommandData commandData)
|
||||
{
|
||||
// initialize members
|
||||
m_commandData = commandData;
|
||||
m_columnSymbolsMgr = new FrameTypesMgr(commandData);
|
||||
m_beambracesSymbolsMgr = new FrameTypesMgr(commandData);
|
||||
m_levels = new SortedList<double, Level>();
|
||||
m_originalLevelSize = m_levels.Count;
|
||||
m_yNumber = YNumberDefault;
|
||||
m_xNumber = XNumberDefault;
|
||||
m_distance = DistanceDefault;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// check the total number of columns to create less than certain value
|
||||
/// </summary>
|
||||
/// <param name="number"></param>
|
||||
/// <returns></returns>
|
||||
private static void CheckTotalNumber(int number)
|
||||
{
|
||||
if (number > TotalMaxValue)
|
||||
{
|
||||
string message = "The total number of columns should less than "
|
||||
+ TotalMaxValue.ToString();
|
||||
throw new ErrorMessageException(message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// initialize list of column, beam and brace's type;
|
||||
/// initialize list of level
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
Application app = m_commandData.Application.Application;
|
||||
Document doc = m_commandData.Application.ActiveUIDocument.Document;
|
||||
|
||||
FilteredElementCollector collector1 = new FilteredElementCollector(doc);
|
||||
IList<Autodesk.Revit.DB.Element> a1 = collector1.OfClass(typeof(Level)).ToElements();
|
||||
|
||||
foreach (Level lev in a1)
|
||||
{
|
||||
m_levels.Add(lev.Elevation, lev);
|
||||
}
|
||||
|
||||
a1.Clear();
|
||||
|
||||
Categories categories = doc.Settings.Categories;
|
||||
BuiltInCategory bipColumn = BuiltInCategory.OST_StructuralColumns;
|
||||
BuiltInCategory bipFraming = BuiltInCategory.OST_StructuralFraming;
|
||||
Autodesk.Revit.DB.ElementId idColumn = categories.get_Item(bipColumn).Id;
|
||||
Autodesk.Revit.DB.ElementId idFraming = categories.get_Item(bipFraming).Id;
|
||||
|
||||
ElementCategoryFilter filterColumn = new ElementCategoryFilter(bipColumn);
|
||||
ElementCategoryFilter filterFraming = new ElementCategoryFilter(bipFraming);
|
||||
LogicalOrFilter orFilter = new LogicalOrFilter(filterColumn, filterFraming);
|
||||
|
||||
ElementClassFilter filterSymbol = new ElementClassFilter(typeof(FamilySymbol));
|
||||
LogicalAndFilter andFilter = new LogicalAndFilter(orFilter, filterSymbol);
|
||||
//
|
||||
// without filtering for the structural categories,
|
||||
// our sample project was returning over 500 family symbols;
|
||||
// adding the category filters reduced this number to 40:
|
||||
//
|
||||
FilteredElementCollector collector2 = new FilteredElementCollector(doc);
|
||||
IList<Element> a2 = collector2.WherePasses(andFilter).ToElements();
|
||||
|
||||
foreach (FamilySymbol symbol in a2)
|
||||
{
|
||||
Autodesk.Revit.DB.ElementId categoryId = symbol.Category.Id;
|
||||
|
||||
if (idFraming.Equals(categoryId))
|
||||
{
|
||||
m_beambracesSymbolsMgr.AddSymbol(symbol);
|
||||
}
|
||||
else if (idColumn.Equals(categoryId))
|
||||
{
|
||||
m_columnSymbolsMgr.AddSymbol(symbol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// validate the precondition to create framing
|
||||
/// </summary>
|
||||
private void Validate()
|
||||
{
|
||||
// level shouldn't less than 2
|
||||
if (m_levels.Count < 2)
|
||||
{
|
||||
throw new ErrorMessageException("The level's number in active document is less than 2.");
|
||||
}
|
||||
// no Structural Column family is loaded in current document
|
||||
if (m_columnSymbolsMgr.Size == 0)
|
||||
{
|
||||
throw new ErrorMessageException("No Structural Column family is loaded in current project.");
|
||||
}
|
||||
// no Structural Beam family is loaded in current document
|
||||
if (m_beambracesSymbolsMgr.Size == 0)
|
||||
{
|
||||
throw new ErrorMessageException("No Structural Beam family is loaded in current project.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
/// <summary>
|
||||
/// for control PropertyGrid to show and modify parameters of column, beam or brace
|
||||
/// </summary>
|
||||
public class FrameTypeParameters
|
||||
{
|
||||
Parameter m_hDimension; // parameter named h
|
||||
Parameter m_bDimension; // parameter named b
|
||||
|
||||
/// <summary>
|
||||
/// parameter h in parameter category Dimension
|
||||
/// </summary>
|
||||
[CategoryAttribute("Dimensions")]
|
||||
public double h
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_hDimension.AsDouble();
|
||||
}
|
||||
set
|
||||
{
|
||||
m_hDimension.Set(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// parameter b in parameter category Dimension
|
||||
/// </summary>
|
||||
[CategoryAttribute("Dimensions")]
|
||||
public double b
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bDimension.AsDouble();
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bDimension.Set(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor without parameter is forbidden
|
||||
/// </summary>
|
||||
private FrameTypeParameters()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor used only for object factory
|
||||
/// </summary>
|
||||
/// <param name="symbol">FamilySymbol object has parameters</param>
|
||||
private FrameTypeParameters(FamilySymbol symbol)
|
||||
{
|
||||
// iterate and initialize parameters
|
||||
foreach (Parameter para in symbol.Parameters)
|
||||
{
|
||||
if (para.Definition.Name == "h")
|
||||
{
|
||||
m_hDimension = para;
|
||||
continue;
|
||||
}
|
||||
if (para.Definition.Name == "b")
|
||||
{
|
||||
m_bDimension = para;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// object factory to create FramingTypeParameters;
|
||||
/// will return null if necessary Parameters can't be found
|
||||
/// </summary>
|
||||
/// <param name="symbol"></param>
|
||||
/// <returns></returns>
|
||||
public static FrameTypeParameters CreateInstance(FamilySymbol symbol)
|
||||
{
|
||||
FrameTypeParameters result = new FrameTypeParameters(symbol);
|
||||
if (null == result.m_bDimension || null == result.m_hDimension)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.FrameBuilder.CS
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
/// <summary>
|
||||
/// data manager take charge of FamilySymbol object in current document
|
||||
/// </summary>
|
||||
public class FrameTypesMgr
|
||||
{
|
||||
// map list pairs FamilySymbol object and its Name
|
||||
private Dictionary<String, FamilySymbol> m_symbolMaps;
|
||||
// list of FamilySymbol objects
|
||||
private List<FamilySymbol> m_symbols;
|
||||
private ExternalCommandData m_commandData;
|
||||
|
||||
/// <summary>
|
||||
/// command data pass from entry point
|
||||
/// </summary>
|
||||
public ExternalCommandData CommandData
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_commandData;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// size of FamilySymbol objects in current Revit document
|
||||
/// </summary>
|
||||
public int Size
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_symbolMaps.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor
|
||||
/// </summary>
|
||||
/// <param name="commandData"></param>
|
||||
public FrameTypesMgr(ExternalCommandData commandData)
|
||||
{
|
||||
m_commandData = commandData;
|
||||
m_symbolMaps = new Dictionary<String, FamilySymbol>();
|
||||
m_symbols = new List<FamilySymbol>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor without parameters is forbidden
|
||||
/// </summary>
|
||||
private FrameTypesMgr()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// get list of FamilySymbol objects in current Revit document
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<FamilySymbol> FramingSymbols
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ReadOnlyCollection<FamilySymbol>(m_symbols);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// add one FamilySymbol object to the lists
|
||||
/// </summary>
|
||||
/// <param name="framingSymbol"></param>
|
||||
/// <returns></returns>
|
||||
public bool AddSymbol(Autodesk.Revit.DB.FamilySymbol framingSymbol)
|
||||
{
|
||||
if (ContainsSymbolName(framingSymbol.Name))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_symbolMaps.Add(framingSymbol.Name, framingSymbol);
|
||||
m_symbols.Add(framingSymbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// delete one FamilySymbol both in Revit and lists here
|
||||
/// </summary>
|
||||
/// <param name="symbol">FamilySymbol to be deleted</param>
|
||||
/// <returns>successful to delete</returns>
|
||||
public bool DeleteSymbol(FamilySymbol symbol)
|
||||
{
|
||||
try
|
||||
{
|
||||
// remove from the lists
|
||||
m_symbolMaps.Remove(symbol.Name);
|
||||
m_symbols.Remove(symbol);
|
||||
// delete from Revit
|
||||
List<ElementId> ids = m_commandData.Application.ActiveUIDocument.Document.Delete(symbol.Id) as List<ElementId>;
|
||||
if (ids.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// duplicate one FamilySymbol and add to lists
|
||||
/// </summary>
|
||||
/// <param name="framingSymbol">FamilySymbol to be copied</param>
|
||||
/// <param name="symbolName">duplicate FamilySymbol's Name</param>
|
||||
/// <returns>new FamilySymbol</returns>
|
||||
public FamilySymbol DuplicateSymbol(ElementType framingSymbol, string symbolName)
|
||||
{
|
||||
// duplicate a FamilySymbol
|
||||
ElementType symbol = framingSymbol.Duplicate(GenerateSymbolName(symbolName));
|
||||
FamilySymbol result = symbol as FamilySymbol;
|
||||
if (null != result)
|
||||
{
|
||||
// add to lists
|
||||
m_symbolMaps.Add(result.Name, result);
|
||||
m_symbols.Add(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// inquire whether the FamilySymbol's Name already exists in the list
|
||||
/// </summary>
|
||||
/// <param name="symbolName"></param>
|
||||
/// <returns></returns>
|
||||
public bool ContainsSymbolName(string symbolName)
|
||||
{
|
||||
return m_symbolMaps.ContainsKey(symbolName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// generate a new FamilySymbol's Name according to given name
|
||||
/// </summary>
|
||||
/// <param name="symbolName">original name</param>
|
||||
/// <returns>generated name</returns>
|
||||
public string GenerateSymbolName(string symbolName)
|
||||
{
|
||||
int suffix = 2;
|
||||
string result = symbolName;
|
||||
while (ContainsSymbolName(result))
|
||||
{
|
||||
result = symbolName + " " + suffix.ToString();
|
||||
suffix++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted,
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("FrameBuilder")]
|
||||
[assembly: AssemblyDescription("Revit API Usage Sample")]
|
||||
[assembly: AssemblyConfiguration("debug")]
|
||||
[assembly: AssemblyCompany("Autodesk, Inc")]
|
||||
[assembly: AssemblyProduct("FrameBuilder")]
|
||||
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("en-US")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("12cf9157-8714-4bcb-bd37-8b8bc7295dca")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,260 @@
|
||||
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe2052\themelang1033\themelangfe2052\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
|
||||
{\f13\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'cb\'ce\'cc\'e5};}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}
|
||||
{\f39\fbidi \fnil\fcharset134\fprq1{\*\panose 00000000000000000000}Fixedsys{\*\falt Arial Unicode MS};}{\f75\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@SimSun;}
|
||||
{\f183\fbidi \fnil\fcharset134\fprq1{\*\panose 00000000000000000000}@Fixedsys;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\fdbmajor\f31501\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'cb\'ce\'cc\'e5};}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
|
||||
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\fdbminor\f31505\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'cb\'ce\'cc\'e5};}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
|
||||
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f184\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f185\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\f187\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f188\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f189\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f190\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\f191\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f192\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f194\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f195\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
|
||||
{\f197\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f198\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f199\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f200\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
|
||||
{\f201\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f202\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f316\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt \'cb\'ce\'cc\'e5};}{\f524\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}
|
||||
{\f525\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f527\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f528\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f531\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}
|
||||
{\f936\fbidi \fnil\fcharset0\fprq2 @SimSun Western;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||
{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
|
||||
{\fdbmajor\f31520\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt \'cb\'ce\'cc\'e5};}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}
|
||||
{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}
|
||||
{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||
{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
||||
{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||
{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||
{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31560\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt \'cb\'ce\'cc\'e5};}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}
|
||||
{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
|
||||
{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||
{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
|
||||
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
|
||||
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap
|
||||
\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs20\alang1025 \ltrch\fcs0
|
||||
\fs20\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
|
||||
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
|
||||
\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs20\alang1025 \ltrch\fcs0 \fs20\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052
|
||||
\snext11 \ssemihidden \sunhideused \sqformat Normal Table;}}{\*\rsidtbl \rsid5725219\rsid6693393\rsid10888779\rsid13400717\rsid15612865}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0
|
||||
\mnaryLim1}{\info{\operator Carl Zhang}{\creatim\yr2010\mo3\dy4\hr16\min53}{\revtim\yr2010\mo3\dy4\hr16\min55}{\version1}{\edmins1}{\nofpages2}{\nofwords695}{\nofchars3555}{\nofcharsws4242}{\vern32771}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/of
|
||||
fice/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
|
||||
\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701
|
||||
\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot15612865 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2
|
||||
\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6
|
||||
\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
|
||||
{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs20\alang1025 \ltrch\fcs0 \fs20\lang1033\langfe2052\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {
|
||||
\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 FrameBuilder\line }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219
|
||||
\hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1
|
||||
\af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 2011.0\line }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219
|
||||
\hich\af1\dbch\af31505\loch\f1 9.1\line }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1
|
||||
\ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Medium\line }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219
|
||||
\hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Structure\line }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1
|
||||
\ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219
|
||||
\hich\af1\dbch\af31505\loch\f1 Create a frame composed of columns, beams and braces.\line }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219
|
||||
\hich\af1\dbch\af31505\loch\f1 \line Thi\hich\af1\dbch\af31505\loch\f1
|
||||
s sample demonstrates how to create a frame composed of columns, beams and braces. User can input parameters to create a frame consist of column, beam and brace. It has a user visible option to use the suspended updating function to increase the speed of
|
||||
\hich\af1\dbch\af31505\loch\f1 t\hich\af1\dbch\af31505\loch\f1 he model creation. And users can duplicate the type of column, beam and brace.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \fi800\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 }{
|
||||
\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid15612865 \hich\af1\dbch\af31505\loch\f1
|
||||
UI.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 IExternalCommand
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid10888779 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 .FamilyInstance}{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \f0\insrsid5725219
|
||||
\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid10888779 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219
|
||||
\hich\af1\dbch\af31505\loch\f1 .Document }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid5725219
|
||||
\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid10888779 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219
|
||||
\hich\af1\dbch\af31505\loch\f1 .Level
|
||||
\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\lang1024\langfe1024\noproof\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\lang1024\langfe1024\noproof\insrsid10888779 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1
|
||||
\ltrch\fcs0 \f1\lang1024\langfe1024\noproof\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 .FamilySymbol}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \f0\insrsid5725219
|
||||
\par }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Project Files\hich\af1\dbch\af31505\loch\f1 :}{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\f0\insrsid5725219
|
||||
\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1 Command.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \f1\insrsid5725219 \hich\af1\dbch\af31505\loch\f1
|
||||
The main DLL source file which contains the class Command which implements interface IExternalCommand.}{\rtlch\fcs1 \af39 \ltrch\fcs0 \cf11\lang1024\langfe1024\loch\af39\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f39 }{
|
||||
\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 Initialize necessary data to create framing and display UI for user's input
|
||||
\par }\pard \ltrpar\ql \fi400\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \cf11\lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 CreateFrameForm.cs}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \fi400\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 This file contains a class that is the main
|
||||
\hich\af1\dbch\af39\loch\f1 form to create framing.}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \cf11\lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 DuplicateTypeForm.cs}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1
|
||||
This file contains a class that is the form to duplicate FamilySymbol and edit its name and parameters
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \cf11\lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 ErrorMessageException.cs}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \li300\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin300\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1
|
||||
This file contains a class which passes error message to UI or back to internal \hich\af1\dbch\af39\loch\f1 error messagebox by Execute method in IExternalCommand.
|
||||
\par }\pard \ltrpar\ql \fi300\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 FrameBuilder.cs}{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \fi300\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 This file contains a class which}{
|
||||
\rtlch\fcs1 \af39 \ltrch\fcs0 \cf11\lang1024\langfe1024\loch\af39\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f39 }{\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219
|
||||
\hich\af1\dbch\af39\loch\f1 creates columns, beams and braces to create framing}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 FrameData.cs
|
||||
\par }\pard \ltrpar\ql \fi400\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1
|
||||
This file contains a data class which includes information to create framing}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 FrameT\hich\af1\dbch\af39\loch\f1 ypeParameters.cs
|
||||
|
||||
\par }\pard \ltrpar\ql \li400\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin400\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1
|
||||
This file contains a class which is used to show and modify parameters of column, beam or brace for control PropertyGrid}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \fi400\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1 FrameTypesMgr.cs
|
||||
\par }\pard \ltrpar\ql \li400\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin400\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid5725219 \hich\af1\dbch\af39\loch\f1
|
||||
This file contains a class which is the data manager taking charge of FamilySymbol object in current\hich\af1\dbch\af39\loch\f1 document}{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1024\langfe1024\loch\af0\hich\af0\dbch\af39\noproof\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid5725219 -\tab \hich\af1\dbch\af39\loch\f1 Press the Duplicate button in the dialog;
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \loch\af0\hich\af0\dbch\af39\insrsid5725219
|
||||
\par }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\loch\af1\hich\af1\dbch\af39\insrsid5725219 \hich\af1\dbch\af39\loch\f1 Description:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid5725219 \hich\af1\dbch\af39\loch\f1 }{\rtlch\fcs1 \af0 \ltrch\fcs0
|
||||
\loch\af0\hich\af0\dbch\af39\insrsid5725219
|
||||
\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid5725219 \hich\af1\dbch\af39\loch\f1 This sample provides the following functionality:
|
||||
\par }\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid5725219 -\tab \hich\af1\dbch\af39\loch\f1
|
||||
Present a dialog to users asking for the following information:
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Distance between columns
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Number of Columns in the X direction
|
||||
\par }\pard \ltrpar\ql \fi-360\li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid5725219 -\tab \hich\af1\dbch\af39\loch\f1 Num\hich\af1\dbch\af39\loch\f1
|
||||
ber of Columns in the Y direction
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 The type of the columns
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 The type of the beams
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 The type of the braces
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Number of Floors
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Incremental height of Auto-generated levels
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Coordinate of the bottom left corner of Frame
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Angle to rotate Frame in clockwi\hich\af1\dbch\af39\loch\f1 se
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1
|
||||
The number of floors is less than the number of levels since columns will be inserted from the level below to the level above. For example if the number of floors requested is 3 then there must be 4 levels and the columns will go from Level 1 to 2, Le
|
||||
\hich\af1\dbch\af39\loch\f1
|
||||
vel 2 to 3 and Level 3 to 4. If there is less than 2 levels tell the user 2 levels must be added and exit the command with a failure. If more levels are need, auto-generate levels according to the number of floors. The height between adjoin generated leve
|
||||
\hich\af1\dbch\af39\loch\f1 l\hich\af1\dbch\af39\loch\f1 s equals to the height between the highest 2 levels existed in the project.
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Starting with the lowest level and progressing to higher levels, insert columns with the specified type into the project programmatically in an array format based on the number o\hich\af1\dbch\af39\loch\f1
|
||||
f columns specified in the X and Y directions with the correct specified distance between them. Do this for each floor specified.
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Insert beams of the specified type between the tops of each adjacent column in the X and Y direction to form a square grid o\hich\af1\dbch\af39\loch\f1 f beams. Beams are not needed between diagonal columns.
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Insert braces of the specified type between the midpoint of each column and the }{\rtlch\fcs1 \af1 \ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid6693393 \hich\af1\dbch\af39\loch\f1 midpoint}{\rtlch\fcs1 \af1
|
||||
\ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid5725219 \hich\af1\dbch\af39\loch\f1 of each adjoining beam.
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 The frame is moved according to the coordinate of the bottom left corner. Then rot\hich\af1\dbch\af39\loch\f1 ate it in clockwise according to the input angle.
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Users can create a new concrete element type through duplicating specified type. The work flow is as follows:
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Press the Duplicate button in the dialog;
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Change name of column\hich\f1 \rquote \loch\f1 s type and press OK;
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Cha\hich\af1\dbch\af39\loch\f1 nge value for b and h of section in another dialog and press OK;
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Similar steps can be followed for concrete and wood beams and braces.
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid5725219
|
||||
\par }{\rtlch\fcs1 \ab\af1 \ltrch\fcs0 \b\loch\af1\hich\af1\dbch\af39\insrsid5725219 \hich\af1\dbch\af39\loch\f1 Instructions:}{\rtlch\fcs1 \af1 \ltrch\fcs0 \cf2\loch\af1\hich\af1\dbch\af39\insrsid5725219 \hich\af1\dbch\af39\loch\f1 }{\rtlch\fcs1 \af0
|
||||
\ltrch\fcs0 \cf2\loch\af0\hich\af0\dbch\af39\insrsid5725219
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid5725219 \hich\af1\dbch\af39\loch\f1 1.\tab Open Revit Structure.
|
||||
\par \hich\af1\dbch\af39\loch\f1 2.\tab Run the command.
|
||||
\par \hich\af1\dbch\af39\loch\f1 3.\tab Input the information to create beams, brace and column\hich\af1\dbch\af39\loch\f1 s, input the angle to rotate (optional).
|
||||
\par \hich\af1\dbch\af39\loch\f1 4.\tab In sample\hich\f1 \rquote \loch\f1 s main UI click the OK button.
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1 \ltrch\fcs0 \loch\af1\hich\af1\dbch\af39\insrsid5725219 \hich\af1\dbch\af39\loch\f1 5.\tab
|
||||
Application will create a frame consist of column, beam and brace.
|
||||
\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8
|
||||
72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7
|
||||
2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b
|
||||
44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7
|
||||
065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000
|
||||
00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08
|
||||
84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc
|
||||
52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353
|
||||
bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468
|
||||
656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c
|
||||
070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7
|
||||
29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65
|
||||
312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8
|
||||
a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04
|
||||
98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c
|
||||
94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471
|
||||
7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671
|
||||
9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1
|
||||
e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5
|
||||
193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1
|
||||
17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2
|
||||
8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6
|
||||
6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a
|
||||
668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847
|
||||
bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e
|
||||
16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b
|
||||
5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0
|
||||
8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2
|
||||
c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966
|
||||
0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b
|
||||
7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb
|
||||
9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0
|
||||
088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf
|
||||
8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26
|
||||
ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0
|
||||
28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6
|
||||
345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93
|
||||
b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30
|
||||
254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74
|
||||
68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24
|
||||
51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198
|
||||
720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528
|
||||
a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000
|
||||
000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000
|
||||
002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468
|
||||
656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000
|
||||
00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000
|
||||
00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000}
|
||||
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
|
||||
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
|
||||
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
|
||||
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
|
||||
{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
|
||||
\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
|
||||
\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
|
||||
\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
|
||||
4d73786d6c322e534158584d4c5265616465722e352e3000000000000000000000060000
|
||||
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f0000000000000000000000004085
|
||||
cb7d78bbca01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000105000000000000}}
|
||||
Reference in New Issue
Block a user