Moustafa Khalilsharpbim.hashnode.dev·Nov 4, 2024Mapping IFC GUIDs Between Revit and Exported FilesUnderstanding the IFC GUID Mapping Between Revit and Exported IFC Files Working with BIM projects in Revit often involves exporting models to the Industry Foundation Classes (IFC) format, a crucial step for interoperability in construction projects. ...114 readsExporting Models
Moustafa Khalilsharpbim.hashnode.dev·Jul 24, 2024Aligning 3D ViewsAligning a 3D view to a specific orientation is incredibly useful during the design process. It provides better visual clarity and can help in understanding the spatial arrangement of elements. In Revit, this can be done through the user interface by...99 readsView3D
Moustafa Khalilsharpbim.hashnode.dev·Jun 11, 2024Render Text via Direct Context 3DRendering text in the Revit API using DirectContext3D can be approached in several ways, each with its advantages and limitations. Here, we explore two methods: FormattedTextand GraphicsPath. FormattedText FormattedText.BuildGeometry is a practical c...74 readsRender Text
Moustafa Khalilsharpbim.hashnode.dev·May 21, 2024What Command is Executed?In Revit development, it can be challenging to determine which specific PostableCommandId has been executed. While we can identify which button has been triggered and extract certain constants, correlating these to a specific PostableCommandId remain...86 readsCommandId
Moustafa Khalilsharpbim.hashnode.dev·May 15, 2024Offset EllipseWhile using the offset function in the Revit API, I noticed that ellipses don't retain their properties after offsetting. Instead, they are converted to another type of segment classified as a Hermite-spline. How can I keep the ellipse properties aft...Hermite-spline
Moustafa Khalilsharpbim.hashnode.dev·May 10, 2024Highlight elements from a linked documentIt has long been a wish to select elements from a linked element. This wish seems to have been granted in the Revit 2023 Release API. A new Selection function called SetReferences has been added, allowing elements to be highlighted via reference. We ...222 readsHighlight Element
Moustafa Khalilsharpbim.hashnode.dev·May 6, 2024ModelText RotationModel text, in fact, is a bit tricky to determine its rotation value. I attempted to inspect its solids in the hope of finding any reference lines to grasp it, but I was unsuccessful. As I expanded my investigation to comprehend how model text functi...Model Text
Moustafa Khalilsharpbim.hashnode.dev·May 3, 2024Rotate BoundingBoxBoundingBox, as the name suggests, is a box that contains elements inside it. The RevitAPI allows developers to access this box for various purposes like filtering, determining its position, dimensions, and more. It's important to note that the bound...40 readsBoundingBox
Moustafa Khalilsharpbim.hashnode.dev·May 3, 2024Section line locationDrawing a section over a plan drawing is crucial for getting a better view of how an element is positioned or constructed. For instance, we can easily observe and manage a wall's height through a section. Assuming we already have a section view and n...35 readsSectionLine
Moustafa Khalilsharpbim.hashnode.dev·May 3, 2024Purging Viewport TypesIn RevitAPI, filtering and collecting elements are present in almost every developed code for writing add-ins. Usually, we locate elements by their Category or class type using statements like this, for example when we want to retrieve all walls from...Viewports