mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-09-21 19:33:41 +00:00
added Revit 2022 SDK minus except *rvt and *rfa
This commit is contained in:
@@ -0,0 +1,257 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Application = Autodesk.Revit.ApplicationServices.Application;
|
||||
using Element = Autodesk.Revit.DB.Element;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <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
|
||||
{
|
||||
/// <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 virtual Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData
|
||||
, ref string message, Autodesk.Revit.DB.ElementSet elements)
|
||||
{
|
||||
try
|
||||
{
|
||||
Document document = commandData.Application.ActiveUIDocument.Document;
|
||||
|
||||
// Get all selected lines and arcs
|
||||
CurveArray selectedCurves = GetSelectedCurves(commandData.Application.ActiveUIDocument.Document);
|
||||
|
||||
// Show UI
|
||||
GridCreationOptionData gridCreationOption = new GridCreationOptionData(!selectedCurves.IsEmpty);
|
||||
using (GridCreationOptionForm gridCreationOptForm = new GridCreationOptionForm(gridCreationOption))
|
||||
{
|
||||
DialogResult result = gridCreationOptForm.ShowDialog();
|
||||
if (result == DialogResult.Cancel)
|
||||
{
|
||||
return Autodesk.Revit.UI.Result.Cancelled;
|
||||
}
|
||||
|
||||
ArrayList labels = GetAllLabelsOfGrids(document);
|
||||
ForgeTypeId unit = GetLengthUnitType(document);
|
||||
switch (gridCreationOption.CreateGridsMode)
|
||||
{
|
||||
case CreateMode.Select: // Create grids with selected lines/arcs
|
||||
CreateWithSelectedCurvesData data = new CreateWithSelectedCurvesData(commandData.Application, selectedCurves, labels);
|
||||
using (CreateWithSelectedCurvesForm createWithSelected = new CreateWithSelectedCurvesForm(data))
|
||||
{
|
||||
result = createWithSelected.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
// Create grids
|
||||
Transaction transaction = new Transaction(document, "CreateGridsWithSelectedCurves");
|
||||
transaction.Start();
|
||||
data.CreateGrids();
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CreateMode.Orthogonal: // Create orthogonal grids
|
||||
CreateOrthogonalGridsData orthogonalData = new CreateOrthogonalGridsData(commandData.Application, unit, labels);
|
||||
using (CreateOrthogonalGridsForm orthogonalGridForm = new CreateOrthogonalGridsForm(orthogonalData))
|
||||
{
|
||||
result = orthogonalGridForm.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
// Create grids
|
||||
Transaction transaction = new Transaction(document, "CreateOrthogonalGrids");
|
||||
transaction.Start();
|
||||
orthogonalData.CreateGrids();
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CreateMode.RadialAndArc: // Create radial and arc grids
|
||||
CreateRadialAndArcGridsData radArcData = new CreateRadialAndArcGridsData(commandData.Application, unit, labels);
|
||||
using (CreateRadialAndArcGridsForm radArcForm = new CreateRadialAndArcGridsForm(radArcData))
|
||||
{
|
||||
result = radArcForm.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
// Create grids
|
||||
Transaction transaction = new Transaction(document, "CreateRadialAndArcGrids");
|
||||
transaction.Start();
|
||||
radArcData.CreateGrids();
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
return Autodesk.Revit.UI.Result.Succeeded;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Autodesk.Revit.UI.Result.Cancelled;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
message = ex.Message;
|
||||
return Autodesk.Revit.UI.Result.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all selected lines and arcs
|
||||
/// </summary>
|
||||
/// <param name="document">Revit's document</param>
|
||||
/// <returns>CurveArray contains all selected lines and arcs</returns>
|
||||
private static CurveArray GetSelectedCurves(Document document)
|
||||
{
|
||||
CurveArray selectedCurves = new CurveArray();
|
||||
UIDocument newUIdocument = new UIDocument(document);
|
||||
ElementSet elements = new ElementSet();
|
||||
foreach (ElementId elementId in newUIdocument.Selection.GetElementIds())
|
||||
{
|
||||
elements.Insert(newUIdocument.Document.GetElement(elementId));
|
||||
}
|
||||
foreach (Autodesk.Revit.DB.Element element in elements)
|
||||
{
|
||||
if ((element is ModelLine) || (element is ModelArc))
|
||||
{
|
||||
ModelCurve modelCurve = element as ModelCurve;
|
||||
Curve curve = modelCurve.GeometryCurve;
|
||||
if (curve != null)
|
||||
{
|
||||
selectedCurves.Append(curve);
|
||||
}
|
||||
}
|
||||
else if ((element is DetailLine) || (element is DetailArc))
|
||||
{
|
||||
DetailCurve detailCurve = element as DetailCurve;
|
||||
Curve curve = detailCurve.GeometryCurve;
|
||||
if (curve != null)
|
||||
{
|
||||
selectedCurves.Append(curve);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return selectedCurves;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all model and detail lines/arcs within selected elements
|
||||
/// </summary>
|
||||
/// <param name="document">Revit's document</param>
|
||||
/// <returns>ElementSet contains all model and detail lines/arcs within selected elements </returns>
|
||||
public static ElementSet GetSelectedModelLinesAndArcs(Document document)
|
||||
{
|
||||
UIDocument newUIdocument = new UIDocument(document);
|
||||
ElementSet elements = new ElementSet();
|
||||
foreach (ElementId elementId in newUIdocument.Selection.GetElementIds())
|
||||
{
|
||||
elements.Insert(newUIdocument.Document.GetElement(elementId));
|
||||
}
|
||||
ElementSet tmpSet = new ElementSet();
|
||||
foreach (Autodesk.Revit.DB.Element element in elements)
|
||||
{
|
||||
if ((element is ModelLine) || (element is ModelArc) || (element is DetailLine) || (element is DetailArc))
|
||||
{
|
||||
tmpSet.Insert(element);
|
||||
}
|
||||
}
|
||||
|
||||
return tmpSet;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get current length display unit type
|
||||
/// </summary>
|
||||
/// <param name="document">Revit's document</param>
|
||||
/// <returns>Current length display unit type</returns>
|
||||
private static ForgeTypeId GetLengthUnitType(Document document)
|
||||
{
|
||||
ForgeTypeId specTypeId = SpecTypeId.Length;
|
||||
Units projectUnit = document.GetUnits();
|
||||
try
|
||||
{
|
||||
Autodesk.Revit.DB.FormatOptions formatOption = projectUnit.GetFormatOptions(specTypeId);
|
||||
return formatOption.GetUnitTypeId();
|
||||
}
|
||||
catch (System.Exception /*e*/)
|
||||
{
|
||||
return UnitTypeId.Feet;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all grid labels in current document
|
||||
/// </summary>
|
||||
/// <param name="document">Revit's document</param>
|
||||
/// <returns>ArrayList contains all grid labels in current document</returns>
|
||||
private static ArrayList GetAllLabelsOfGrids(Document document)
|
||||
{
|
||||
ArrayList labels = new ArrayList();
|
||||
FilteredElementIterator itor = new FilteredElementCollector(document).OfClass(typeof(Grid)).GetElementIterator();
|
||||
itor.Reset();
|
||||
for (; itor.MoveNext(); )
|
||||
{
|
||||
Grid grid = itor.Current as Grid;
|
||||
if (null != grid)
|
||||
{
|
||||
labels.Add(grid.Name);
|
||||
}
|
||||
}
|
||||
|
||||
return labels;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,350 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Application = Autodesk.Revit.ApplicationServices.Application;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Base class of all grid creation data class
|
||||
/// </summary>
|
||||
public class CreateGridsData
|
||||
{
|
||||
#region Fields
|
||||
/// <summary>
|
||||
/// The active document of Revit
|
||||
/// </summary>
|
||||
protected Autodesk.Revit.DB.Document m_revitDoc;
|
||||
/// <summary>
|
||||
/// Document Creation object to create new elements
|
||||
/// </summary>
|
||||
protected Autodesk.Revit.Creation.Document m_docCreator;
|
||||
/// <summary>
|
||||
/// Application Creation object to create new elements
|
||||
/// </summary>
|
||||
protected Autodesk.Revit.Creation.Application m_appCreator;
|
||||
/// <summary>
|
||||
/// Array list contains all grid labels in current document
|
||||
/// </summary>
|
||||
private ArrayList m_labelsList;
|
||||
/// <summary>
|
||||
/// Current display unit type
|
||||
/// </summary>
|
||||
protected ForgeTypeId m_unit;
|
||||
/// <summary>
|
||||
/// Resource manager
|
||||
/// </summary>
|
||||
protected static System.Resources.ResourceManager resManager = Properties.Resources.ResourceManager;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Current display unit type
|
||||
/// </summary>
|
||||
public ForgeTypeId Unit
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_unit;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get array list contains all grid labels in current document
|
||||
/// </summary>
|
||||
public ArrayList LabelsList
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_labelsList;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// Constructor without display unit type
|
||||
/// </summary>
|
||||
/// <param name="application">Revit application</param>
|
||||
/// <param name="labels">All existing labels in Revit's document</param>
|
||||
public CreateGridsData(UIApplication application, ArrayList labels)
|
||||
{
|
||||
m_revitDoc = application.ActiveUIDocument.Document;
|
||||
m_appCreator = application.Application.Create;
|
||||
m_docCreator = application.ActiveUIDocument.Document.Create;
|
||||
m_labelsList = labels;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with display unit type
|
||||
/// </summary>
|
||||
/// <param name="application">Revit application</param>
|
||||
/// <param name="labels">All existing labels in Revit's document</param>
|
||||
/// <param name="unit">Current length display unit type</param>
|
||||
public CreateGridsData(UIApplication application, ArrayList labels, ForgeTypeId unit)
|
||||
{
|
||||
m_revitDoc = application.ActiveUIDocument.Document;
|
||||
m_appCreator = application.Application.Create;
|
||||
m_docCreator = application.ActiveUIDocument.Document.Create;
|
||||
m_labelsList = labels;
|
||||
m_unit = unit;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the line to create grid according to the specified bubble location
|
||||
/// </summary>
|
||||
/// <param name="line">The original selected line</param>
|
||||
/// <param name="bubLoc">bubble location</param>
|
||||
/// <returns>The line to create grid</returns>
|
||||
protected Line TransformLine(Line line, BubbleLocation bubLoc)
|
||||
{
|
||||
Line lineToCreate;
|
||||
|
||||
// Create grid according to the bubble location
|
||||
if (bubLoc == BubbleLocation.StartPoint)
|
||||
{
|
||||
lineToCreate = line;
|
||||
}
|
||||
else
|
||||
{
|
||||
Autodesk.Revit.DB.XYZ startPoint = line.GetEndPoint(1);
|
||||
Autodesk.Revit.DB.XYZ endPoint = line.GetEndPoint(0);
|
||||
lineToCreate = NewLine(startPoint, endPoint);
|
||||
}
|
||||
|
||||
return lineToCreate;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the arc to create grid according to the specified bubble location
|
||||
/// </summary>
|
||||
/// <param name="arc">The original selected line</param>
|
||||
/// <param name="bubLoc">bubble location</param>
|
||||
/// <returns>The arc to create grid</returns>
|
||||
protected Arc TransformArc(Arc arc, BubbleLocation bubLoc)
|
||||
{
|
||||
Arc arcToCreate;
|
||||
|
||||
if (bubLoc == BubbleLocation.StartPoint)
|
||||
{
|
||||
arcToCreate = arc;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get start point, end point of the arc and the middle point on it
|
||||
Autodesk.Revit.DB.XYZ startPoint = arc.GetEndPoint(0);
|
||||
Autodesk.Revit.DB.XYZ endPoint = arc.GetEndPoint(1);
|
||||
bool clockwise = (arc.Normal.Z == -1);
|
||||
|
||||
// Get start angel and end angel of arc
|
||||
double startDegree = arc.GetEndParameter(0);
|
||||
double endDegree = arc.GetEndParameter(1);
|
||||
|
||||
// Handle the case that the arc is clockwise
|
||||
if (clockwise && startDegree > 0 && endDegree > 0)
|
||||
{
|
||||
startDegree = 2 * Values.PI - startDegree;
|
||||
endDegree = 2 * Values.PI - endDegree;
|
||||
}
|
||||
else if (clockwise && startDegree < 0)
|
||||
{
|
||||
double temp = endDegree;
|
||||
endDegree = -1 * startDegree;
|
||||
startDegree = -1 * temp;
|
||||
}
|
||||
|
||||
double sumDegree = (startDegree + endDegree) / 2;
|
||||
while (sumDegree > 2 * Values.PI)
|
||||
{
|
||||
sumDegree -= 2 * Values.PI;
|
||||
}
|
||||
|
||||
while (sumDegree < -2 * Values.PI)
|
||||
{
|
||||
sumDegree += 2 * Values.PI;
|
||||
}
|
||||
|
||||
Autodesk.Revit.DB.XYZ midPoint = new Autodesk.Revit.DB.XYZ(arc.Center.X + arc.Radius * Math.Cos(sumDegree),
|
||||
arc.Center.Y + arc.Radius * Math.Sin(sumDegree), 0);
|
||||
|
||||
arcToCreate = Arc.Create(endPoint, startPoint, midPoint);
|
||||
}
|
||||
|
||||
return arcToCreate;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the arc to create grid according to the specified bubble location
|
||||
/// </summary>
|
||||
/// <param name="origin">Arc grid's origin</param>
|
||||
/// <param name="radius">Arc grid's radius</param>
|
||||
/// <param name="startDegree">Arc grid's start degree</param>
|
||||
/// <param name="endDegree">Arc grid's end degree</param>
|
||||
/// <param name="bubLoc">Arc grid's Bubble location</param>
|
||||
/// <returns>The expected arc to create grid</returns>
|
||||
protected Arc TransformArc(Autodesk.Revit.DB.XYZ origin, double radius, double startDegree, double endDegree,
|
||||
BubbleLocation bubLoc)
|
||||
{
|
||||
Arc arcToCreate;
|
||||
// Get start point and end point of the arc and the middle point on the arc
|
||||
Autodesk.Revit.DB.XYZ startPoint = new Autodesk.Revit.DB.XYZ(origin.X + radius * Math.Cos(startDegree),
|
||||
origin.Y + radius * Math.Sin(startDegree), origin.Z);
|
||||
Autodesk.Revit.DB.XYZ midPoint = new Autodesk.Revit.DB.XYZ(origin.X + radius * Math.Cos((startDegree + endDegree) / 2),
|
||||
origin.Y + radius * Math.Sin((startDegree + endDegree) / 2), origin.Z);
|
||||
Autodesk.Revit.DB.XYZ endPoint = new Autodesk.Revit.DB.XYZ(origin.X + radius * Math.Cos(endDegree),
|
||||
origin.Y + radius * Math.Sin(endDegree), origin.Z);
|
||||
|
||||
if (bubLoc == BubbleLocation.StartPoint)
|
||||
{
|
||||
arcToCreate = Arc.Create(startPoint, endPoint, midPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
arcToCreate = Arc.Create(endPoint, startPoint, midPoint);
|
||||
}
|
||||
|
||||
return arcToCreate;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Split a circle into the upper and lower parts
|
||||
/// </summary>
|
||||
/// <param name="arc">Arc to be split</param>
|
||||
/// <param name="upperArc">Upper arc of the circle</param>
|
||||
/// <param name="lowerArc">Lower arc of the circle</param>
|
||||
/// <param name="bubLoc">bubble location</param>
|
||||
protected void TransformCircle(Arc arc, ref Arc upperArc, ref Arc lowerArc, BubbleLocation bubLoc)
|
||||
{
|
||||
Autodesk.Revit.DB.XYZ center = arc.Center;
|
||||
double radius = arc.Radius;
|
||||
Autodesk.Revit.DB.XYZ XRightPoint = new Autodesk.Revit.DB.XYZ(center.X + radius, center.Y, 0);
|
||||
Autodesk.Revit.DB.XYZ XLeftPoint = new Autodesk.Revit.DB.XYZ(center.X - radius, center.Y, 0);
|
||||
Autodesk.Revit.DB.XYZ YUpperPoint = new Autodesk.Revit.DB.XYZ(center.X, center.Y + radius, 0);
|
||||
Autodesk.Revit.DB.XYZ YLowerPoint = new Autodesk.Revit.DB.XYZ(center.X, center.Y - radius, 0);
|
||||
if (bubLoc == BubbleLocation.StartPoint)
|
||||
{
|
||||
upperArc = Arc.Create(XRightPoint, XLeftPoint, YUpperPoint);
|
||||
lowerArc = Arc.Create(XLeftPoint, XRightPoint, YLowerPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
upperArc = Arc.Create(XLeftPoint, XRightPoint, YUpperPoint);
|
||||
lowerArc = Arc.Create(XRightPoint, XLeftPoint, YLowerPoint);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new bound line
|
||||
/// </summary>
|
||||
/// <param name="start">start point of line</param>
|
||||
/// <param name="end">end point of line</param>
|
||||
/// <returns></returns>
|
||||
protected Line NewLine(Autodesk.Revit.DB.XYZ start, Autodesk.Revit.DB.XYZ end)
|
||||
{
|
||||
return Line.CreateBound(start, end);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a grid with a line
|
||||
/// </summary>
|
||||
/// <param name="line">Line to create grid</param>
|
||||
/// <returns>Newly created grid</returns>
|
||||
protected Grid NewGrid(Line line)
|
||||
{
|
||||
return Grid.Create(m_revitDoc, line);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a grid with an arc
|
||||
/// </summary>
|
||||
/// <param name="arc">Arc to create grid</param>
|
||||
/// <returns>Newly created grid</returns>
|
||||
protected Grid NewGrid(Arc arc)
|
||||
{
|
||||
return Grid.Create(m_revitDoc, arc);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create linear grid
|
||||
/// </summary>
|
||||
/// <param name="line">The linear curve to be transferred to grid</param>
|
||||
/// <returns>The newly created grid</returns>
|
||||
///
|
||||
protected Grid CreateLinearGrid(Line line)
|
||||
{
|
||||
return Grid.Create(m_revitDoc, line);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create batch of grids with curves
|
||||
/// </summary>
|
||||
/// <param name="curves">Curves used to create grids</param>
|
||||
protected void CreateGrids(CurveArray curves)
|
||||
{
|
||||
foreach (Curve c in curves)
|
||||
{
|
||||
Line line = c as Line;
|
||||
Arc arc = c as Arc;
|
||||
|
||||
if (line != null)
|
||||
{
|
||||
Grid.Create(m_revitDoc, line);
|
||||
}
|
||||
|
||||
if (arc != null)
|
||||
{
|
||||
Grid.Create(m_revitDoc, arc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add curve to curve array for batch creation
|
||||
/// </summary>
|
||||
/// <param name="curves">curve array stores all curves for batch creation</param>
|
||||
/// <param name="curve">curve to be added</param>
|
||||
public static void AddCurveForBatchCreation(ref CurveArray curves, Curve curve)
|
||||
{
|
||||
curves.Append(curve);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show a message box
|
||||
/// </summary>
|
||||
/// <param name="message">Message</param>
|
||||
/// <param name="caption">title of message box</param>
|
||||
public static void ShowMessage(String message, String caption)
|
||||
{
|
||||
TaskDialog.Show(caption, message, TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,436 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Application = Autodesk.Revit.ApplicationServices.Application;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores information for creating orthogonal grids
|
||||
/// </summary>
|
||||
public class CreateOrthogonalGridsData : CreateGridsData
|
||||
{
|
||||
#region Fields
|
||||
// X coordinate of origin
|
||||
private double m_xOrigin;
|
||||
// Y coordinate of origin
|
||||
private double m_yOrigin;
|
||||
// Spacing between horizontal grids
|
||||
private double m_xSpacing;
|
||||
// Spacing between vertical grids
|
||||
private double m_ySpacing;
|
||||
// Number of horizontal grids
|
||||
private uint m_xNumber;
|
||||
// Number of vertical grids
|
||||
private uint m_yNumber;
|
||||
// Bubble location of horizontal grids
|
||||
private BubbleLocation m_xBubbleLoc;
|
||||
// Bubble location of vertical grids
|
||||
private BubbleLocation m_yBubbleLoc;
|
||||
// Label of first horizontal grid
|
||||
private String m_xFirstLabel;
|
||||
// Label of first vertical grid
|
||||
private String m_yFirstLabel;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// X coordinate of origin
|
||||
/// </summary>
|
||||
public double XOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_xOrigin;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_xOrigin = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Y coordinate of origin
|
||||
/// </summary>
|
||||
public double YOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_yOrigin;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_yOrigin = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Spacing between horizontal grids
|
||||
/// </summary>
|
||||
public double XSpacing
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_xSpacing;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_xSpacing = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Spacing between vertical grids
|
||||
/// </summary>
|
||||
public double YSpacing
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ySpacing;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_ySpacing = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Number of horizontal grids
|
||||
/// </summary>
|
||||
public uint XNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_xNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_xNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Number of vertical grids
|
||||
/// </summary>
|
||||
public uint YNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_yNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_yNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bubble location of horizontal grids
|
||||
/// </summary>
|
||||
public BubbleLocation XBubbleLoc
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_xBubbleLoc;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_xBubbleLoc = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bubble location of vertical grids
|
||||
/// </summary>
|
||||
public BubbleLocation YBubbleLoc
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_yBubbleLoc;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_yBubbleLoc = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Label of first horizontal grid
|
||||
/// </summary>
|
||||
public String XFirstLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_xFirstLabel;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_xFirstLabel = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Label of first vertical grid
|
||||
/// </summary>
|
||||
public String YFirstLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_yFirstLabel;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_yFirstLabel = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="application">Application object</param>
|
||||
/// <param name="unit">Current length display unit type</param>
|
||||
/// <param name="labels">All existing labels in Revit's document</param>
|
||||
public CreateOrthogonalGridsData(UIApplication application, ForgeTypeId unit, ArrayList labels)
|
||||
: base(application, labels, unit)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create grids
|
||||
/// </summary>
|
||||
public void CreateGrids()
|
||||
{
|
||||
ArrayList failureReasons = new ArrayList();
|
||||
if (CreateXGrids(ref failureReasons) + CreateYGrids(ref failureReasons) != 0)
|
||||
{
|
||||
String failureReason = resManager.GetString("FailedToCreateGrids");
|
||||
if (failureReasons.Count != 0)
|
||||
{
|
||||
failureReason += resManager.GetString("Reasons") + "\r";
|
||||
failureReason += "\r";
|
||||
foreach (String reason in failureReasons)
|
||||
{
|
||||
failureReason += reason + "\r";
|
||||
}
|
||||
}
|
||||
|
||||
failureReason += "\r" + resManager.GetString("AjustValues");
|
||||
|
||||
ShowMessage(failureReason, resManager.GetString("FailureCaptionCreateGrids"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create horizontal grids
|
||||
/// </summary>
|
||||
/// <param name="failureReasons">ArrayList contains failure reasons</param>
|
||||
/// <returns>Number of grids failed to create</returns>
|
||||
private int CreateXGrids(ref ArrayList failureReasons)
|
||||
{
|
||||
int errorCount = 0;
|
||||
|
||||
// Curve array which stores all curves for batch creation
|
||||
CurveArray curves = new CurveArray();
|
||||
|
||||
for (int i = 0; i < m_xNumber; ++i)
|
||||
{
|
||||
Autodesk.Revit.DB.XYZ startPoint;
|
||||
Autodesk.Revit.DB.XYZ endPoint;
|
||||
Line line;
|
||||
|
||||
try
|
||||
{
|
||||
if (m_yNumber != 0)
|
||||
{
|
||||
// Grids will have an extension distance of m_ySpacing / 2
|
||||
startPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin - m_ySpacing / 2, m_yOrigin + i * m_xSpacing, 0);
|
||||
endPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + (m_yNumber - 1) * m_ySpacing + m_ySpacing / 2, m_yOrigin + i * m_xSpacing, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
startPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin, m_yOrigin + i * m_xSpacing, 0);
|
||||
endPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + m_xSpacing / 2, m_yOrigin + i * m_xSpacing, 0);
|
||||
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Create a line according to the bubble location
|
||||
if (m_xBubbleLoc == BubbleLocation.StartPoint)
|
||||
{
|
||||
line = NewLine(startPoint, endPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
line = NewLine(endPoint, startPoint);
|
||||
}
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
String failureReason = resManager.GetString("SpacingsTooSmall");
|
||||
if (!failureReasons.Contains(failureReason))
|
||||
{
|
||||
failureReasons.Add(failureReason);
|
||||
}
|
||||
errorCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
Grid grid;
|
||||
// Create grid with line
|
||||
grid = NewGrid(line);
|
||||
|
||||
try
|
||||
{
|
||||
// Set the label of first horizontal grid
|
||||
grid.Name = m_xFirstLabel;
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToSetLabel") + m_xFirstLabel + "!",
|
||||
resManager.GetString("FailureCaptionSetLabel"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add the line to curve array
|
||||
curves.Append(line);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
++errorCount;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Create grids with curve array
|
||||
CreateGrids(curves);
|
||||
|
||||
return errorCount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create vertical grids
|
||||
/// </summary>
|
||||
/// <param name="failureReasons">ArrayList contains failure reasons</param>
|
||||
/// <returns>Number of grids failed to create</returns>
|
||||
private int CreateYGrids(ref ArrayList failureReasons)
|
||||
{
|
||||
int errorCount = 0;
|
||||
|
||||
// Curve array which stores all curves for batch creation
|
||||
CurveArray curves = new CurveArray();
|
||||
|
||||
for (int j = 0; j < m_yNumber; ++j)
|
||||
{
|
||||
Autodesk.Revit.DB.XYZ startPoint;
|
||||
Autodesk.Revit.DB.XYZ endPoint;
|
||||
Line line;
|
||||
|
||||
try
|
||||
{
|
||||
if (m_xNumber != 0)
|
||||
{
|
||||
startPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + j * m_ySpacing, m_yOrigin - m_xSpacing / 2, 0);
|
||||
endPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + j * m_ySpacing, m_yOrigin + (m_xNumber - 1) * m_xSpacing + m_xSpacing / 2, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
startPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + j * m_ySpacing, m_yOrigin, 0);
|
||||
endPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + j * m_ySpacing, m_yOrigin + m_ySpacing / 2, 0);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Create a line according to the bubble location
|
||||
if (m_yBubbleLoc == BubbleLocation.StartPoint)
|
||||
{
|
||||
line = NewLine(startPoint, endPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
line = NewLine(endPoint, startPoint);
|
||||
}
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
String failureReason = resManager.GetString("SpacingsTooSmall");
|
||||
if (!failureReasons.Contains(failureReason))
|
||||
{
|
||||
failureReasons.Add(failureReason);
|
||||
}
|
||||
errorCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (j == 0)
|
||||
{
|
||||
Grid grid;
|
||||
// Create grid with line
|
||||
grid = NewGrid(line);
|
||||
|
||||
try
|
||||
{
|
||||
// Set label of first vertical grid
|
||||
grid.Name = m_yFirstLabel;
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToSetLabel") + m_yFirstLabel + "!",
|
||||
resManager.GetString("FailureCaptionSetLabel"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add the line to curve array
|
||||
curves.Append(line);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
++errorCount;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Create grids with curves
|
||||
CreateGrids(curves);
|
||||
|
||||
return errorCount;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,425 @@
|
||||
//
|
||||
// (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.GridCreation.CS
|
||||
{
|
||||
partial class CreateOrthogonalGridsForm
|
||||
{
|
||||
/// <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.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.labelYCoordUnit = new System.Windows.Forms.Label();
|
||||
this.labelXCoordUnit = new System.Windows.Forms.Label();
|
||||
this.textBoxYCoord = new System.Windows.Forms.TextBox();
|
||||
this.textBoxXCoord = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBoxYNumber = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.textBoxXNumber = new System.Windows.Forms.TextBox();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.labelUnitY = new System.Windows.Forms.Label();
|
||||
this.textBoxYSpacing = new System.Windows.Forms.TextBox();
|
||||
this.textBoxYFirstLabel = new System.Windows.Forms.TextBox();
|
||||
this.comboBoxYBubbleLocation = new System.Windows.Forms.ComboBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.labelUnitX = new System.Windows.Forms.Label();
|
||||
this.textBoxXSpacing = new System.Windows.Forms.TextBox();
|
||||
this.textBoxXFirstLabel = new System.Windows.Forms.TextBox();
|
||||
this.comboBoxXBubbleLocation = new System.Windows.Forms.ComboBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.buttonCreate = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.labelYCoordUnit);
|
||||
this.groupBox1.Controls.Add(this.labelXCoordUnit);
|
||||
this.groupBox1.Controls.Add(this.textBoxYCoord);
|
||||
this.groupBox1.Controls.Add(this.textBoxXCoord);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(13, 12);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(520, 55);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Origin of the Grids";
|
||||
//
|
||||
// labelYCoordUnit
|
||||
//
|
||||
this.labelYCoordUnit.Location = new System.Drawing.Point(484, 23);
|
||||
this.labelYCoordUnit.Name = "labelYCoordUnit";
|
||||
this.labelYCoordUnit.Size = new System.Drawing.Size(23, 13);
|
||||
this.labelYCoordUnit.TabIndex = 7;
|
||||
//
|
||||
// labelXCoordUnit
|
||||
//
|
||||
this.labelXCoordUnit.Location = new System.Drawing.Point(227, 23);
|
||||
this.labelXCoordUnit.Name = "labelXCoordUnit";
|
||||
this.labelXCoordUnit.Size = new System.Drawing.Size(23, 13);
|
||||
this.labelXCoordUnit.TabIndex = 7;
|
||||
//
|
||||
// textBoxYCoord
|
||||
//
|
||||
this.textBoxYCoord.Location = new System.Drawing.Point(385, 20);
|
||||
this.textBoxYCoord.Name = "textBoxYCoord";
|
||||
this.textBoxYCoord.Size = new System.Drawing.Size(98, 20);
|
||||
this.textBoxYCoord.TabIndex = 1;
|
||||
this.textBoxYCoord.Tag = "0";
|
||||
this.textBoxYCoord.Text = "0";
|
||||
//
|
||||
// textBoxXCoord
|
||||
//
|
||||
this.textBoxXCoord.Location = new System.Drawing.Point(109, 20);
|
||||
this.textBoxXCoord.Name = "textBoxXCoord";
|
||||
this.textBoxXCoord.Size = new System.Drawing.Size(112, 20);
|
||||
this.textBoxXCoord.TabIndex = 0;
|
||||
this.textBoxXCoord.Tag = "0";
|
||||
this.textBoxXCoord.Text = "0";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Location = new System.Drawing.Point(261, 24);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(122, 13);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Y coordinate:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(7, 24);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(95, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "X coordinate:";
|
||||
//
|
||||
// textBoxYNumber
|
||||
//
|
||||
this.textBoxYNumber.Location = new System.Drawing.Point(385, 24);
|
||||
this.textBoxYNumber.Name = "textBoxYNumber";
|
||||
this.textBoxYNumber.Size = new System.Drawing.Size(120, 20);
|
||||
this.textBoxYNumber.TabIndex = 1;
|
||||
this.textBoxYNumber.Tag = "3";
|
||||
this.textBoxYNumber.Text = "3";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Location = new System.Drawing.Point(261, 27);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(122, 13);
|
||||
this.label3.TabIndex = 7;
|
||||
this.label3.Text = "Number:";
|
||||
//
|
||||
// textBoxXNumber
|
||||
//
|
||||
this.textBoxXNumber.Location = new System.Drawing.Point(385, 23);
|
||||
this.textBoxXNumber.Name = "textBoxXNumber";
|
||||
this.textBoxXNumber.Size = new System.Drawing.Size(120, 20);
|
||||
this.textBoxXNumber.TabIndex = 1;
|
||||
this.textBoxXNumber.Tag = "3";
|
||||
this.textBoxXNumber.Text = "3";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.labelUnitY);
|
||||
this.groupBox2.Controls.Add(this.textBoxYNumber);
|
||||
this.groupBox2.Controls.Add(this.textBoxYSpacing);
|
||||
this.groupBox2.Controls.Add(this.textBoxYFirstLabel);
|
||||
this.groupBox2.Controls.Add(this.label3);
|
||||
this.groupBox2.Controls.Add(this.comboBoxYBubbleLocation);
|
||||
this.groupBox2.Controls.Add(this.label10);
|
||||
this.groupBox2.Controls.Add(this.label5);
|
||||
this.groupBox2.Controls.Add(this.label9);
|
||||
this.groupBox2.Location = new System.Drawing.Point(14, 165);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(519, 85);
|
||||
this.groupBox2.TabIndex = 2;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Y direction Grids";
|
||||
//
|
||||
// labelUnitY
|
||||
//
|
||||
this.labelUnitY.Location = new System.Drawing.Point(227, 26);
|
||||
this.labelUnitY.Name = "labelUnitY";
|
||||
this.labelUnitY.Size = new System.Drawing.Size(23, 13);
|
||||
this.labelUnitY.TabIndex = 7;
|
||||
//
|
||||
// textBoxYSpacing
|
||||
//
|
||||
this.textBoxYSpacing.Location = new System.Drawing.Point(110, 24);
|
||||
this.textBoxYSpacing.Name = "textBoxYSpacing";
|
||||
this.textBoxYSpacing.Size = new System.Drawing.Size(112, 20);
|
||||
this.textBoxYSpacing.TabIndex = 0;
|
||||
this.textBoxYSpacing.Tag = "10.0";
|
||||
this.textBoxYSpacing.Text = 10.0.ToString("0.0");
|
||||
//
|
||||
// textBoxYFirstLabel
|
||||
//
|
||||
this.textBoxYFirstLabel.Location = new System.Drawing.Point(385, 53);
|
||||
this.textBoxYFirstLabel.Name = "textBoxYFirstLabel";
|
||||
this.textBoxYFirstLabel.Size = new System.Drawing.Size(120, 20);
|
||||
this.textBoxYFirstLabel.TabIndex = 3;
|
||||
this.textBoxYFirstLabel.Tag = "A";
|
||||
this.textBoxYFirstLabel.Text = "A";
|
||||
//
|
||||
// comboBoxYBubbleLocation
|
||||
//
|
||||
this.comboBoxYBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxYBubbleLocation.FormattingEnabled = true;
|
||||
this.comboBoxYBubbleLocation.Items.AddRange(new object[] {
|
||||
"At start point of lines",
|
||||
"At end point of lines"});
|
||||
this.comboBoxYBubbleLocation.Location = new System.Drawing.Point(108, 53);
|
||||
this.comboBoxYBubbleLocation.Name = "comboBoxYBubbleLocation";
|
||||
this.comboBoxYBubbleLocation.Size = new System.Drawing.Size(146, 21);
|
||||
this.comboBoxYBubbleLocation.TabIndex = 2;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.Location = new System.Drawing.Point(7, 55);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(95, 13);
|
||||
this.label10.TabIndex = 6;
|
||||
this.label10.Text = "Bubble location:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Location = new System.Drawing.Point(6, 26);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(95, 13);
|
||||
this.label5.TabIndex = 7;
|
||||
this.label5.Text = "Spacing:";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.Location = new System.Drawing.Point(261, 55);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(122, 13);
|
||||
this.label9.TabIndex = 6;
|
||||
this.label9.Text = "Label of first grid:";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Location = new System.Drawing.Point(261, 26);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(122, 13);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "Number:";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.labelUnitX);
|
||||
this.groupBox3.Controls.Add(this.textBoxXNumber);
|
||||
this.groupBox3.Controls.Add(this.textBoxXSpacing);
|
||||
this.groupBox3.Controls.Add(this.textBoxXFirstLabel);
|
||||
this.groupBox3.Controls.Add(this.comboBoxXBubbleLocation);
|
||||
this.groupBox3.Controls.Add(this.label6);
|
||||
this.groupBox3.Controls.Add(this.label7);
|
||||
this.groupBox3.Controls.Add(this.label4);
|
||||
this.groupBox3.Controls.Add(this.label8);
|
||||
this.groupBox3.Location = new System.Drawing.Point(13, 73);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(520, 86);
|
||||
this.groupBox3.TabIndex = 1;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "X direction Grids";
|
||||
//
|
||||
// labelUnitX
|
||||
//
|
||||
this.labelUnitX.Location = new System.Drawing.Point(227, 25);
|
||||
this.labelUnitX.Name = "labelUnitX";
|
||||
this.labelUnitX.Size = new System.Drawing.Size(23, 13);
|
||||
this.labelUnitX.TabIndex = 7;
|
||||
//
|
||||
// textBoxXSpacing
|
||||
//
|
||||
this.textBoxXSpacing.Location = new System.Drawing.Point(109, 23);
|
||||
this.textBoxXSpacing.Name = "textBoxXSpacing";
|
||||
this.textBoxXSpacing.Size = new System.Drawing.Size(112, 20);
|
||||
this.textBoxXSpacing.TabIndex = 0;
|
||||
this.textBoxXSpacing.Tag = "10.0";
|
||||
this.textBoxXSpacing.Text = 10.0.ToString("0.0");
|
||||
//
|
||||
// textBoxXFirstLabel
|
||||
//
|
||||
this.textBoxXFirstLabel.Location = new System.Drawing.Point(385, 53);
|
||||
this.textBoxXFirstLabel.Name = "textBoxXFirstLabel";
|
||||
this.textBoxXFirstLabel.Size = new System.Drawing.Size(120, 20);
|
||||
this.textBoxXFirstLabel.TabIndex = 3;
|
||||
this.textBoxXFirstLabel.Tag = "";
|
||||
this.textBoxXFirstLabel.Text = "1";
|
||||
//
|
||||
// comboBoxXBubbleLocation
|
||||
//
|
||||
this.comboBoxXBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxXBubbleLocation.FormattingEnabled = true;
|
||||
this.comboBoxXBubbleLocation.Items.AddRange(new object[] {
|
||||
"At start point of lines",
|
||||
"At end point of lines"});
|
||||
this.comboBoxXBubbleLocation.Location = new System.Drawing.Point(108, 53);
|
||||
this.comboBoxXBubbleLocation.Name = "comboBoxXBubbleLocation";
|
||||
this.comboBoxXBubbleLocation.Size = new System.Drawing.Size(147, 21);
|
||||
this.comboBoxXBubbleLocation.TabIndex = 2;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.Location = new System.Drawing.Point(7, 25);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(95, 13);
|
||||
this.label6.TabIndex = 6;
|
||||
this.label6.Text = "Spacing:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.Location = new System.Drawing.Point(7, 55);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(95, 13);
|
||||
this.label7.TabIndex = 6;
|
||||
this.label7.Text = "Bubble location:";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.Location = new System.Drawing.Point(261, 55);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(122, 13);
|
||||
this.label8.TabIndex = 6;
|
||||
this.label8.Text = "Label of first grid:";
|
||||
//
|
||||
// buttonCreate
|
||||
//
|
||||
this.buttonCreate.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonCreate.Location = new System.Drawing.Point(327, 269);
|
||||
this.buttonCreate.Name = "buttonCreate";
|
||||
this.buttonCreate.Size = new System.Drawing.Size(94, 23);
|
||||
this.buttonCreate.TabIndex = 3;
|
||||
this.buttonCreate.Text = "Create &Grids";
|
||||
this.buttonCreate.UseVisualStyleBackColor = true;
|
||||
this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(439, 269);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(94, 23);
|
||||
this.buttonCancel.TabIndex = 4;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// CreateOrthogonalGridsForm
|
||||
//
|
||||
this.AcceptButton = this.buttonCreate;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(545, 304);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonCreate);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CreateOrthogonalGridsForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Create Orthogonal Grids";
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox textBoxYCoord;
|
||||
private System.Windows.Forms.TextBox textBoxXCoord;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBoxYNumber;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox textBoxXNumber;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.TextBox textBoxXSpacing;
|
||||
private System.Windows.Forms.TextBox textBoxYSpacing;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.TextBox textBoxXFirstLabel;
|
||||
private System.Windows.Forms.ComboBox comboBoxXBubbleLocation;
|
||||
private System.Windows.Forms.Button buttonCreate;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.TextBox textBoxYFirstLabel;
|
||||
private System.Windows.Forms.ComboBox comboBoxYBubbleLocation;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label labelUnitY;
|
||||
private System.Windows.Forms.Label labelUnitX;
|
||||
private System.Windows.Forms.Label labelYCoordUnit;
|
||||
private System.Windows.Forms.Label labelXCoordUnit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// The dialog which provides the options of creating orthogonal grids
|
||||
/// </summary>
|
||||
public partial class CreateOrthogonalGridsForm : System.Windows.Forms.Form
|
||||
{
|
||||
// data class object
|
||||
private CreateOrthogonalGridsData m_data;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="data">Data class object</param>
|
||||
public CreateOrthogonalGridsForm(CreateOrthogonalGridsData data)
|
||||
{
|
||||
m_data = data;
|
||||
|
||||
InitializeComponent();
|
||||
// Set state of controls
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set state of controls
|
||||
/// </summary>
|
||||
private void InitializeControls()
|
||||
{
|
||||
// Set length unit related labels
|
||||
String unit = Properties.Resources.ResourceManager.GetString(m_data.Unit.TypeId);
|
||||
labelUnitX.Text = unit;
|
||||
labelUnitY.Text = unit;
|
||||
labelXCoordUnit.Text = unit;
|
||||
labelYCoordUnit.Text = unit;
|
||||
|
||||
|
||||
// Set spacing values
|
||||
textBoxXSpacing.Text = Unit.CovertFromAPI(m_data.Unit, 10).ToString();
|
||||
textBoxYSpacing.Text = textBoxXSpacing.Text;
|
||||
|
||||
// Set bubble locations to end point
|
||||
comboBoxXBubbleLocation.SelectedIndex = 1;
|
||||
comboBoxYBubbleLocation.SelectedIndex = 1;
|
||||
}
|
||||
|
||||
private void buttonCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Check if input are validated
|
||||
if (ValidateValues())
|
||||
{
|
||||
// Transfer data back into data class
|
||||
SetData();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.DialogResult = DialogResult.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer data back into data class
|
||||
/// </summary>
|
||||
private void SetData()
|
||||
{
|
||||
m_data.XOrigin = Unit.CovertToAPI(Convert.ToDouble(textBoxXCoord.Text), m_data.Unit);
|
||||
m_data.YOrigin = Unit.CovertToAPI(Convert.ToDouble(textBoxYCoord.Text), m_data.Unit);
|
||||
m_data.XNumber = Convert.ToUInt32(textBoxXNumber.Text);
|
||||
m_data.YNumber = Convert.ToUInt32(textBoxYNumber.Text);
|
||||
|
||||
if (Convert.ToUInt32(textBoxXNumber.Text) != 0)
|
||||
{
|
||||
m_data.XSpacing = Unit.CovertToAPI(Convert.ToDouble(textBoxXSpacing.Text), m_data.Unit);
|
||||
m_data.XBubbleLoc = (BubbleLocation)comboBoxXBubbleLocation.SelectedIndex;
|
||||
m_data.XFirstLabel = textBoxXFirstLabel.Text;
|
||||
}
|
||||
|
||||
if (Convert.ToUInt32(textBoxYNumber.Text) != 0)
|
||||
{
|
||||
m_data.YSpacing = Unit.CovertToAPI(Convert.ToDouble(textBoxYSpacing.Text), m_data.Unit);
|
||||
m_data.YBubbleLoc = (BubbleLocation)comboBoxYBubbleLocation.SelectedIndex;
|
||||
m_data.YFirstLabel = textBoxYFirstLabel.Text;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if input are validated
|
||||
/// </summary>
|
||||
/// <returns>Whether input is validated</returns>
|
||||
private bool ValidateValues()
|
||||
{
|
||||
if (!Validation.ValidateNumbers(textBoxXNumber, textBoxYNumber))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Validation.ValidateCoord(textBoxXCoord) || !Validation.ValidateCoord(textBoxYCoord))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Convert.ToUInt32(textBoxXNumber.Text) != 0)
|
||||
{
|
||||
if (!Validation.ValidateLength(textBoxXSpacing, "Spacing", false) ||
|
||||
!Validation.ValidateLabel(textBoxXFirstLabel, m_data.LabelsList))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (Convert.ToUInt32(textBoxYNumber.Text) != 0)
|
||||
{
|
||||
if (!Validation.ValidateLength(textBoxYSpacing, "Spacing", false) ||
|
||||
!Validation.ValidateLabel(textBoxYFirstLabel, m_data.LabelsList))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (Convert.ToUInt32(textBoxXNumber.Text) != 0 && Convert.ToUInt32(textBoxYNumber.Text) != 0)
|
||||
{
|
||||
if (!Validation.ValidateLabels(textBoxXFirstLabel, textBoxYFirstLabel))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,558 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Application = Autodesk.Revit.ApplicationServices.Application;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// The dialog which provides the options of creating radial and arc grids
|
||||
/// </summary>
|
||||
public class CreateRadialAndArcGridsData : CreateGridsData
|
||||
{
|
||||
#region Fields
|
||||
// X coordinate of origin
|
||||
private double m_xOrigin;
|
||||
// Y coordinate of origin
|
||||
private double m_yOrigin;
|
||||
// Start degree of arc grids and radial grids
|
||||
private double m_startDegree;
|
||||
// End degree of arc grids and radial grids
|
||||
private double m_endDegree;
|
||||
// Spacing between arc grids
|
||||
private double m_arcSpacing;
|
||||
// Number of arc grids
|
||||
private uint m_arcNumber;
|
||||
// Number of radial grids
|
||||
private uint m_lineNumber;
|
||||
// Radius of first arc grid
|
||||
private double m_arcFirstRadius;
|
||||
// Distance from origin to start point
|
||||
private double m_LineFirstDistance;
|
||||
// Bubble location of arc grids
|
||||
private BubbleLocation m_arcFirstBubbleLoc;
|
||||
// Bubble location of radial grids
|
||||
private BubbleLocation m_lineFirstBubbleLoc;
|
||||
// Label of first arc grid
|
||||
private String m_arcFirstLabel;
|
||||
// Label of first radial grid
|
||||
private String m_lineFirstLabel;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// X coordinate of origin
|
||||
/// </summary>
|
||||
public double XOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_xOrigin;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_xOrigin = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Y coordinate of origin
|
||||
/// </summary>
|
||||
public double YOrigin
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_yOrigin;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_yOrigin = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start degree of arc grids and radial grids
|
||||
/// </summary>
|
||||
public double StartDegree
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_startDegree;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_startDegree = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// End degree of arc grids and radial grids
|
||||
/// </summary>
|
||||
public double EndDegree
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_endDegree;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_endDegree = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Spacing between arc grids
|
||||
/// </summary>
|
||||
public double ArcSpacing
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_arcSpacing;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_arcSpacing = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Number of arc grids
|
||||
/// </summary>
|
||||
public uint ArcNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_arcNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_arcNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Number of radial grids
|
||||
/// </summary>
|
||||
public uint LineNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_lineNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_lineNumber = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Radius of first arc grid
|
||||
/// </summary>
|
||||
public double ArcFirstRadius
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_arcFirstRadius;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_arcFirstRadius = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Distance from origin to start point
|
||||
/// </summary>
|
||||
public double LineFirstDistance
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_LineFirstDistance;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_LineFirstDistance = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bubble location of arc grids
|
||||
/// </summary>
|
||||
public BubbleLocation ArcFirstBubbleLoc
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_arcFirstBubbleLoc;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_arcFirstBubbleLoc = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bubble location of radial grids
|
||||
/// </summary>
|
||||
public BubbleLocation LineFirstBubbleLoc
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_lineFirstBubbleLoc;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_lineFirstBubbleLoc = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Label of first arc grid
|
||||
/// </summary>
|
||||
public String ArcFirstLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_arcFirstLabel;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_arcFirstLabel = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Label of first radial grid
|
||||
/// </summary>
|
||||
public String LineFirstLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_lineFirstLabel;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_lineFirstLabel = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="application">Application object</param>
|
||||
/// <param name="unit">Current length display unit type</param>
|
||||
/// <param name="labels">All existing labels in Revit's document</param>
|
||||
public CreateRadialAndArcGridsData(UIApplication application, ForgeTypeId unit, ArrayList labels)
|
||||
: base(application, labels, unit)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create grids
|
||||
/// </summary>
|
||||
public void CreateGrids()
|
||||
{
|
||||
if (CreateRadialGrids() != 0)
|
||||
{
|
||||
String failureReason = resManager.GetString("FailedToCreateRadialGrids") + "\r";
|
||||
failureReason += resManager.GetString("AjustValues");
|
||||
|
||||
ShowMessage(failureReason, resManager.GetString("FailureCaptionCreateGrids"));
|
||||
}
|
||||
|
||||
ArrayList failureReasons = new ArrayList();
|
||||
if (CreateArcGrids(ref failureReasons) != 0)
|
||||
{
|
||||
String failureReason = resManager.GetString("FailedToCreateArcGrids") +
|
||||
resManager.GetString("Reasons") + "\r";
|
||||
if (failureReasons.Count != 0)
|
||||
{
|
||||
failureReason += "\r";
|
||||
foreach (String reason in failureReasons)
|
||||
{
|
||||
failureReason += reason + "\r";
|
||||
}
|
||||
}
|
||||
failureReason += "\r" + resManager.GetString("AjustValues");
|
||||
|
||||
ShowMessage(failureReason, resManager.GetString("FailureCaptionCreateGrids"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create radial grids
|
||||
/// </summary>
|
||||
/// <returns>Number of grids failed to create</returns>
|
||||
private int CreateRadialGrids()
|
||||
{
|
||||
int errorCount = 0;
|
||||
|
||||
// Curve array which stores all curves for batch creation
|
||||
CurveArray curves = new CurveArray();
|
||||
|
||||
for (int i = 0; i < m_lineNumber; ++i)
|
||||
{
|
||||
try
|
||||
{
|
||||
double angel;
|
||||
if (m_lineNumber == 1)
|
||||
{
|
||||
angel = (m_startDegree + m_endDegree) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
// The number of space between radial grids will be m_lineNumber if arc is a circle
|
||||
if (m_endDegree - m_startDegree == 2 * Values.PI)
|
||||
{
|
||||
angel = m_startDegree + i * (m_endDegree - m_startDegree) / m_lineNumber;
|
||||
}
|
||||
// The number of space between radial grids will be m_lineNumber-1 if arc is not a circle
|
||||
else
|
||||
{
|
||||
angel = m_startDegree + i * (m_endDegree - m_startDegree) / (m_lineNumber - 1);
|
||||
}
|
||||
}
|
||||
|
||||
Autodesk.Revit.DB.XYZ startPoint;
|
||||
Autodesk.Revit.DB.XYZ endPoint;
|
||||
double cos = Math.Cos(angel);
|
||||
double sin = Math.Sin(angel);
|
||||
|
||||
if (m_arcNumber != 0)
|
||||
{
|
||||
// Grids will have an extension distance of m_ySpacing / 2
|
||||
startPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + m_LineFirstDistance * cos, m_yOrigin + m_LineFirstDistance * sin, 0);
|
||||
endPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + (m_arcFirstRadius + (m_arcNumber - 1) * m_arcSpacing + m_arcSpacing / 2) * cos,
|
||||
m_yOrigin + (m_arcFirstRadius + (m_arcNumber - 1) * m_arcSpacing + m_arcSpacing / 2) * sin, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
startPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + m_LineFirstDistance * cos, m_yOrigin + m_LineFirstDistance * sin, 0);
|
||||
endPoint = new Autodesk.Revit.DB.XYZ (m_xOrigin + (m_arcFirstRadius + 5) * cos, m_yOrigin + (m_arcFirstRadius + 5) * sin, 0);
|
||||
}
|
||||
|
||||
Line line;
|
||||
// Create a line according to the bubble location
|
||||
if (m_lineFirstBubbleLoc == BubbleLocation.StartPoint)
|
||||
{
|
||||
line = NewLine(startPoint, endPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
line = NewLine(endPoint, startPoint);
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
// Create grid with line
|
||||
Grid grid = NewGrid(line);
|
||||
|
||||
try
|
||||
{
|
||||
// Set label of first radial grid
|
||||
grid.Name = m_lineFirstLabel;
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToSetLabel") + m_lineFirstLabel + "!",
|
||||
resManager.GetString("FailureCaptionSetLabel"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add the line to curve array
|
||||
AddCurveForBatchCreation(ref curves, line);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
++errorCount;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Create grids with curves
|
||||
CreateGrids(curves);
|
||||
|
||||
return errorCount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create Arc Grids
|
||||
/// </summary>
|
||||
/// <param name="failureReasons">ArrayList contains failure reasons</param>
|
||||
/// <returns>Number of grids failed to create</returns>
|
||||
private int CreateArcGrids(ref ArrayList failureReasons)
|
||||
{
|
||||
int errorCount = 0;
|
||||
|
||||
// Curve array which stores all curves for batch creation
|
||||
CurveArray curves = new CurveArray();
|
||||
|
||||
for (int i = 0; i < m_arcNumber; ++i)
|
||||
{
|
||||
try
|
||||
{
|
||||
Autodesk.Revit.DB.XYZ origin = new Autodesk.Revit.DB.XYZ (m_xOrigin, m_yOrigin, 0);
|
||||
double radius = m_arcFirstRadius + i * m_arcSpacing;
|
||||
|
||||
// In Revit UI user can select a circle to create a grid, but actually two grids
|
||||
// (One from 0 to 180 degree and the other from 180 degree to 360) will be created.
|
||||
// In RevitAPI using NewGrid method with a circle as its argument will raise an exception.
|
||||
// Therefore in this sample we will create two arcs from the upper and lower parts of the
|
||||
// circle, and then create two grids on the base of the two arcs to accord with UI.
|
||||
if (m_endDegree - m_startDegree == 2 * Values.PI) // Create circular grids
|
||||
{
|
||||
Arc upperArcToCreate;
|
||||
Arc lowerArcToCreate;
|
||||
upperArcToCreate = TransformArc(origin, radius, 0, Values.PI, m_arcFirstBubbleLoc);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
Grid gridUpper;
|
||||
gridUpper = NewGrid(upperArcToCreate);
|
||||
if (gridUpper != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Set label of first grid
|
||||
gridUpper.Name = m_arcFirstLabel;
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToSetLabel") + m_arcFirstLabel + "!",
|
||||
resManager.GetString("FailureCaptionSetLabel"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
curves.Append(upperArcToCreate);
|
||||
}
|
||||
|
||||
lowerArcToCreate = TransformArc(origin, radius, Values.PI, 2 * Values.PI, m_arcFirstBubbleLoc);
|
||||
curves.Append(lowerArcToCreate);
|
||||
}
|
||||
else // Create arc grids
|
||||
{
|
||||
// Each arc grid will has extension degree of 15 degree
|
||||
double extensionDegree = 15 * Values.DEGTORAD;
|
||||
Grid grid;
|
||||
Arc arcToCreate;
|
||||
|
||||
if (m_lineNumber != 0)
|
||||
{
|
||||
// If the range of arc degree is too close to a circle, the arc grids will not have
|
||||
// extension degrees.
|
||||
// Also the room for bubble should be considered, so a room size of 3 * extensionDegree
|
||||
// is reserved here
|
||||
if (m_endDegree - m_startDegree < 2 * Values.PI - 3 * extensionDegree)
|
||||
{
|
||||
double startDegreeWithExtension = m_startDegree - extensionDegree;
|
||||
double endDegreeWithExtension = m_endDegree + extensionDegree;
|
||||
|
||||
arcToCreate = TransformArc(origin, radius, startDegreeWithExtension, endDegreeWithExtension, m_arcFirstBubbleLoc);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
arcToCreate = TransformArc(origin, radius, m_startDegree, m_endDegree, m_arcFirstBubbleLoc);
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
String failureReason = resManager.GetString("EndPointsTooClose");
|
||||
if (!failureReasons.Contains(failureReason))
|
||||
{
|
||||
failureReasons.Add(failureReason);
|
||||
}
|
||||
errorCount++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
arcToCreate = TransformArc(origin, radius, m_startDegree, m_endDegree, m_arcFirstBubbleLoc);
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
String failureReason = resManager.GetString("EndPointsTooClose");
|
||||
if (!failureReasons.Contains(failureReason))
|
||||
{
|
||||
failureReasons.Add(failureReason);
|
||||
}
|
||||
errorCount++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
grid = NewGrid(arcToCreate);
|
||||
if (grid != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
grid.Name = m_arcFirstLabel;
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToSetLabel") + m_arcFirstLabel + "!",
|
||||
resManager.GetString("FailureCaptionSetLabel"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
curves.Append(arcToCreate);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
++errorCount;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Create grids with curves
|
||||
CreateGrids(curves);
|
||||
|
||||
return errorCount;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,546 @@
|
||||
//
|
||||
// (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.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// The dialog which provides the options of creating radial and arc grids
|
||||
/// </summary>
|
||||
partial class CreateRadialAndArcGridsForm
|
||||
{
|
||||
/// <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.textBoxArcSpacing = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.labelUnitFirstRadius = new System.Windows.Forms.Label();
|
||||
this.labelUnitX = new System.Windows.Forms.Label();
|
||||
this.textBoxArcFirstRadius = new System.Windows.Forms.TextBox();
|
||||
this.comboBoxArcBubbleLocation = new System.Windows.Forms.ComboBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.textBoxArcFirstLabel = new System.Windows.Forms.TextBox();
|
||||
this.textBoxArcNumber = new System.Windows.Forms.TextBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.textBoxYCoord = new System.Windows.Forms.TextBox();
|
||||
this.textBoxXCoord = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.labelUnitY = new System.Windows.Forms.Label();
|
||||
this.textBoxLineFirstDistance = new System.Windows.Forms.TextBox();
|
||||
this.comboBoxLineBubbleLocation = new System.Windows.Forms.ComboBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.textBoxLineNumber = new System.Windows.Forms.TextBox();
|
||||
this.textBoxLineFirstLabel = new System.Windows.Forms.TextBox();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.labelYCoordUnit = new System.Windows.Forms.Label();
|
||||
this.labelXCoordUnit = new System.Windows.Forms.Label();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonCreate = new System.Windows.Forms.Button();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.textBoxEndDegree = new System.Windows.Forms.TextBox();
|
||||
this.textBoxStartDegree = new System.Windows.Forms.TextBox();
|
||||
this.labelEndDegree = new System.Windows.Forms.Label();
|
||||
this.labelStartDegree = new System.Windows.Forms.Label();
|
||||
this.radioButtonCustomize = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton360 = new System.Windows.Forms.RadioButton();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// textBoxArcSpacing
|
||||
//
|
||||
this.textBoxArcSpacing.Location = new System.Drawing.Point(132, 17);
|
||||
this.textBoxArcSpacing.Name = "textBoxArcSpacing";
|
||||
this.textBoxArcSpacing.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxArcSpacing.TabIndex = 0;
|
||||
this.textBoxArcSpacing.Tag = "10.0";
|
||||
this.textBoxArcSpacing.Text = 10.0.ToString("0.0");
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.Location = new System.Drawing.Point(13, 20);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(113, 18);
|
||||
this.label6.TabIndex = 6;
|
||||
this.label6.Text = "Spacing:";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.labelUnitFirstRadius);
|
||||
this.groupBox3.Controls.Add(this.labelUnitX);
|
||||
this.groupBox3.Controls.Add(this.textBoxArcFirstRadius);
|
||||
this.groupBox3.Controls.Add(this.comboBoxArcBubbleLocation);
|
||||
this.groupBox3.Controls.Add(this.label10);
|
||||
this.groupBox3.Controls.Add(this.textBoxArcFirstLabel);
|
||||
this.groupBox3.Controls.Add(this.textBoxArcNumber);
|
||||
this.groupBox3.Controls.Add(this.label9);
|
||||
this.groupBox3.Controls.Add(this.textBoxArcSpacing);
|
||||
this.groupBox3.Controls.Add(this.label5);
|
||||
this.groupBox3.Controls.Add(this.label3);
|
||||
this.groupBox3.Controls.Add(this.label6);
|
||||
this.groupBox3.Location = new System.Drawing.Point(12, 175);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(544, 116);
|
||||
this.groupBox3.TabIndex = 2;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Arc Grids";
|
||||
//
|
||||
// labelUnitFirstRadius
|
||||
//
|
||||
this.labelUnitFirstRadius.Location = new System.Drawing.Point(240, 52);
|
||||
this.labelUnitFirstRadius.Name = "labelUnitFirstRadius";
|
||||
this.labelUnitFirstRadius.Size = new System.Drawing.Size(23, 23);
|
||||
this.labelUnitFirstRadius.TabIndex = 31;
|
||||
//
|
||||
// labelUnitX
|
||||
//
|
||||
this.labelUnitX.Location = new System.Drawing.Point(240, 20);
|
||||
this.labelUnitX.Name = "labelUnitX";
|
||||
this.labelUnitX.Size = new System.Drawing.Size(23, 23);
|
||||
this.labelUnitX.TabIndex = 13;
|
||||
//
|
||||
// textBoxArcFirstRadius
|
||||
//
|
||||
this.textBoxArcFirstRadius.Location = new System.Drawing.Point(132, 50);
|
||||
this.textBoxArcFirstRadius.Name = "textBoxArcFirstRadius";
|
||||
this.textBoxArcFirstRadius.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxArcFirstRadius.TabIndex = 2;
|
||||
this.textBoxArcFirstRadius.Text = 10.0.ToString("0.0");
|
||||
//
|
||||
// comboBoxArcBubbleLocation
|
||||
//
|
||||
this.comboBoxArcBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxArcBubbleLocation.FormattingEnabled = true;
|
||||
this.comboBoxArcBubbleLocation.Items.AddRange(new object[] {
|
||||
"At start point of arcs",
|
||||
"At end point of arcs"});
|
||||
this.comboBoxArcBubbleLocation.Location = new System.Drawing.Point(133, 83);
|
||||
this.comboBoxArcBubbleLocation.Name = "comboBoxArcBubbleLocation";
|
||||
this.comboBoxArcBubbleLocation.Size = new System.Drawing.Size(373, 21);
|
||||
this.comboBoxArcBubbleLocation.TabIndex = 4;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.Location = new System.Drawing.Point(13, 52);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(113, 18);
|
||||
this.label10.TabIndex = 7;
|
||||
this.label10.Text = "Radius of first grid:";
|
||||
//
|
||||
// textBoxArcFirstLabel
|
||||
//
|
||||
this.textBoxArcFirstLabel.Location = new System.Drawing.Point(398, 50);
|
||||
this.textBoxArcFirstLabel.Name = "textBoxArcFirstLabel";
|
||||
this.textBoxArcFirstLabel.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxArcFirstLabel.TabIndex = 3;
|
||||
this.textBoxArcFirstLabel.Tag = "";
|
||||
this.textBoxArcFirstLabel.Text = "1";
|
||||
//
|
||||
// textBoxArcNumber
|
||||
//
|
||||
this.textBoxArcNumber.Location = new System.Drawing.Point(398, 17);
|
||||
this.textBoxArcNumber.Name = "textBoxArcNumber";
|
||||
this.textBoxArcNumber.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxArcNumber.TabIndex = 1;
|
||||
this.textBoxArcNumber.Text = "3";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.Location = new System.Drawing.Point(279, 52);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(113, 18);
|
||||
this.label9.TabIndex = 30;
|
||||
this.label9.Text = "Label of first grid:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Location = new System.Drawing.Point(13, 85);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(113, 18);
|
||||
this.label5.TabIndex = 29;
|
||||
this.label5.Text = "Bubble location:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Location = new System.Drawing.Point(279, 20);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(113, 18);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "Number:";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Location = new System.Drawing.Point(279, 23);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(113, 18);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "Number:";
|
||||
//
|
||||
// textBoxYCoord
|
||||
//
|
||||
this.textBoxYCoord.Location = new System.Drawing.Point(398, 22);
|
||||
this.textBoxYCoord.Name = "textBoxYCoord";
|
||||
this.textBoxYCoord.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxYCoord.TabIndex = 1;
|
||||
this.textBoxYCoord.Text = "0";
|
||||
//
|
||||
// textBoxXCoord
|
||||
//
|
||||
this.textBoxXCoord.Location = new System.Drawing.Point(132, 21);
|
||||
this.textBoxXCoord.Name = "textBoxXCoord";
|
||||
this.textBoxXCoord.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxXCoord.TabIndex = 0;
|
||||
this.textBoxXCoord.Text = "0";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Location = new System.Drawing.Point(279, 25);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(113, 18);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Y coordinate:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(13, 25);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(112, 18);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "X coordinate:";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.labelUnitY);
|
||||
this.groupBox2.Controls.Add(this.textBoxLineFirstDistance);
|
||||
this.groupBox2.Controls.Add(this.comboBoxLineBubbleLocation);
|
||||
this.groupBox2.Controls.Add(this.label11);
|
||||
this.groupBox2.Controls.Add(this.textBoxLineNumber);
|
||||
this.groupBox2.Controls.Add(this.textBoxLineFirstLabel);
|
||||
this.groupBox2.Controls.Add(this.label13);
|
||||
this.groupBox2.Controls.Add(this.label4);
|
||||
this.groupBox2.Controls.Add(this.label12);
|
||||
this.groupBox2.Location = new System.Drawing.Point(13, 297);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(543, 119);
|
||||
this.groupBox2.TabIndex = 3;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Radial Grids";
|
||||
//
|
||||
// labelUnitY
|
||||
//
|
||||
this.labelUnitY.Location = new System.Drawing.Point(508, 88);
|
||||
this.labelUnitY.Name = "labelUnitY";
|
||||
this.labelUnitY.Size = new System.Drawing.Size(23, 23);
|
||||
this.labelUnitY.TabIndex = 13;
|
||||
//
|
||||
// textBoxLineFirstDistance
|
||||
//
|
||||
this.textBoxLineFirstDistance.Location = new System.Drawing.Point(236, 86);
|
||||
this.textBoxLineFirstDistance.Name = "textBoxLineFirstDistance";
|
||||
this.textBoxLineFirstDistance.Size = new System.Drawing.Size(270, 20);
|
||||
this.textBoxLineFirstDistance.TabIndex = 3;
|
||||
this.textBoxLineFirstDistance.Text = 8.0.ToString("0.0");
|
||||
//
|
||||
// comboBoxLineBubbleLocation
|
||||
//
|
||||
this.comboBoxLineBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxLineBubbleLocation.FormattingEnabled = true;
|
||||
this.comboBoxLineBubbleLocation.Items.AddRange(new object[] {
|
||||
"At start point of lines",
|
||||
"At end point of lines"});
|
||||
this.comboBoxLineBubbleLocation.Location = new System.Drawing.Point(131, 54);
|
||||
this.comboBoxLineBubbleLocation.Name = "comboBoxLineBubbleLocation";
|
||||
this.comboBoxLineBubbleLocation.Size = new System.Drawing.Size(374, 21);
|
||||
this.comboBoxLineBubbleLocation.TabIndex = 2;
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.Location = new System.Drawing.Point(6, 88);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(224, 18);
|
||||
this.label11.TabIndex = 7;
|
||||
this.label11.Text = "Distance from origin to start point:";
|
||||
//
|
||||
// textBoxLineNumber
|
||||
//
|
||||
this.textBoxLineNumber.Location = new System.Drawing.Point(398, 23);
|
||||
this.textBoxLineNumber.Name = "textBoxLineNumber";
|
||||
this.textBoxLineNumber.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxLineNumber.TabIndex = 1;
|
||||
this.textBoxLineNumber.Tag = "3";
|
||||
this.textBoxLineNumber.Text = "3";
|
||||
//
|
||||
// textBoxLineFirstLabel
|
||||
//
|
||||
this.textBoxLineFirstLabel.Location = new System.Drawing.Point(131, 20);
|
||||
this.textBoxLineFirstLabel.Name = "textBoxLineFirstLabel";
|
||||
this.textBoxLineFirstLabel.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxLineFirstLabel.TabIndex = 0;
|
||||
this.textBoxLineFirstLabel.Tag = "A";
|
||||
this.textBoxLineFirstLabel.Text = "A";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.Location = new System.Drawing.Point(6, 23);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(119, 18);
|
||||
this.label13.TabIndex = 30;
|
||||
this.label13.Text = "Label of first grid:";
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.Location = new System.Drawing.Point(6, 57);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(119, 18);
|
||||
this.label12.TabIndex = 29;
|
||||
this.label12.Text = "Bubble location:";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.textBoxYCoord);
|
||||
this.groupBox1.Controls.Add(this.labelYCoordUnit);
|
||||
this.groupBox1.Controls.Add(this.labelXCoordUnit);
|
||||
this.groupBox1.Controls.Add(this.textBoxXCoord);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(13, 12);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(543, 55);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Center of Arc Grids";
|
||||
//
|
||||
// labelYCoordUnit
|
||||
//
|
||||
this.labelYCoordUnit.Location = new System.Drawing.Point(508, 22);
|
||||
this.labelYCoordUnit.Name = "labelYCoordUnit";
|
||||
this.labelYCoordUnit.Size = new System.Drawing.Size(23, 23);
|
||||
this.labelYCoordUnit.TabIndex = 13;
|
||||
//
|
||||
// labelXCoordUnit
|
||||
//
|
||||
this.labelXCoordUnit.Location = new System.Drawing.Point(240, 24);
|
||||
this.labelXCoordUnit.Name = "labelXCoordUnit";
|
||||
this.labelXCoordUnit.Size = new System.Drawing.Size(23, 23);
|
||||
this.labelXCoordUnit.TabIndex = 13;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(463, 436);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(94, 23);
|
||||
this.buttonCancel.TabIndex = 5;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonCreate
|
||||
//
|
||||
this.buttonCreate.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonCreate.Location = new System.Drawing.Point(356, 436);
|
||||
this.buttonCreate.Name = "buttonCreate";
|
||||
this.buttonCreate.Size = new System.Drawing.Size(94, 23);
|
||||
this.buttonCreate.TabIndex = 4;
|
||||
this.buttonCreate.Text = "Create &Grids";
|
||||
this.buttonCreate.UseVisualStyleBackColor = true;
|
||||
this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click);
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.textBoxEndDegree);
|
||||
this.groupBox4.Controls.Add(this.textBoxStartDegree);
|
||||
this.groupBox4.Controls.Add(this.labelEndDegree);
|
||||
this.groupBox4.Controls.Add(this.labelStartDegree);
|
||||
this.groupBox4.Controls.Add(this.radioButtonCustomize);
|
||||
this.groupBox4.Controls.Add(this.radioButton360);
|
||||
this.groupBox4.Location = new System.Drawing.Point(13, 74);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(543, 95);
|
||||
this.groupBox4.TabIndex = 1;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Span of Grids";
|
||||
//
|
||||
// textBoxEndDegree
|
||||
//
|
||||
this.textBoxEndDegree.Location = new System.Drawing.Point(397, 62);
|
||||
this.textBoxEndDegree.Name = "textBoxEndDegree";
|
||||
this.textBoxEndDegree.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxEndDegree.TabIndex = 3;
|
||||
this.textBoxEndDegree.Text = "360";
|
||||
//
|
||||
// textBoxStartDegree
|
||||
//
|
||||
this.textBoxStartDegree.Location = new System.Drawing.Point(131, 62);
|
||||
this.textBoxStartDegree.Name = "textBoxStartDegree";
|
||||
this.textBoxStartDegree.Size = new System.Drawing.Size(108, 20);
|
||||
this.textBoxStartDegree.TabIndex = 2;
|
||||
this.textBoxStartDegree.Text = "0";
|
||||
//
|
||||
// labelEndDegree
|
||||
//
|
||||
this.labelEndDegree.Location = new System.Drawing.Point(279, 64);
|
||||
this.labelEndDegree.Name = "labelEndDegree";
|
||||
this.labelEndDegree.Size = new System.Drawing.Size(113, 18);
|
||||
this.labelEndDegree.TabIndex = 2;
|
||||
this.labelEndDegree.Text = "End degree:";
|
||||
//
|
||||
// labelStartDegree
|
||||
//
|
||||
this.labelStartDegree.Location = new System.Drawing.Point(24, 64);
|
||||
this.labelStartDegree.Name = "labelStartDegree";
|
||||
this.labelStartDegree.Size = new System.Drawing.Size(101, 18);
|
||||
this.labelStartDegree.TabIndex = 2;
|
||||
this.labelStartDegree.Text = "Start degree:";
|
||||
//
|
||||
// radioButtonCustomize
|
||||
//
|
||||
this.radioButtonCustomize.Location = new System.Drawing.Point(9, 41);
|
||||
this.radioButtonCustomize.Name = "radioButtonCustomize";
|
||||
this.radioButtonCustomize.Size = new System.Drawing.Size(104, 24);
|
||||
this.radioButtonCustomize.TabIndex = 1;
|
||||
this.radioButtonCustomize.Text = "Customize";
|
||||
this.radioButtonCustomize.UseVisualStyleBackColor = true;
|
||||
this.radioButtonCustomize.CheckedChanged += new System.EventHandler(this.radioButtonCustomize_CheckedChanged);
|
||||
//
|
||||
// radioButton360
|
||||
//
|
||||
this.radioButton360.AutoSize = true;
|
||||
this.radioButton360.Checked = true;
|
||||
this.radioButton360.Location = new System.Drawing.Point(9, 20);
|
||||
this.radioButton360.Name = "radioButton360";
|
||||
this.radioButton360.Size = new System.Drawing.Size(79, 17);
|
||||
this.radioButton360.TabIndex = 0;
|
||||
this.radioButton360.TabStop = true;
|
||||
this.radioButton360.Text = "360 degree";
|
||||
this.radioButton360.UseVisualStyleBackColor = true;
|
||||
this.radioButton360.MouseClick += new System.Windows.Forms.MouseEventHandler(this.radioButton360_MouseClick);
|
||||
//
|
||||
// CreateRadialAndArcGridsForm
|
||||
//
|
||||
this.AcceptButton = this.buttonCreate;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(568, 466);
|
||||
this.Controls.Add(this.groupBox4);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonCreate);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CreateRadialAndArcGridsForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Create Radial and Arc Grids";
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.groupBox4.ResumeLayout(false);
|
||||
this.groupBox4.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox textBoxArcSpacing;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox textBoxYCoord;
|
||||
private System.Windows.Forms.TextBox textBoxXCoord;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.TextBox textBoxLineNumber;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox textBoxArcNumber;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonCreate;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.TextBox textBoxEndDegree;
|
||||
private System.Windows.Forms.TextBox textBoxStartDegree;
|
||||
private System.Windows.Forms.Label labelEndDegree;
|
||||
private System.Windows.Forms.Label labelStartDegree;
|
||||
private System.Windows.Forms.RadioButton radioButtonCustomize;
|
||||
private System.Windows.Forms.RadioButton radioButton360;
|
||||
private System.Windows.Forms.TextBox textBoxArcFirstRadius;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.TextBox textBoxLineFirstDistance;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.ComboBox comboBoxArcBubbleLocation;
|
||||
private System.Windows.Forms.TextBox textBoxArcFirstLabel;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.ComboBox comboBoxLineBubbleLocation;
|
||||
private System.Windows.Forms.TextBox textBoxLineFirstLabel;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.Label labelUnitX;
|
||||
private System.Windows.Forms.Label labelUnitY;
|
||||
private System.Windows.Forms.Label labelUnitFirstRadius;
|
||||
private System.Windows.Forms.Label labelYCoordUnit;
|
||||
private System.Windows.Forms.Label labelXCoordUnit;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
public partial class CreateRadialAndArcGridsForm : System.Windows.Forms.Form
|
||||
{
|
||||
// data class object
|
||||
private CreateRadialAndArcGridsData m_data;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="data">Data class object</param>
|
||||
public CreateRadialAndArcGridsForm(CreateRadialAndArcGridsData data)
|
||||
{
|
||||
m_data = data;
|
||||
|
||||
InitializeComponent();
|
||||
// Set state of controls
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set state of controls
|
||||
/// </summary>
|
||||
private void InitializeControls()
|
||||
{
|
||||
// Set length unit related labels
|
||||
String unit = Properties.Resources.ResourceManager.GetString(m_data.Unit.TypeId);
|
||||
labelUnitX.Text = unit;
|
||||
labelUnitY.Text = unit;
|
||||
labelUnitFirstRadius.Text = unit;
|
||||
labelXCoordUnit.Text = unit;
|
||||
labelYCoordUnit.Text = unit;
|
||||
|
||||
// Set length values
|
||||
textBoxArcSpacing.Text = Unit.CovertFromAPI(m_data.Unit, 10).ToString();
|
||||
textBoxArcFirstRadius.Text = textBoxArcSpacing.Text;
|
||||
textBoxLineFirstDistance.Text = Unit.CovertFromAPI(m_data.Unit, 8).ToString();
|
||||
|
||||
radioButton360.Checked = true;
|
||||
radioButtonCustomize.Checked = false;
|
||||
labelStartDegree.Enabled = false;
|
||||
textBoxStartDegree.Enabled = false;
|
||||
labelEndDegree.Enabled = false;
|
||||
textBoxEndDegree.Enabled = false;
|
||||
comboBoxArcBubbleLocation.SelectedIndex = 1;
|
||||
comboBoxLineBubbleLocation.SelectedIndex = 1;
|
||||
}
|
||||
|
||||
private void radioButtonCustomize_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
bool IsCustomize = radioButtonCustomize.Checked;
|
||||
labelStartDegree.Enabled = IsCustomize;
|
||||
textBoxStartDegree.Enabled = IsCustomize;
|
||||
labelEndDegree.Enabled = IsCustomize;
|
||||
textBoxEndDegree.Enabled = IsCustomize;
|
||||
}
|
||||
|
||||
private void radioButton360_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
radioButtonCustomize.Checked = !radioButton360.Checked;
|
||||
}
|
||||
|
||||
private void buttonCreate_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Check if input are validated
|
||||
if (ValidateValues())
|
||||
{
|
||||
// Transfer data back into data class
|
||||
SetData();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.DialogResult = DialogResult.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer data back into data class
|
||||
/// </summary>
|
||||
private void SetData()
|
||||
{
|
||||
m_data.XOrigin = Unit.CovertToAPI(Convert.ToDouble(textBoxXCoord.Text), m_data.Unit);
|
||||
m_data.YOrigin = Unit.CovertToAPI(Convert.ToDouble(textBoxYCoord.Text), m_data.Unit);
|
||||
|
||||
if (radioButton360.Checked)
|
||||
{
|
||||
m_data.StartDegree = 0;
|
||||
m_data.EndDegree = 2 * Values.PI;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_data.StartDegree = Convert.ToDouble(textBoxStartDegree.Text) * Values.DEGTORAD;
|
||||
m_data.EndDegree = Convert.ToDouble(textBoxEndDegree.Text) * Values.DEGTORAD;
|
||||
}
|
||||
|
||||
m_data.ArcNumber = Convert.ToUInt32(textBoxArcNumber.Text);
|
||||
m_data.LineNumber = Convert.ToUInt32(textBoxLineNumber.Text);
|
||||
|
||||
|
||||
if (Convert.ToUInt32(textBoxArcNumber.Text) != 0)
|
||||
{
|
||||
m_data.ArcSpacing = Unit.CovertToAPI(Convert.ToDouble(textBoxArcSpacing.Text), m_data.Unit);
|
||||
m_data.ArcFirstRadius = Unit.CovertToAPI(Convert.ToDouble(textBoxArcFirstRadius.Text), m_data.Unit);
|
||||
m_data.ArcFirstBubbleLoc = (BubbleLocation)comboBoxArcBubbleLocation.SelectedIndex;
|
||||
m_data.ArcFirstLabel = textBoxArcFirstLabel.Text;
|
||||
}
|
||||
|
||||
if (Convert.ToUInt32(textBoxLineNumber.Text) != 0)
|
||||
{
|
||||
m_data.LineFirstDistance = Unit.CovertToAPI(Convert.ToDouble(textBoxLineFirstDistance.Text), m_data.Unit);
|
||||
m_data.LineFirstBubbleLoc = (BubbleLocation)comboBoxLineBubbleLocation.SelectedIndex;
|
||||
m_data.LineFirstLabel = textBoxLineFirstLabel.Text;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if input are validated
|
||||
/// </summary>
|
||||
/// <returns>Whether input is validated</returns>
|
||||
private bool ValidateValues()
|
||||
{
|
||||
if (!Validation.ValidateNumbers(textBoxArcNumber, textBoxLineNumber))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Validation.ValidateCoord(textBoxXCoord) || !Validation.ValidateCoord(textBoxYCoord))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Convert.ToUInt32(textBoxArcNumber.Text) != 0)
|
||||
{
|
||||
if (!Validation.ValidateLength(textBoxArcSpacing, "Spacing", false) ||
|
||||
!Validation.ValidateLength(textBoxArcFirstRadius, "Radius", false) ||
|
||||
!Validation.ValidateLabel(textBoxArcFirstLabel, m_data.LabelsList))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (Convert.ToUInt32(textBoxLineNumber.Text) != 0)
|
||||
{
|
||||
if (!Validation.ValidateLength(textBoxLineFirstDistance, "Distance", true) ||
|
||||
!Validation.ValidateLabel(textBoxLineFirstLabel, m_data.LabelsList))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (Convert.ToUInt32(textBoxArcNumber.Text) != 0 && Convert.ToUInt32(textBoxLineNumber.Text) != 0)
|
||||
{
|
||||
if (!Validation.ValidateLabels(textBoxArcFirstLabel, textBoxLineFirstLabel))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (radioButtonCustomize.Checked)
|
||||
{
|
||||
if (!Validation.ValidateDegrees(textBoxStartDegree, textBoxEndDegree))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,183 @@
|
||||
//
|
||||
// (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.GridCreation.CS
|
||||
{
|
||||
partial class CreateWithSelectedCurvesForm
|
||||
{
|
||||
/// <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.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.textBoxFirstLabel = new System.Windows.Forms.TextBox();
|
||||
this.comboBoxBubbleLocation = new System.Windows.Forms.ComboBox();
|
||||
this.labelBubbleLocation = new System.Windows.Forms.Label();
|
||||
this.labelFirstLabel = new System.Windows.Forms.Label();
|
||||
this.groupBoxGridSettings = new System.Windows.Forms.GroupBox();
|
||||
this.checkBoxDeleteElements = new System.Windows.Forms.CheckBox();
|
||||
this.groupBoxGridSettings.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(232, 144);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(90, 23);
|
||||
this.buttonCancel.TabIndex = 1;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonOK.Location = new System.Drawing.Point(126, 144);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(90, 23);
|
||||
this.buttonOK.TabIndex = 0;
|
||||
this.buttonOK.Text = "Create &Grids";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// textBoxFirstLabel
|
||||
//
|
||||
this.textBoxFirstLabel.Location = new System.Drawing.Point(124, 53);
|
||||
this.textBoxFirstLabel.Name = "textBoxFirstLabel";
|
||||
this.textBoxFirstLabel.Size = new System.Drawing.Size(171, 20);
|
||||
this.textBoxFirstLabel.TabIndex = 1;
|
||||
this.textBoxFirstLabel.Tag = "";
|
||||
this.textBoxFirstLabel.Text = "1";
|
||||
//
|
||||
// comboBoxBubbleLocation
|
||||
//
|
||||
this.comboBoxBubbleLocation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.comboBoxBubbleLocation.FormattingEnabled = true;
|
||||
this.comboBoxBubbleLocation.Items.AddRange(new object[] {
|
||||
"At start point of lines/arcs",
|
||||
"At end point of lines/arcs"});
|
||||
this.comboBoxBubbleLocation.Location = new System.Drawing.Point(124, 19);
|
||||
this.comboBoxBubbleLocation.Name = "comboBoxBubbleLocation";
|
||||
this.comboBoxBubbleLocation.Size = new System.Drawing.Size(171, 21);
|
||||
this.comboBoxBubbleLocation.TabIndex = 0;
|
||||
//
|
||||
// labelBubbleLocation
|
||||
//
|
||||
this.labelBubbleLocation.Location = new System.Drawing.Point(6, 21);
|
||||
this.labelBubbleLocation.Name = "labelBubbleLocation";
|
||||
this.labelBubbleLocation.Size = new System.Drawing.Size(112, 19);
|
||||
this.labelBubbleLocation.TabIndex = 16;
|
||||
this.labelBubbleLocation.Text = "Bubble location:";
|
||||
//
|
||||
// labelFirstLabel
|
||||
//
|
||||
this.labelFirstLabel.Location = new System.Drawing.Point(6, 56);
|
||||
this.labelFirstLabel.Name = "labelFirstLabel";
|
||||
this.labelFirstLabel.Size = new System.Drawing.Size(112, 19);
|
||||
this.labelFirstLabel.TabIndex = 15;
|
||||
this.labelFirstLabel.Text = "Label of first grid:";
|
||||
//
|
||||
// groupBoxGridSettings
|
||||
//
|
||||
this.groupBoxGridSettings.Controls.Add(this.checkBoxDeleteElements);
|
||||
this.groupBoxGridSettings.Controls.Add(this.labelBubbleLocation);
|
||||
this.groupBoxGridSettings.Controls.Add(this.textBoxFirstLabel);
|
||||
this.groupBoxGridSettings.Controls.Add(this.labelFirstLabel);
|
||||
this.groupBoxGridSettings.Controls.Add(this.comboBoxBubbleLocation);
|
||||
this.groupBoxGridSettings.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBoxGridSettings.Name = "groupBoxGridSettings";
|
||||
this.groupBoxGridSettings.Size = new System.Drawing.Size(310, 113);
|
||||
this.groupBoxGridSettings.TabIndex = 18;
|
||||
this.groupBoxGridSettings.TabStop = false;
|
||||
this.groupBoxGridSettings.Text = "Settings";
|
||||
//
|
||||
// checkBoxDeleteElements
|
||||
//
|
||||
this.checkBoxDeleteElements.AutoSize = true;
|
||||
this.checkBoxDeleteElements.Checked = true;
|
||||
this.checkBoxDeleteElements.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxDeleteElements.Location = new System.Drawing.Point(9, 87);
|
||||
this.checkBoxDeleteElements.Name = "checkBoxDeleteElements";
|
||||
this.checkBoxDeleteElements.Size = new System.Drawing.Size(232, 17);
|
||||
this.checkBoxDeleteElements.TabIndex = 2;
|
||||
this.checkBoxDeleteElements.Text = "Delete the selected lines/arcs after creation";
|
||||
this.checkBoxDeleteElements.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// CreateWithSelectedCurvesForm
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(334, 177);
|
||||
this.Controls.Add(this.groupBoxGridSettings);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CreateWithSelectedCurvesForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Create Grids with Lines/Arcs";
|
||||
this.groupBoxGridSettings.ResumeLayout(false);
|
||||
this.groupBoxGridSettings.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.TextBox textBoxFirstLabel;
|
||||
private System.Windows.Forms.ComboBox comboBoxBubbleLocation;
|
||||
private System.Windows.Forms.Label labelBubbleLocation;
|
||||
private System.Windows.Forms.Label labelFirstLabel;
|
||||
private System.Windows.Forms.GroupBox groupBoxGridSettings;
|
||||
private System.Windows.Forms.CheckBox checkBoxDeleteElements;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// The dialog which provides the options of creating grids with selected lines/arcs
|
||||
/// </summary>
|
||||
public partial class CreateWithSelectedCurvesForm : System.Windows.Forms.Form
|
||||
{
|
||||
// data class object
|
||||
private CreateWithSelectedCurvesData m_data;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="data">Data class object</param>
|
||||
public CreateWithSelectedCurvesForm(CreateWithSelectedCurvesData data)
|
||||
{
|
||||
m_data = data;
|
||||
|
||||
InitializeComponent();
|
||||
// Set state of controls
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set state of controls
|
||||
/// </summary>
|
||||
private void InitializeControls()
|
||||
{
|
||||
comboBoxBubbleLocation.SelectedIndex = 1;
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Check if input are validated
|
||||
if (ValidateValues())
|
||||
{
|
||||
// Transfer data back into data class
|
||||
SetData();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.DialogResult = DialogResult.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if input are validated
|
||||
/// </summary>
|
||||
/// <returns>Whether input is validated</returns>
|
||||
private bool ValidateValues()
|
||||
{
|
||||
return Validation.ValidateLabel(textBoxFirstLabel, m_data.LabelsList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer data back into data class
|
||||
/// </summary>
|
||||
private void SetData()
|
||||
{
|
||||
m_data.BubbleLocation = (BubbleLocation)comboBoxBubbleLocation.SelectedIndex;
|
||||
m_data.FirstLabel = textBoxFirstLabel.Text;
|
||||
m_data.DeleteSelectedElements = checkBoxDeleteElements.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,259 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Application = Autodesk.Revit.ApplicationServices.Application;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// The dialog which provides the options of creating grids with selected lines/arcs
|
||||
/// </summary>
|
||||
public class CreateWithSelectedCurvesData : CreateGridsData
|
||||
{
|
||||
#region Fields
|
||||
// Selected curves in current document
|
||||
private CurveArray m_selectedCurves;
|
||||
// Whether to delete selected lines/arc after creation
|
||||
private bool m_deleteSelectedElements;
|
||||
// Label of first grid
|
||||
private String m_firstLabel;
|
||||
// Bubble location of grids
|
||||
private BubbleLocation m_bubbleLocation;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Whether to delete selected lines/arc after creation
|
||||
/// </summary>
|
||||
public bool DeleteSelectedElements
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_deleteSelectedElements;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_deleteSelectedElements = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bubble location of grids
|
||||
/// </summary>
|
||||
public BubbleLocation BubbleLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bubbleLocation;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bubbleLocation = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Label of first grid
|
||||
/// </summary>
|
||||
public String FirstLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_firstLabel;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_firstLabel = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="application">Revit application</param>
|
||||
/// <param name="selectedCurves">Array contains geometry curves of selected lines or arcs </param>
|
||||
/// <param name="labels">List contains all existing labels in Revit document</param>
|
||||
public CreateWithSelectedCurvesData(UIApplication application, CurveArray selectedCurves, ArrayList labels)
|
||||
: base(application, labels)
|
||||
{
|
||||
m_selectedCurves = selectedCurves;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create grids
|
||||
/// </summary>
|
||||
public void CreateGrids()
|
||||
{
|
||||
int errorCount = 0;
|
||||
|
||||
CurveArray curves = new CurveArray();
|
||||
|
||||
int i = 0;
|
||||
foreach (Curve curve in m_selectedCurves)
|
||||
{
|
||||
try
|
||||
{
|
||||
Line line = curve as Line;
|
||||
if (line != null) // Selected curve is a line
|
||||
{
|
||||
Line lineToCreate;
|
||||
lineToCreate = TransformLine(line, m_bubbleLocation);
|
||||
if (i == 0)
|
||||
{
|
||||
Grid grid;
|
||||
// Create the first grid
|
||||
grid = CreateLinearGrid(lineToCreate);
|
||||
|
||||
try
|
||||
{
|
||||
// Set label of first grid
|
||||
grid.Name = m_firstLabel;
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToSetLabel") + m_firstLabel + "!",
|
||||
resManager.GetString("FailureCaptionSetLabel"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddCurveForBatchCreation(ref curves, lineToCreate);
|
||||
}
|
||||
}
|
||||
else // Selected curve is an arc
|
||||
{
|
||||
Arc arc = curve as Arc;
|
||||
if (arc != null)
|
||||
{
|
||||
if (arc.IsBound) // Part of a circle
|
||||
{
|
||||
Arc arcToCreate;
|
||||
arcToCreate = TransformArc(arc, m_bubbleLocation);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
Grid grid;
|
||||
// Create arc grid
|
||||
grid = NewGrid(arcToCreate);
|
||||
|
||||
try
|
||||
{
|
||||
// Set label of first grid
|
||||
grid.Name = m_firstLabel;
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToSetLabel") + m_firstLabel + "!",
|
||||
resManager.GetString("FailureCaptionSetLabel"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddCurveForBatchCreation(ref curves, arcToCreate);
|
||||
}
|
||||
}
|
||||
else // Arc is a circle
|
||||
{
|
||||
// In Revit UI user can select a circle to create a grid, but actually two grids
|
||||
// (One from 0 to 180 degree and the other from 180 degree to 360) will be created.
|
||||
// In RevitAPI using NewGrid method with a circle as its argument will raise an exception.
|
||||
// Therefore in this sample we will create two arcs from the upper and lower parts of the
|
||||
// circle, and then create two grids on the base of the two arcs to accord with UI.
|
||||
Arc upperArc = null;
|
||||
Arc lowerArc = null;
|
||||
|
||||
TransformCircle(arc, ref upperArc, ref lowerArc, m_bubbleLocation);
|
||||
// Create grids
|
||||
if (i == 0)
|
||||
{
|
||||
Grid gridUpper;
|
||||
// Create arc grid
|
||||
gridUpper = NewGrid(upperArc);
|
||||
try
|
||||
{
|
||||
// Set label of first grid
|
||||
gridUpper.Name = m_firstLabel;
|
||||
}
|
||||
catch (System.ArgumentException)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToSetLabel") + m_firstLabel + "!",
|
||||
resManager.GetString("FailureCaptionSetLabel"));
|
||||
}
|
||||
AddCurveForBatchCreation(ref curves, lowerArc);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddCurveForBatchCreation(ref curves, upperArc);
|
||||
AddCurveForBatchCreation(ref curves, lowerArc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
++errorCount;
|
||||
continue;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
// Create grids with curves
|
||||
CreateGrids(curves);
|
||||
|
||||
if (m_deleteSelectedElements)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (Element e in Command.GetSelectedModelLinesAndArcs(m_revitDoc))
|
||||
{
|
||||
m_revitDoc.Delete(e.Id);
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToDeletedLinesOrArcs"),
|
||||
resManager.GetString("FailureCaptionDeletedLinesOrArcs"));
|
||||
}
|
||||
}
|
||||
|
||||
if (errorCount != 0)
|
||||
{
|
||||
ShowMessage(resManager.GetString("FailedToCreateGrids"),
|
||||
resManager.GetString("FailureCaptionCreateGrids"));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// An enumerate type listing the ways to create grids.
|
||||
/// </summary>
|
||||
public enum CreateMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Create grids with selected lines/arcs
|
||||
/// </summary>
|
||||
Select,
|
||||
/// <summary>
|
||||
/// Create orthogonal grids
|
||||
/// </summary>
|
||||
Orthogonal,
|
||||
/// <summary>
|
||||
/// Create radial and arc grids
|
||||
/// </summary>
|
||||
RadialAndArc
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An enumerate type listing bubble locations of grids.
|
||||
/// </summary>
|
||||
public enum BubbleLocation
|
||||
{
|
||||
/// <summary>
|
||||
/// Place bubble at the start point
|
||||
/// </summary>
|
||||
StartPoint,
|
||||
/// <summary>
|
||||
/// Place bubble at the end point
|
||||
/// </summary>
|
||||
EndPoint
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class contains common const values
|
||||
/// </summary>
|
||||
static class Values
|
||||
{
|
||||
public const double PI = 3.1415926535897900;
|
||||
// ratio from degree to radian
|
||||
public const double DEGTORAD = PI / 180;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RevitAddIns>
|
||||
<AddIn Type="Command">
|
||||
<Assembly>GridCreation.dll</Assembly>
|
||||
<ClientId>910cd1fa-2c3d-4eaf-9784-3286a625d924</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.GridCreation.CS.Command</FullClassName>
|
||||
<Text>Grid Creation</Text>
|
||||
<Description>Show how to create grids.</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
</RevitAddIns>
|
||||
@@ -0,0 +1,158 @@
|
||||
<?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>{9CBA7F2F-0B89-415D-B46E-F68057ACB04F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Revit.SDK.Samples.GridCreation.CS</RootNamespace>
|
||||
<AssemblyName>GridCreation</AssemblyName>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<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>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<DocumentationFile>bin\Debug\GridCreation.XML</DocumentationFile>
|
||||
</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>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>bin\Debug\GridCreation.XML</DocumentationFile>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<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="CreateGridsData.cs" />
|
||||
<Compile Include="CreateOrthogonalGridsData.cs" />
|
||||
<Compile Include="CreateRadialAndArcGridsData.cs" />
|
||||
<Compile Include="CreateWithSelectedCurvesForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CreateWithSelectedCurvesForm.Designer.cs">
|
||||
<DependentUpon>CreateWithSelectedCurvesForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CreateWithSeletedCurvesData.cs" />
|
||||
<Compile Include="EnumsAndValues.cs" />
|
||||
<Compile Include="GridCreationOptionData.cs" />
|
||||
<Compile Include="GridCreationOptionForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="GridCreationOptionForm.Designer.cs">
|
||||
<DependentUpon>GridCreationOptionForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CreateOrthogonalGridsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CreateOrthogonalGridsForm.Designer.cs">
|
||||
<DependentUpon>CreateOrthogonalGridsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="CreateWithSelectedCurvesForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>CreateWithSelectedCurvesForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="GridCreationOptionForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>GridCreationOptionForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="CreateOrthogonalGridsForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>CreateOrthogonalGridsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="CreateRadialAndArcGridsForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>CreateRadialAndArcGridsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="CreateRadialAndArcGridsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CreateRadialAndArcGridsForm.Designer.cs">
|
||||
<DependentUpon>CreateRadialAndArcGridsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Unit.cs" />
|
||||
<Compile Include="Validation.cs" />
|
||||
</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,83 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Data class which stores the information of the way to create grids
|
||||
/// </summary>
|
||||
public class GridCreationOptionData
|
||||
{
|
||||
#region Fields
|
||||
// The way to create grids
|
||||
private CreateMode m_createGridsMode;
|
||||
// If lines/arcs have been selected
|
||||
private bool m_hasSelectedLinesOrArcs;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Creating mode
|
||||
/// </summary>
|
||||
public CreateMode CreateGridsMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_createGridsMode;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_createGridsMode = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// State whether lines/arcs have been selected
|
||||
/// </summary>
|
||||
public bool HasSelectedLinesOrArcs
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_hasSelectedLinesOrArcs;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="hasSelectedLinesOrArcs">Whether lines or arcs have been selected</param>
|
||||
public GridCreationOptionData(bool hasSelectedLinesOrArcs)
|
||||
{
|
||||
m_hasSelectedLinesOrArcs = hasSelectedLinesOrArcs;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// (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.GridCreation.CS
|
||||
{
|
||||
partial class GridCreationOptionForm
|
||||
{
|
||||
/// <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.radioButtonSelect = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonRadialAndCircularGrids = new System.Windows.Forms.RadioButton();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.groupBoxCreateOptions = new System.Windows.Forms.GroupBox();
|
||||
this.radioButtonOrthogonalGrids = new System.Windows.Forms.RadioButton();
|
||||
this.groupBoxCreateOptions.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// radioButtonSelect
|
||||
//
|
||||
this.radioButtonSelect.AutoSize = true;
|
||||
this.radioButtonSelect.Checked = true;
|
||||
this.radioButtonSelect.Location = new System.Drawing.Point(6, 19);
|
||||
this.radioButtonSelect.Name = "radioButtonSelect";
|
||||
this.radioButtonSelect.Size = new System.Drawing.Size(205, 17);
|
||||
this.radioButtonSelect.TabIndex = 0;
|
||||
this.radioButtonSelect.TabStop = true;
|
||||
this.radioButtonSelect.Text = "Create grids with selected lines or arcs";
|
||||
this.radioButtonSelect.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonRadialAndCircularGrids
|
||||
//
|
||||
this.radioButtonRadialAndCircularGrids.AutoSize = true;
|
||||
this.radioButtonRadialAndCircularGrids.Location = new System.Drawing.Point(6, 69);
|
||||
this.radioButtonRadialAndCircularGrids.Name = "radioButtonRadialAndCircularGrids";
|
||||
this.radioButtonRadialAndCircularGrids.Size = new System.Drawing.Size(199, 17);
|
||||
this.radioButtonRadialAndCircularGrids.TabIndex = 2;
|
||||
this.radioButtonRadialAndCircularGrids.Text = "Create a batch of radial and arc grids";
|
||||
this.radioButtonRadialAndCircularGrids.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(159, 129);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(90, 23);
|
||||
this.buttonCancel.TabIndex = 1;
|
||||
this.buttonCancel.Text = "&Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonOK.Location = new System.Drawing.Point(58, 129);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(90, 23);
|
||||
this.buttonOK.TabIndex = 0;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// groupBoxCreateOptions
|
||||
//
|
||||
this.groupBoxCreateOptions.Controls.Add(this.radioButtonSelect);
|
||||
this.groupBoxCreateOptions.Controls.Add(this.radioButtonOrthogonalGrids);
|
||||
this.groupBoxCreateOptions.Controls.Add(this.radioButtonRadialAndCircularGrids);
|
||||
this.groupBoxCreateOptions.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBoxCreateOptions.Name = "groupBoxCreateOptions";
|
||||
this.groupBoxCreateOptions.Size = new System.Drawing.Size(237, 96);
|
||||
this.groupBoxCreateOptions.TabIndex = 13;
|
||||
this.groupBoxCreateOptions.TabStop = false;
|
||||
this.groupBoxCreateOptions.Text = "Choose the way to create grids";
|
||||
//
|
||||
// radioButtonOrthogonalGrids
|
||||
//
|
||||
this.radioButtonOrthogonalGrids.AutoSize = true;
|
||||
this.radioButtonOrthogonalGrids.Location = new System.Drawing.Point(6, 44);
|
||||
this.radioButtonOrthogonalGrids.Name = "radioButtonOrthogonalGrids";
|
||||
this.radioButtonOrthogonalGrids.Size = new System.Drawing.Size(185, 17);
|
||||
this.radioButtonOrthogonalGrids.TabIndex = 1;
|
||||
this.radioButtonOrthogonalGrids.Text = "Create a batch of orthogonal grids";
|
||||
this.radioButtonOrthogonalGrids.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// GridCreationOptionForm
|
||||
//
|
||||
this.AcceptButton = this.buttonOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(265, 164);
|
||||
this.Controls.Add(this.groupBoxCreateOptions);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "GridCreationOptionForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Grid Creation";
|
||||
this.groupBoxCreateOptions.ResumeLayout(false);
|
||||
this.groupBoxCreateOptions.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.RadioButton radioButtonSelect;
|
||||
private System.Windows.Forms.RadioButton radioButtonRadialAndCircularGrids;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.GroupBox groupBoxCreateOptions;
|
||||
private System.Windows.Forms.RadioButton radioButtonOrthogonalGrids;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// The dialog which lets user choose the way to create grids
|
||||
/// </summary>
|
||||
public partial class GridCreationOptionForm : System.Windows.Forms.Form
|
||||
{
|
||||
// data class object
|
||||
private GridCreationOptionData m_gridCreationOption;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="opt">Data class object</param>
|
||||
public GridCreationOptionForm(GridCreationOptionData opt)
|
||||
{
|
||||
m_gridCreationOption = opt;
|
||||
|
||||
InitializeComponent();
|
||||
// Set state of controls
|
||||
InitializeControls();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set state of controls
|
||||
/// </summary>
|
||||
private void InitializeControls()
|
||||
{
|
||||
if (!m_gridCreationOption.HasSelectedLinesOrArcs)
|
||||
{
|
||||
radioButtonSelect.Enabled = false;
|
||||
radioButtonOrthogonalGrids.Checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Transfer data back into data class
|
||||
SetData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer data back into data class
|
||||
/// </summary>
|
||||
private void SetData()
|
||||
{
|
||||
m_gridCreationOption.CreateGridsMode = radioButtonSelect.Checked ? CreateMode.Select :
|
||||
(radioButtonOrthogonalGrids.Checked ? CreateMode.Orthogonal : CreateMode.RadialAndArc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,55 @@
|
||||
//
|
||||
// (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("CreateGrid")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CreateGrid")]
|
||||
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("b4010800-54f5-4989-b8ac-685ef25506f5")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,468 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Revit.SDK.Samples.GridCreation.CS.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Please adjust the values and try again!.
|
||||
/// </summary>
|
||||
internal static string AjustValues {
|
||||
get {
|
||||
return ResourceManager.GetString("AjustValues", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Coordinate can not be null!.
|
||||
/// </summary>
|
||||
internal static string CoordinateCannotBeNull {
|
||||
get {
|
||||
return ResourceManager.GetString("CoordinateCannotBeNull", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Coordinate is not in a correct format!.
|
||||
/// </summary>
|
||||
internal static string CoordinateFormatWrong {
|
||||
get {
|
||||
return ResourceManager.GetString("CoordinateFormatWrong", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Degree can not be negative!.
|
||||
/// </summary>
|
||||
internal static string DegreeCannotBeNegative {
|
||||
get {
|
||||
return ResourceManager.GetString("DegreeCannotBeNegative", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Degree can not be null!.
|
||||
/// </summary>
|
||||
internal static string DegreeCannotBeNull {
|
||||
get {
|
||||
return ResourceManager.GetString("DegreeCannotBeNull", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Degree is not in a correct format!.
|
||||
/// </summary>
|
||||
internal static string DegreeFormatWrong {
|
||||
get {
|
||||
return ResourceManager.GetString("DegreeFormatWrong", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start degree and end degree can not be so close!.
|
||||
/// </summary>
|
||||
internal static string DegreesAreTooClose {
|
||||
get {
|
||||
return ResourceManager.GetString("DegreesAreTooClose", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Degree should be within the range of 0 - 360!.
|
||||
/// </summary>
|
||||
internal static string DegreeWithin0To360 {
|
||||
get {
|
||||
return ResourceManager.GetString("DegreeWithin0To360", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Distance can not be negative!.
|
||||
/// </summary>
|
||||
internal static string DistanceCannotBeNegative {
|
||||
get {
|
||||
return ResourceManager.GetString("DistanceCannotBeNegative", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Distance can not be null!.
|
||||
/// </summary>
|
||||
internal static string DistanceCannotBeNull {
|
||||
get {
|
||||
return ResourceManager.GetString("DistanceCannotBeNull", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Distance is not in a correct format!.
|
||||
/// </summary>
|
||||
internal static string DistanceFormatWrong {
|
||||
get {
|
||||
return ResourceManager.GetString("DistanceFormatWrong", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to cm.
|
||||
/// </summary>
|
||||
internal static string DUT_CENTIMETERS {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_CENTIMETERS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to '.
|
||||
/// </summary>
|
||||
internal static string DUT_DECIMAL_FEET {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_DECIMAL_FEET", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ".
|
||||
/// </summary>
|
||||
internal static string DUT_DECIMAL_INCHES {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_DECIMAL_INCHES", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to '.
|
||||
/// </summary>
|
||||
internal static string DUT_FEET_FRACTIONAL_INCHES {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_FEET_FRACTIONAL_INCHES", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ".
|
||||
/// </summary>
|
||||
internal static string DUT_FRACTIONAL_INCHES {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_FRACTIONAL_INCHES", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to m.
|
||||
/// </summary>
|
||||
internal static string DUT_METERS {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_METERS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to m.
|
||||
/// </summary>
|
||||
internal static string DUT_METERS_CENTIMETERS {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_METERS_CENTIMETERS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to mm.
|
||||
/// </summary>
|
||||
internal static string DUT_MILLIMETERS {
|
||||
get {
|
||||
return ResourceManager.GetString("DUT_MILLIMETERS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to - Start point and end point of arc grids are too close.
|
||||
/// </summary>
|
||||
internal static string EndPointsTooClose {
|
||||
get {
|
||||
return ResourceManager.GetString("EndPointsTooClose", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to create one or more arc grids..
|
||||
/// </summary>
|
||||
internal static string FailedToCreateArcGrids {
|
||||
get {
|
||||
return ResourceManager.GetString("FailedToCreateArcGrids", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to create one or more grids. .
|
||||
/// </summary>
|
||||
internal static string FailedToCreateGrids {
|
||||
get {
|
||||
return ResourceManager.GetString("FailedToCreateGrids", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to create one or more radial grids. .
|
||||
/// </summary>
|
||||
internal static string FailedToCreateRadialGrids {
|
||||
get {
|
||||
return ResourceManager.GetString("FailedToCreateRadialGrids", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to delete some of the selected lines or arcs!.
|
||||
/// </summary>
|
||||
internal static string FailedToDeletedLinesOrArcs {
|
||||
get {
|
||||
return ResourceManager.GetString("FailedToDeletedLinesOrArcs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to set label of grid to : .
|
||||
/// </summary>
|
||||
internal static string FailedToSetLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("FailedToSetLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to Create Grids.
|
||||
/// </summary>
|
||||
internal static string FailureCaptionCreateGrids {
|
||||
get {
|
||||
return ResourceManager.GetString("FailureCaptionCreateGrids", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to Delete Lines/Arcs.
|
||||
/// </summary>
|
||||
internal static string FailureCaptionDeletedLinesOrArcs {
|
||||
get {
|
||||
return ResourceManager.GetString("FailureCaptionDeletedLinesOrArcs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid Value.
|
||||
/// </summary>
|
||||
internal static string FailureCaptionInvalidValue {
|
||||
get {
|
||||
return ResourceManager.GetString("FailureCaptionInvalidValue", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to Set Label.
|
||||
/// </summary>
|
||||
internal static string FailureCaptionSetLabel {
|
||||
get {
|
||||
return ResourceManager.GetString("FailureCaptionSetLabel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Label can not be null!.
|
||||
/// </summary>
|
||||
internal static string LabelCannotBeNull {
|
||||
get {
|
||||
return ResourceManager.GetString("LabelCannotBeNull", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to A same label has already existed!.
|
||||
/// </summary>
|
||||
internal static string LabelExisted {
|
||||
get {
|
||||
return ResourceManager.GetString("LabelExisted", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The two labels can't be same!.
|
||||
/// </summary>
|
||||
internal static string LabelsCannotBeSame {
|
||||
get {
|
||||
return ResourceManager.GetString("LabelsCannotBeSame", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Number should be an integer between 0 and 200!.
|
||||
/// </summary>
|
||||
internal static string NumberBetween0And200 {
|
||||
get {
|
||||
return ResourceManager.GetString("NumberBetween0And200", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Number can not be null!.
|
||||
/// </summary>
|
||||
internal static string NumberCannotBeNull {
|
||||
get {
|
||||
return ResourceManager.GetString("NumberCannotBeNull", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Number is not in a correct format!.
|
||||
/// </summary>
|
||||
internal static string NumberFormatWrong {
|
||||
get {
|
||||
return ResourceManager.GetString("NumberFormatWrong", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The two numbers can not be both zero!.
|
||||
/// </summary>
|
||||
internal static string NumbersCannotBeBothZero {
|
||||
get {
|
||||
return ResourceManager.GetString("NumbersCannotBeBothZero", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Radius can not be negative or zero!.
|
||||
/// </summary>
|
||||
internal static string RadiusCannotBeNegativeOrZero {
|
||||
get {
|
||||
return ResourceManager.GetString("RadiusCannotBeNegativeOrZero", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Radius can not be null!.
|
||||
/// </summary>
|
||||
internal static string RadiusCannotBeNull {
|
||||
get {
|
||||
return ResourceManager.GetString("RadiusCannotBeNull", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Radius is not in a correct format!.
|
||||
/// </summary>
|
||||
internal static string RadiusFormatWrong {
|
||||
get {
|
||||
return ResourceManager.GetString("RadiusFormatWrong", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to That may be caused by one or more of following reasons:.
|
||||
/// </summary>
|
||||
internal static string Reasons {
|
||||
get {
|
||||
return ResourceManager.GetString("Reasons", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Spacing can not be negative or zero!.
|
||||
/// </summary>
|
||||
internal static string SpacingCannotBeNegativeOrZero {
|
||||
get {
|
||||
return ResourceManager.GetString("SpacingCannotBeNegativeOrZero", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Spacing can not be null!.
|
||||
/// </summary>
|
||||
internal static string SpacingCannotBeNull {
|
||||
get {
|
||||
return ResourceManager.GetString("SpacingCannotBeNull", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Spacing is not in a correct format!.
|
||||
/// </summary>
|
||||
internal static string SpacingFormatWrong {
|
||||
get {
|
||||
return ResourceManager.GetString("SpacingFormatWrong", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to - Spacings between grids are too small.
|
||||
/// </summary>
|
||||
internal static string SpacingsTooSmall {
|
||||
get {
|
||||
return ResourceManager.GetString("SpacingsTooSmall", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start degree should be less than end degree!.
|
||||
/// </summary>
|
||||
internal static string StartDegreeShouldBeLessThanEndDegree {
|
||||
get {
|
||||
return ResourceManager.GetString("StartDegreeShouldBeLessThanEndDegree", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
<?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>
|
||||
<data name="AjustValues" xml:space="preserve">
|
||||
<value>Please adjust the values and try again!</value>
|
||||
</data>
|
||||
<data name="CoordinateCannotBeNull" xml:space="preserve">
|
||||
<value>Coordinate can not be null!</value>
|
||||
</data>
|
||||
<data name="CoordinateFormatWrong" xml:space="preserve">
|
||||
<value>Coordinate is not in a correct format!</value>
|
||||
</data>
|
||||
<data name="DegreeCannotBeNegative" xml:space="preserve">
|
||||
<value>Degree can not be negative!</value>
|
||||
</data>
|
||||
<data name="DegreeCannotBeNull" xml:space="preserve">
|
||||
<value>Degree can not be null!</value>
|
||||
</data>
|
||||
<data name="DegreeFormatWrong" xml:space="preserve">
|
||||
<value>Degree is not in a correct format!</value>
|
||||
</data>
|
||||
<data name="DegreesAreTooClose" xml:space="preserve">
|
||||
<value>Start degree and end degree can not be so close!</value>
|
||||
</data>
|
||||
<data name="DegreeWithin0To360" xml:space="preserve">
|
||||
<value>Degree should be within the range of 0 - 360!</value>
|
||||
</data>
|
||||
<data name="DistanceCannotBeNegative" xml:space="preserve">
|
||||
<value>Distance can not be negative!</value>
|
||||
</data>
|
||||
<data name="DistanceCannotBeNull" xml:space="preserve">
|
||||
<value>Distance can not be null!</value>
|
||||
</data>
|
||||
<data name="DistanceFormatWrong" xml:space="preserve">
|
||||
<value>Distance is not in a correct format!</value>
|
||||
</data>
|
||||
<data name="DUT_CENTIMETERS" xml:space="preserve">
|
||||
<value>cm</value>
|
||||
</data>
|
||||
<data name="DUT_DECIMAL_FEET" xml:space="preserve">
|
||||
<value>'</value>
|
||||
</data>
|
||||
<data name="DUT_DECIMAL_INCHES" xml:space="preserve">
|
||||
<value>"</value>
|
||||
</data>
|
||||
<data name="DUT_FEET_FRACTIONAL_INCHES" xml:space="preserve">
|
||||
<value>'</value>
|
||||
</data>
|
||||
<data name="DUT_FRACTIONAL_INCHES" xml:space="preserve">
|
||||
<value>"</value>
|
||||
</data>
|
||||
<data name="DUT_METERS" xml:space="preserve">
|
||||
<value>m</value>
|
||||
</data>
|
||||
<data name="DUT_METERS_CENTIMETERS" xml:space="preserve">
|
||||
<value>m</value>
|
||||
</data>
|
||||
<data name="DUT_MILLIMETERS" xml:space="preserve">
|
||||
<value>mm</value>
|
||||
</data>
|
||||
<data name="EndPointsTooClose" xml:space="preserve">
|
||||
<value>- Start point and end point of arc grids are too close</value>
|
||||
</data>
|
||||
<data name="FailedToCreateArcGrids" xml:space="preserve">
|
||||
<value>Failed to create one or more arc grids.</value>
|
||||
</data>
|
||||
<data name="FailedToCreateGrids" xml:space="preserve">
|
||||
<value>Failed to create one or more grids. </value>
|
||||
</data>
|
||||
<data name="FailedToCreateRadialGrids" xml:space="preserve">
|
||||
<value>Failed to create one or more radial grids. </value>
|
||||
</data>
|
||||
<data name="FailedToDeletedLinesOrArcs" xml:space="preserve">
|
||||
<value>Failed to delete some of the selected lines or arcs!</value>
|
||||
</data>
|
||||
<data name="FailedToSetLabel" xml:space="preserve">
|
||||
<value>Failed to set label of grid to : </value>
|
||||
</data>
|
||||
<data name="FailureCaptionCreateGrids" xml:space="preserve">
|
||||
<value>Failed to Create Grids</value>
|
||||
</data>
|
||||
<data name="FailureCaptionDeletedLinesOrArcs" xml:space="preserve">
|
||||
<value>Failed to Delete Lines/Arcs</value>
|
||||
</data>
|
||||
<data name="FailureCaptionInvalidValue" xml:space="preserve">
|
||||
<value>Invalid Value</value>
|
||||
</data>
|
||||
<data name="FailureCaptionSetLabel" xml:space="preserve">
|
||||
<value>Failed to Set Label</value>
|
||||
</data>
|
||||
<data name="LabelCannotBeNull" xml:space="preserve">
|
||||
<value>Label can not be null!</value>
|
||||
</data>
|
||||
<data name="LabelExisted" xml:space="preserve">
|
||||
<value>A same label has already existed!</value>
|
||||
</data>
|
||||
<data name="LabelsCannotBeSame" xml:space="preserve">
|
||||
<value>The two labels can't be same!</value>
|
||||
</data>
|
||||
<data name="NumberBetween0And200" xml:space="preserve">
|
||||
<value>Number should be an integer between 0 and 200!</value>
|
||||
</data>
|
||||
<data name="NumberCannotBeNull" xml:space="preserve">
|
||||
<value>Number can not be null!</value>
|
||||
</data>
|
||||
<data name="NumberFormatWrong" xml:space="preserve">
|
||||
<value>Number is not in a correct format!</value>
|
||||
</data>
|
||||
<data name="NumbersCannotBeBothZero" xml:space="preserve">
|
||||
<value>The two numbers can not be both zero!</value>
|
||||
</data>
|
||||
<data name="RadiusCannotBeNegativeOrZero" xml:space="preserve">
|
||||
<value>Radius can not be negative or zero!</value>
|
||||
</data>
|
||||
<data name="RadiusCannotBeNull" xml:space="preserve">
|
||||
<value>Radius can not be null!</value>
|
||||
</data>
|
||||
<data name="RadiusFormatWrong" xml:space="preserve">
|
||||
<value>Radius is not in a correct format!</value>
|
||||
</data>
|
||||
<data name="Reasons" xml:space="preserve">
|
||||
<value> That may be caused by one or more of following reasons:</value>
|
||||
</data>
|
||||
<data name="SpacingCannotBeNegativeOrZero" xml:space="preserve">
|
||||
<value>Spacing can not be negative or zero!</value>
|
||||
</data>
|
||||
<data name="SpacingCannotBeNull" xml:space="preserve">
|
||||
<value>Spacing can not be null!</value>
|
||||
</data>
|
||||
<data name="SpacingFormatWrong" xml:space="preserve">
|
||||
<value>Spacing is not in a correct format!</value>
|
||||
</data>
|
||||
<data name="SpacingsTooSmall" xml:space="preserve">
|
||||
<value>- Spacings between grids are too small</value>
|
||||
</data>
|
||||
<data name="StartDegreeShouldBeLessThanEndDegree" xml:space="preserve">
|
||||
<value>Start degree should be less than end degree!</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,301 @@
|
||||
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe2052\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
|
||||
{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f13\fbidi \fswiss\fcharset128\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'91\'76\'91\'cc};}
|
||||
{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f39\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}
|
||||
{\f40\fbidi \fnil\fcharset134\fprq1{\*\panose 00000000000000000000}Fixedsys{\*\falt Arial Unicode MS};}{\f171\fbidi \fswiss\fcharset128\fprq2{\*\panose 02010600030101010101}@SimSun;}
|
||||
{\f350\fbidi \fnil\fcharset134\fprq1{\*\panose 00000000000000000000}@Fixedsys;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\fdbmajor\f31501\fbidi \fswiss\fcharset128\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'91\'76\'91\'cc};}{\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 \fswiss\fcharset128\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'91\'76\'91\'cc};}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
|
||||
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f351\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f352\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\f354\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f355\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f356\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f357\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\f358\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f359\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f361\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f362\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
|
||||
{\f364\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f365\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f366\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f367\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
|
||||
{\f368\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f369\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f371\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f372\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;}
|
||||
{\f374\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f375\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f376\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f377\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}
|
||||
{\f378\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f379\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f483\fbidi \fswiss\fcharset0\fprq2 SimSun Western{\*\falt \'91\'76\'91\'cc};}
|
||||
{\f481\fbidi \fswiss\fcharset238\fprq2 SimSun CE{\*\falt \'91\'76\'91\'cc};}{\f482\fbidi \fswiss\fcharset204\fprq2 SimSun Cyr{\*\falt \'91\'76\'91\'cc};}{\f484\fbidi \fswiss\fcharset161\fprq2 SimSun Greek{\*\falt \'91\'76\'91\'cc};}
|
||||
{\f485\fbidi \fswiss\fcharset162\fprq2 SimSun Tur{\*\falt \'91\'76\'91\'cc};}{\f487\fbidi \fswiss\fcharset178\fprq2 SimSun (Arabic){\*\falt \'91\'76\'91\'cc};}{\f488\fbidi \fswiss\fcharset186\fprq2 SimSun Baltic{\*\falt \'91\'76\'91\'cc};}
|
||||
{\f489\fbidi \fswiss\fcharset163\fprq2 SimSun (Vietnamese){\*\falt \'91\'76\'91\'cc};}{\f691\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f692\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}
|
||||
{\f694\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f695\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f698\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f741\fbidi \fswiss\fcharset238\fprq2 Verdana CE;}
|
||||
{\f742\fbidi \fswiss\fcharset204\fprq2 Verdana Cyr;}{\f744\fbidi \fswiss\fcharset161\fprq2 Verdana Greek;}{\f745\fbidi \fswiss\fcharset162\fprq2 Verdana Tur;}{\f748\fbidi \fswiss\fcharset186\fprq2 Verdana Baltic;}
|
||||
{\f749\fbidi \fswiss\fcharset163\fprq2 Verdana (Vietnamese);}{\f2063\fbidi \fswiss\fcharset0\fprq2 @SimSun Western;}{\f2061\fbidi \fswiss\fcharset238\fprq2 @SimSun CE;}{\f2062\fbidi \fswiss\fcharset204\fprq2 @SimSun Cyr;}
|
||||
{\f2064\fbidi \fswiss\fcharset161\fprq2 @SimSun Greek;}{\f2065\fbidi \fswiss\fcharset162\fprq2 @SimSun Tur;}{\f2067\fbidi \fswiss\fcharset178\fprq2 @SimSun (Arabic);}{\f2068\fbidi \fswiss\fcharset186\fprq2 @SimSun Baltic;}
|
||||
{\f2069\fbidi \fswiss\fcharset163\fprq2 @SimSun (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||
{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
|
||||
{\fdbmajor\f31520\fbidi \fswiss\fcharset0\fprq2 SimSun Western{\*\falt \'91\'76\'91\'cc};}{\fdbmajor\f31518\fbidi \fswiss\fcharset238\fprq2 SimSun CE{\*\falt \'91\'76\'91\'cc};}
|
||||
{\fdbmajor\f31519\fbidi \fswiss\fcharset204\fprq2 SimSun Cyr{\*\falt \'91\'76\'91\'cc};}{\fdbmajor\f31521\fbidi \fswiss\fcharset161\fprq2 SimSun Greek{\*\falt \'91\'76\'91\'cc};}
|
||||
{\fdbmajor\f31522\fbidi \fswiss\fcharset162\fprq2 SimSun Tur{\*\falt \'91\'76\'91\'cc};}{\fdbmajor\f31524\fbidi \fswiss\fcharset178\fprq2 SimSun (Arabic){\*\falt \'91\'76\'91\'cc};}
|
||||
{\fdbmajor\f31525\fbidi \fswiss\fcharset186\fprq2 SimSun Baltic{\*\falt \'91\'76\'91\'cc};}{\fdbmajor\f31526\fbidi \fswiss\fcharset163\fprq2 SimSun (Vietnamese){\*\falt \'91\'76\'91\'cc};}{\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 \fswiss\fcharset0\fprq2 SimSun Western{\*\falt \'91\'76\'91\'cc};}
|
||||
{\fdbminor\f31558\fbidi \fswiss\fcharset238\fprq2 SimSun CE{\*\falt \'91\'76\'91\'cc};}{\fdbminor\f31559\fbidi \fswiss\fcharset204\fprq2 SimSun Cyr{\*\falt \'91\'76\'91\'cc};}
|
||||
{\fdbminor\f31561\fbidi \fswiss\fcharset161\fprq2 SimSun Greek{\*\falt \'91\'76\'91\'cc};}{\fdbminor\f31562\fbidi \fswiss\fcharset162\fprq2 SimSun Tur{\*\falt \'91\'76\'91\'cc};}
|
||||
{\fdbminor\f31564\fbidi \fswiss\fcharset178\fprq2 SimSun (Arabic){\*\falt \'91\'76\'91\'cc};}{\fdbminor\f31565\fbidi \fswiss\fcharset186\fprq2 SimSun Baltic{\*\falt \'91\'76\'91\'cc};}
|
||||
{\fdbminor\f31566\fbidi \fswiss\fcharset163\fprq2 SimSun (Vietnamese){\*\falt \'91\'76\'91\'cc};}{\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 \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{
|
||||
\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\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\sa200\sl276\slmult1
|
||||
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052
|
||||
\snext11 \ssemihidden \sunhideused \sqformat Normal Table;}}{\*\rsidtbl \rsid8674520}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Lule}
|
||||
{\creatim\yr2010\mo3\dy3\hr17\min19}{\revtim\yr2010\mo3\dy3\hr17\min20}{\version2}{\edmins1}{\nofpages2}{\nofwords562}{\nofchars3242}{\nofcharsws3797}{\vern32771}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/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\rsidroot8674520 \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\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {
|
||||
\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 GridCreation\line }{\rtlch\fcs1 \ab\af1\afs20
|
||||
\ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520
|
||||
\hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 2011.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1
|
||||
First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 2009.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 High\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520
|
||||
\hich\af1\dbch\af31505\loch\f1 Elements\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1
|
||||
ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Create Grid.\line }{
|
||||
\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 \line \hich\af1\dbch\af31505\loch\f1
|
||||
This sample shows how to create grids and modify grids\hich\f1 \rquote \loch\f1 properties through Revit API.}{\rtlch\fcs1 \ai\af0\afs20 \ltrch\fcs0 \i\f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1
|
||||
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520\charrsid8674520 \hich\af1\dbch\af31505\loch\f1
|
||||
Autodesk.Revit.UI.IExternalCommand}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520
|
||||
\hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid8674520
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520
|
||||
\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0 \i\f1\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Command.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains the class Command which inherits from interface IExternalCommand and implements the Execute method.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 CreateGridsData
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1
|
||||
Base class of grid creation data classes which contains common data and operations.
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 GridCreationOptionData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 which\hich\af1\dbch\af31505\loch\f1
|
||||
stores the information of the way to create grids.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 GridCreationOptionForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains a dialog which lets user choose the way to create grids.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 CreateWithSeletedCurvesData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 which stores the information for creating grids with selected lin
|
||||
\hich\af1\dbch\af31505\loch\f1 es/arcs.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 CreateWithSelectedCurvesForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains a dialog which provides the options of creating grids with selected lines/arcs.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 CreateOrthogonalGridsData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 class }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 which stores information for creating orthogonal grids.}{\rtlch\fcs1
|
||||
\af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 CreateOrthogonalGridsForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1
|
||||
It contains a dialog which provides the options of creating orthogonal grids.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 CreateRadialAndArcGridsData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Data}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 class}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 which stores information for creating radial and arc grids.}{
|
||||
\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 CreateRadialAndArcGridsForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
|
||||
\f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 It contains a \hich\af1\dbch\af31505\loch\f1
|
||||
dialog which provides the options of creating radial and arc grids.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 Unit.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 It defines a static class Unit to convert unit from display unit type to Revit API
|
||||
\hich\f1 \rquote \loch\f1 s internal unit.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 EnumsAndValues.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520 \hich\af1\dbch\af31505\loch\f1 This file contains two Enumerations and one class.}{\rtlch\fcs1 \af0\afs20
|
||||
\ltrch\fcs0 \f0\fs20\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \fi-420\li1200\ri0\nowidctlpar\tx720\tx1200\wrapdefault\faauto\rin0\lin1200\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\insrsid8674520 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid8674520
|
||||
\hich\af1\dbch\af31505\loch\f1 CreateM\hich\af1\dbch\af31505\loch\f1 ode}{\rtlch\fcs1 \af40\afs18 \ltrch\fcs0 \fs18\cf10\lang1024\langfe1024\loch\af40\hich\af1\dbch\af40\noproof\insrsid8674520 \hich\af1\dbch\af40\loch\f40 }{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 enumeration lists the ways to create grids.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \fi-420\li1200\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1200\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \fs20\loch\af39\hich\af39\dbch\af40\insrsid8674520 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 BubbleLocation enumeration lists bubble locations of grids.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \fs20\loch\af39\hich\af39\dbch\af40\insrsid8674520 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1
|
||||
Class Values contains common const values used in transforming between degrees and radians.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 Validation.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af0\hich\af0\dbch\af40\langnp1036\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af1\hich\af1\dbch\af40\langnp1036\insrsid8674520 \hich\af1\dbch\af40\loch\f1
|
||||
This file contains static functions to validate input data before creating grids.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1036\langfe2052\loch\af0\hich\af0\dbch\af40\langnp1036\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 }{
|
||||
\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 This sample provides following functionalities.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 -\tab \hich\af1\dbch\af40\loch\f1
|
||||
Let user create grids on the base of the selected lines/arcs.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 -\tab \hich\af1\dbch\af40\loch\f1 Let user generate orthogonal linea\hich\af1\dbch\af40\loch\f1
|
||||
r grids with specified origin, spacing of X and Y directions, numbers of X and Y direction grids. }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 -\tab \hich\af1\dbch\af40\loch\f1
|
||||
Let user generate radial and arc grids with specified center, span of grids, spacing between concentric arcs and number of rays in the specified span. Even\hich\af1\dbch\af40\loch\f1
|
||||
the user can specify radius of the first arc grid and distance from center to the start points of radial grids.
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 -\tab \hich\af1\dbch\af40\loch\f1
|
||||
Let user set the label for the first grid like A or 1 and set the location of the bubble for grids to be created.
|
||||
\par -\tab \hich\af1\dbch\af40\loch\f1 The length units within \hich\af1\dbch\af40\loch\f1 UI should accord with current project unit setting.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf2\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 }{
|
||||
\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\cf2\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 Open Revit application and execute the command.
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 1.\tab Create grids with selected lines/arcs.
|
||||
|
||||
\par }\pard \ltrpar\ql \li765\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin765\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 a. Select some lines/arcs in current project.}{\rtlch\fcs1
|
||||
\af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 b. Execute the command.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \fi-400\li1166\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1166\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 \hich\f1 c. Check the option \'93
|
||||
\hich\af1\dbch\af40\loch\f1 \hich\f1 Create grids with selected lines or arcs\'94.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \fi-360\li1125\ri0\nowidctlpar\tx1125\wrapdefault\faauto\rin0\lin1125\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 d.\tab \hich\f1 In the next \'93\loch\f1
|
||||
\hich\f1 Create Grids with Selected Lines/Arcs\'94\loch\f1 \hich\f1 dialog specify the values and click button \'93\loch\f1 \hich\f1 Create Grids\'94.
|
||||
\par }\pard \ltrpar\ql \li765\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin765\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1
|
||||
Expected result: Grids are created on the base of selected lines/arcs.}{\rtlch\fcs1 \af2\afs20 \ltrch\fcs0 \fs20\loch\af2\hich\af2\dbch\af40\insrsid8674520 \hich\af2\dbch\af40\loch\f2 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 If an arc is a circle, two g\hich\af1\dbch\af40\loch\f1 irds will be created separately for the upper and lower parts of the circle.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
|
||||
\fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 2.\tab Create orthogonal grids.
|
||||
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\tx1080\wrapdefault\faauto\rin0\lin1080\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 a.\tab Execute the command.
|
||||
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1080\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 b.\tab \hich\f1 Check the option \'93\loch\f1 \hich\f1
|
||||
Create a batch of orthogonal grids\'94.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\tx1080\wrapdefault\faauto\rin0\lin1080\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 c.\tab \hich\f1 In the next \'93\loch\f1
|
||||
\hich\f1 Create Orthogonal Grids\'94\loch\f1 dialog specify the values a\hich\af1\dbch\af40\loch\f1 \hich\f1 nd click button \'93\loch\f1 \hich\f1 Create Grids\'94.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
|
||||
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1
|
||||
Expected result: Orthogonal grids are created according to specified values.
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 3.\tab Create radial and arc grids.
|
||||
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\tx1080\wrapdefault\faauto\rin0\lin1080\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 a.\tab Execute the command.
|
||||
\par }\pard \ltrpar\ql \fi-360\li1080\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin1080\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1 b.\tab \hich\f1 Check the option \'93\loch\f1 \hich\f1
|
||||
Create a batch of radial and arc grids\'94.
|
||||
\par \hich\af1\dbch\af40\loch\f1 c.\tab \hich\f1 In the next \'93\hich\af1\dbch\af40\loch\f1 \hich\f1 Create Radial and Arc Grids\'94\loch\f1 \hich\f1 dialog specify the values and click button \'93\loch\f1 \hich\f1 Create Grids\'94.}{\rtlch\fcs1 \af0\afs20
|
||||
\ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\par }\pard \ltrpar\ql \li720\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin720\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af40\insrsid8674520 \hich\af1\dbch\af40\loch\f1
|
||||
Expected result: Radial and arc grids are created according to specified values.
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af40\insrsid8674520
|
||||
\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
|
||||
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f000000000000000000000000404f
|
||||
ecb8b2baca01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000105000000000000}}
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Autodesk.Revit;
|
||||
using System.Configuration;
|
||||
using System.Reflection;
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides static functions to convert unit
|
||||
/// </summary>
|
||||
static class Unit
|
||||
{
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// Convert the value get from RevitAPI to the value indicated by ForgeTypeId
|
||||
/// </summary>
|
||||
/// <param name="to">ForgeTypeId indicates unit of target value</param>
|
||||
/// <param name="value">value get from RevitAPI</param>
|
||||
/// <returns>Target value</returns>
|
||||
public static double CovertFromAPI(ForgeTypeId to, double value)
|
||||
{
|
||||
return value *= ImperialDutRatio(to);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a value indicated by ForgeTypeId to the value used by RevitAPI
|
||||
/// </summary>
|
||||
/// <param name="value">Value to be converted</param>
|
||||
/// <param name="from">ForgeTypeId indicates the unit of the value to be converted</param>
|
||||
/// <returns>Target value</returns>
|
||||
public static double CovertToAPI(double value, ForgeTypeId from )
|
||||
{
|
||||
return value /= ImperialDutRatio(from);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get ratio between value in RevitAPI and value to display indicated by ForgeTypeId
|
||||
/// </summary>
|
||||
/// <param name="unit">ForgeTypeId indicates display unit type</param>
|
||||
/// <returns>Ratio </returns>
|
||||
private static double ImperialDutRatio(ForgeTypeId unit)
|
||||
{
|
||||
if (unit == UnitTypeId.Feet) return 1;
|
||||
if (unit == UnitTypeId.FeetFractionalInches) return 1;
|
||||
if (unit == UnitTypeId.Inches) return 12;
|
||||
if (unit == UnitTypeId.FractionalInches) return 12;
|
||||
if (unit == UnitTypeId.Meters) return 0.3048;
|
||||
if (unit == UnitTypeId.Centimeters) return 30.48;
|
||||
if (unit == UnitTypeId.Millimeters) return 304.8;
|
||||
if (unit == UnitTypeId.MetersCentimeters) return 0.3048;
|
||||
return 1;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
//
|
||||
// (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;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Resources;
|
||||
using System.Collections;
|
||||
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.GridCreation.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to validate input data before creating grids
|
||||
/// </summary>
|
||||
public static class Validation
|
||||
{
|
||||
// Get the resource contains strings
|
||||
static ResourceManager resManager = Properties.Resources.ResourceManager;
|
||||
|
||||
/// <summary>
|
||||
/// Validate numbers in UI
|
||||
/// </summary>
|
||||
/// <param name="number1Ctrl">Control contains number information</param>
|
||||
/// <param name="number2Ctrl">Control contains another number information</param>
|
||||
/// <returns>Whether the numbers are validated</returns>
|
||||
public static bool ValidateNumbers(Control number1Ctrl, Control number2Ctrl)
|
||||
{
|
||||
if (!ValidateNumber(number1Ctrl) || !ValidateNumber(number2Ctrl))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Convert.ToUInt32(number1Ctrl.Text) == 0 && Convert.ToUInt32(number2Ctrl.Text) == 0)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("NumbersCannotBeBothZero"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
number1Ctrl.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate number value
|
||||
/// </summary>
|
||||
/// <param name="numberCtrl">Control contains number information</param>
|
||||
/// <returns>Whether the number value is validated</returns>
|
||||
public static bool ValidateNumber(Control numberCtrl)
|
||||
{
|
||||
if (!ValidateNotNull(numberCtrl, "Number"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
uint number = Convert.ToUInt32(numberCtrl.Text);
|
||||
if (number > 200)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("NumberBetween0And200"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
numberCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (OverflowException)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("NumberBetween0And200"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
numberCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("NumberFormatWrong"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
numberCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate length value
|
||||
/// </summary>
|
||||
/// <param name="lengthCtrl">Control contains length information</param>
|
||||
/// <param name="typeName">Type of length</param>
|
||||
/// <param name="canBeZero">Whether the length can be zero</param>
|
||||
/// <returns>Whether the length value is validated</returns>
|
||||
public static bool ValidateLength(Control lengthCtrl, String typeName, bool canBeZero)
|
||||
{
|
||||
if (!ValidateNotNull(lengthCtrl, typeName))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
double length = Convert.ToDouble(lengthCtrl.Text);
|
||||
if (length <= 0 && !canBeZero)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString(typeName + "CannotBeNegativeOrZero"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
lengthCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
else if (length < 0 && canBeZero)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString(typeName + "CannotBeNegative"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
lengthCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString(typeName + "FormatWrong"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
lengthCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate coordinate value
|
||||
/// </summary>
|
||||
/// <param name="coordCtrl">Control contains coordinate information</param>
|
||||
/// <returns>Whether the coordinate value is validated</returns>
|
||||
public static bool ValidateCoord(Control coordCtrl)
|
||||
{
|
||||
if (!ValidateNotNull(coordCtrl, "Coordinate"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Convert.ToDouble(coordCtrl.Text);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("CoordinateFormatWrong"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
coordCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate start degree and end degree
|
||||
/// </summary>
|
||||
/// <param name="startDegree">Control contains start degree information</param>
|
||||
/// <param name="endDegree">Control contains end degree information</param>
|
||||
/// <returns>Whether the degree values are validated</returns>
|
||||
public static bool ValidateDegrees(Control startDegree, Control endDegree)
|
||||
{
|
||||
if (!ValidateDegree(startDegree) || !ValidateDegree(endDegree))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Math.Abs(Convert.ToDouble(startDegree.Text) - Convert.ToDouble(endDegree.Text)) <= Double.Epsilon)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("DegreesAreTooClose"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
startDegree.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Convert.ToDouble(startDegree.Text) >= Convert.ToDouble(endDegree.Text))
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("StartDegreeShouldBeLessThanEndDegree"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
startDegree.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate degree value
|
||||
/// </summary>
|
||||
/// <param name="degreeCtrl">Control contains degree information</param>
|
||||
/// <returns>Whether the degree value is validated</returns>
|
||||
public static bool ValidateDegree(Control degreeCtrl)
|
||||
{
|
||||
if (!ValidateNotNull(degreeCtrl, "Degree"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
double startDegree = Convert.ToDouble(degreeCtrl.Text);
|
||||
if (startDegree < 0 || startDegree > 360)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("DegreeWithin0To360"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
degreeCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("DegreeFormatWrong"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
degreeCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate label
|
||||
/// </summary>
|
||||
/// <param name="labelCtrl">Control contains label information</param>
|
||||
/// <param name="allLabels">List contains all labels in Revit document</param>
|
||||
/// <returns>Whether the label value is validated</returns>
|
||||
public static bool ValidateLabel(Control labelCtrl, ArrayList allLabels)
|
||||
{
|
||||
if (!ValidateNotNull(labelCtrl, "Label"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
String labelToBeValidated = labelCtrl.Text;
|
||||
foreach (String label in allLabels)
|
||||
{
|
||||
if (label == labelToBeValidated)
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("LabelExisted"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
labelCtrl.Focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Assure value is not null
|
||||
/// </summary>
|
||||
/// <param name="control">Control contains information needs to be checked</param>
|
||||
/// <param name="typeName">Type of information</param>
|
||||
/// <returns>Whether the value is not null</returns>
|
||||
public static bool ValidateNotNull(Control control, String typeName)
|
||||
{
|
||||
if (String.IsNullOrEmpty(control.Text.TrimStart(' ').TrimEnd(' ')))
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString(typeName + "CannotBeNull"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
control.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Assure two labels are not same
|
||||
/// </summary>
|
||||
/// <param name="label1Ctrl">Control contains label information</param>
|
||||
/// <param name="label2Ctrl">Control contains label information</param>
|
||||
/// <returns>Whether the labels are same</returns>
|
||||
public static bool ValidateLabels(Control label1Ctrl, Control label2Ctrl)
|
||||
{
|
||||
if (label1Ctrl.Text.TrimStart(' ').TrimEnd(' ') == label2Ctrl.Text.TrimStart(' ').TrimEnd(' '))
|
||||
{
|
||||
ShowWarningMessage(resManager.GetString("LabelsCannotBeSame"),
|
||||
Properties.Resources.ResourceManager.GetString("FailureCaptionInvalidValue"));
|
||||
label1Ctrl.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show a warning message box
|
||||
/// </summary>
|
||||
/// <param name="message">Message</param>
|
||||
/// <param name="caption">title of message box</param>
|
||||
public static void ShowWarningMessage(String message, String caption)
|
||||
{
|
||||
TaskDialog.Show(caption, message, TaskDialogCommonButtons.Ok);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user