In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Most people do not understand the knowledge points of this "Revit multi-pipeline linear labeling method" article, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "Revit multi-pipeline linear labeling method" article.
Linear dimensions mainly provide two kinds of API:
But in fact, it is also a kind of, the second can choose the dimension style.
The three main parameters:
View
Dimensioned view
Line
Dimension line
References
Stable reference
Note here that annotation views can only be done in plan or elevation views, and the example methods in this section can only be used on linear elements.
The sample code is as follows:
Route dimensioning is relatively simple and does not require access to geometry, so using this as a reference example, the method is basically consistent.
Selection selection = uiDoc.Selection
/ / Select elements that need to be dimensioned
IList referenceList = selection.PickObjects (ObjectType.Element, "Please select elements to dimension")
If (referenceList.Count < 1)
{
TaskDialog.Show ("warning", "error selecting quantity, please reselect")
}
Autodesk.Revit.DB.View view = doc.ActiveView
ViewType vt = view.ViewType
If (vt = = ViewType.FloorPlan | | vt = = ViewType.Elevation)
{
/ / get one of the elements to get its location
Element element = doc.GetElement (referenceList.ElementAt (0))
Line line = (element.Location as LocationCurve) .Curve as Line
Element element2 = doc.GetElement (referenceList.ElementAt (1))
Line line2 = (element2.Location as LocationCurve) .Curve as Line
XYZ linemiddle = line.Evaluate (0.5, true)
/ / projects the intersection of a specified point on this line
XYZ projectPoint = line2.Project (linemiddle) .XYZPoint
Line newLine = Line.CreateBound (linemiddle, projectPoint)
ReferenceArray references = new ReferenceArray ()
Foreach (Reference reference in referenceList)
{
References.Append (reference)
}
/ / call the method of creating dimensions to create
Dimension autoDimension = doc.Create.NewDimension (view, newLine, references)
}
Else
{
TaskDialog.Show ("warning", "Annotation view is not a plan view or elevation view")
}
Let's take a look at the effect:
Before labeling
Select the pipe to be labeled
The finished effect of dimensioning
The above is about the content of this article on "Revit multi-channel linear annotation method". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.