Files
RevitSdkSamples/snapshot/2008/SDK/Samples/ModelLines/CS/ReadMe_ModelLines.rtf
T

89 lines
44 KiB
Plaintext
Raw Normal View History

2024-12-12 09:51:40 +01:00
ÐÏࡱá>þÿ SUþÿÿÿRÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿì¥Á` ðR¿bjbjËsËs .,©©ÿÿÿÿÿÿ¤šÂÂÂÂTš.Oø66666666­N¯N¯N¯N¯N¯N¯N$&QhŽSÓN66666ÓN66èNööö6Z66­Nö6­NööNáJ¼ùM6* p£N¥Ç€ÇÂ"L0­NþN0.OÍL,¦T².¦T`ùM¦TùM´66ö66666ÓNÓNà666.O6666šššDÞ
äšššÞ
šššÿÿÿÿ 
Application: ModelLines
Revit product and version: All
Last Modified: 12/12/2006
Modified By: JL Autodesk HSL
Programming Language: C#
Subject: This sample shows how to get model lines of all kinds and how to create model lines using Revit API.
Classes:
Autodesk.Revit.IExternalCommand
Autodesk.Revit.Elements.ModelArc
Autodesk.Revit.Elements.ModelLine
Autodesk.Revit.Elements.ModelCurveArray
Autodesk.Revit.Elements.ModelCurve
Autodesk.Revit.Elements.SketchPlane
Autodesk.Revit.Creation.Application
Autodesk.Revit.Geormetry.Arc
Autodesk.Revit.Geormetry.XYZ
Autodesk.Revit.Geormetry.Line
Project Files:
ModelLines.cs
This file contains the ModelLines Class which is the main class and takes charge of showing the number of each model line type and creating one instance for each type using Revit API.
ModelLinesForm.cs
This is the mail form to show all the model lines and allow user to create model lines and sketch plan.
Description:
Get the number of each model line type in a list. ModelLines can be located by iterating through the document elements. Such as ModelArc, ModelEllipse and ModelLine, etc.
For creating a ModelArc type model line, input three points to create it.
For creating a ModelLine type model line, input two points to create it.
For the other types, select a base model curve which provides the corresponding curve and then input offset vector from the selected base model curve.
Select a sketch plane to place the created model curve and you can also create a new sketch plane if you want. The creation of sketch plane can be done with NewSketchPlane() method in Autodesk.Revit.Creation.Document class.
The creation of model lines can be done with NewModelCurve() and NewModelCurveArray() methods in Autodesk.Revit.Creation.Document class.
Instructions:
Draw some model lines in Revit.
Load the ModelLines.dll and run the command, it will get all model lines in Revit and display the number of each type.
You can create a type model line by inputting some informationon a sketch plan. Such as input tree points to create a ModelArc type model line and then click the create button.
You can also create a new sketch plan using the “New” button. You should supply two model lines to create it.

3478FGLMQR^_`íßÒÁ­ßÒÒßÒŒ{hOßÒ;'h{/V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