Files
RevitSdkSamples/snapshot/2008/SDK/Samples/CreateDimensions/CS/ReadMe_CreateDimensions.rtf
T

71 lines
46 KiB
Plaintext
Raw Normal View History

2024-12-12 09:51:40 +01:00
ÐÏࡱá>þÿ WYþÿÿÿVÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿì¥Áq` ñR¿ObjbjqPqP .*::Oÿÿÿÿÿÿ¤ªrrrrDª©H0ÞÞÞÞÞ¹¹¹C&*H*H*H*H*H*H$ÙJhAM~NH¹¹¹¹¹NHÞÞÛcH÷÷÷¹fÞÞC÷¹C÷÷¦˜=lØ@ÞÒ RÛ;0#Çr"?$CyH0©H(?°¿MA¬¿MHØ@¿MØ@,¹¹÷¹¹¹¹¹NHNHí
¹¹¹©H¹¹¹¹ªªª.Dªªª.ªªªÿÿÿÿ Application: CreateDimensions
Revit product and version: Revit Structure 2008
Last Modified: 8/12/2006
Modified By: LL Autodesk HSL
Programming Language: C#
Subject: This sample shows how to add a dimension to a selected structure wall from its start to its end.
Classes:
Autodesk.Revit.IExternalCommand
Autodesk.Revit.Elements.View
Autodesk.Revit.Elements.Wall
Autodesk.Revit.Elements.Dimension
Autodesk.Revit.CategorySet
Autodesk.Revit.Category
Autodesk.Revit.SelElementSet
Autodesk.Revit.Location
Autodesk.Revit.LocationCurve
Autodesk.Revit.Geometry.Curve
Autodesk.Revit.Geometry.Line
Autodesk.Revit.Geometry.ReferenceArray
Autodesk.Revit.Geometry.Options
Autodesk.Revit.Geometry.Element
Autodesk.Revit.Geometry.GeometryObjectArray
Autodesk.Revit.Geometry.GeometryObject
Autodesk.Revit.ParameterSet
Autodesk.Revit.Parameter
Autodesk.Revit.Parameters.DefinitionFile
Autodesk.Revit.Parameters.DefinitionGroups
Autodesk.Revit.Parameters.DefinitionGroup
Autodesk.Revit.Parameters.Definition
Autodesk.Revit.Parameters.InstanceBinding
Project Files:
Command.vb
It contains the class Command which implements interface IExternalCommand. It also provides the function of adding a dimension to a selected wall from its start point to its end point.
Description:
This sample provides following functionalities.
To get one element by using its Id, use Docment.Element(ElementId) method.
Retrieve all the walls in the current project.
Loop to get every wall and perform following actions
Get the walls local curve and create a new bound line with its start point and end point
Loop the walls geometry elements and find the two upright lines beside the line created in step 1. Create a reference array contains the references of the two lines
Create a new bound line which is close and parallel to the line in step 1
Create a dimension for the wall using the reference array as its bounds and the parallel line as its place
Instructions:
Open Revit Structure 2008.
Draw some walls which have analytical model lines and select them
Make sure that the active view is not a View3D or ViewSheet.
Execute the external Command.
 
89MNTU\]fgstñäѽñ䪜‘~pbQ@p3hW3„hROJQJ^J!hW3„hRB*OJQJ^Jphÿ!hr8ƒOJPJQJ^JnHo(tHnhR6OJQJ^JhW3„hR5OJQJ^J$h6@5OJPJQJ^JnHo(tHh6@5OJQJ^Jh•_Ghëg«6OJQJ^J$hºhºOJPJQJ^JnHtH'hÞZÙhëg«OJPJQJ^JnHo(tH$hÞZÙhÞZÙOJPJQJ^JnHtHhW3„hëg«OJQJ^JhW3„hëg«5OJQJ^JNgž  3 P m ª Â à ø 
3
P
w
·
ã
& ùôùïïôôôùæææææææææææææææææ„h`„hgd4/ gdRgdëg«@&gdROþtuvƒšœž¦§½Þè  ë×͹«Œrd]P?.?P!hiOJPJQJ^JnHo(tH!hc<OJPJQJ^JnHo(tHFFOJQJ^J FFhW3„hëg«5OJQJ^JhRhëg«OJQJ^JhW3„hROJQJ^J!h×OJPJQJ^JnHo(tHhRB*OJQJ^JphÿhW3„hR5OJQJ^J'hë`hROJPJQJ^JnHo(tHhë`OJQJ^J'h6@h** OJPJQJ^JnHo(tH'h6@h} †OJPJQJ^JnHo(tH     " 2 3 O P l m Ž ðÜÎÁ·¤‘€m\I5I5'h4/ ˆOJPJQJ^JnHo(tH$h4/ ˆOJPJQJ^JnHtH!hc<OJPJQJ^JnHo(tH$h4/ hc<OJPJQJ^JnHtH!hROJPJQJ^JnHo(tH$h4/ hV^fOJPJQJ^JnHtH$h4/ hëg«OJPJQJ^JnHtHhROJQJ^JhW3„hëg«OJQJ^JhW3„hëg«5OJQJ^J'FhêiOJPJQJ^JnHo(tHFhs676OJQJ^Jo( © ª Á  à ÷ ø 

2
3
O
P
v
w