Extracting the Polyline data for MEP Elements from the Model
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-05-30
08:32 AM
- last edited on
2024-06-06
04:57 PM
by
Laszlo Nagy
-
What is API_Neig?
I encountered the term API_Neig in the MEP Test example, where it is used for selecting an MEP element. Can someone explain what API_Neig represents and how it is used in the context of MEP elements?
Extracting Polyline Information for All Routing Elements in the Model
I want to extract the Polyline information for all Routing Elements from the entire model, not just from a specific selection. Here’s the workflow I’m using:
- getElementList: Retrieve all elements.
- Filter by TypeID: Check if it’s an MEP Element.
- Check if Routing Element: Confirm if it’s a routing element.
- get Routing Element for this guid: Retrieve the routing element.
- extract the Polyline using getPolyline(): Attempt to get the polyline.
However, I’m unable to get any coordinates using this method. The same workflow successfully retrieves the polyline when a specific routing element is selected. What could be the issue with extracting polyline data for all routing elements in the model?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-05-30 08:39 AM
@Viktor Kindly help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-05-30 08:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-05-31 09:52 AM
API_Neig is primarily concerned with element selection. It carries element identifiers so the element can be loaded, e.g. with ACAPI_Element_Get, but also contains information about how/where the element was selected, e.g. if the user selected a hole in a slab, the API_Neig structure would identify that a slab was selected and carry enough data to identify the selected hole. This means that any add-on looking at the user selection will use this structure, including MEP add-ons.
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-05-31 10:01 AM
If you want to find all elements of some type rather than just the selected elements, take a look at ACAPI_Element_GetElemList. This allows you to retrieve an array of elements from anywhere (whether selected or not).
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-05-31 12:14 PM
Hi Ralph,
Thank you for your previous response. I'm currently working on extracting polyline data for all MEP elements in my model. Here's the workflow I'm implementing:
Retrieve All Elements:
- I use ACAPI_Element_GetElemList to get a comprehensive list of all elements in the database.
Filter for MEP Elements:
- From this list, I filter out the elements that are of the MEP type.
Extract Polyline Data from Routing Elements:
- For each MEP element identified as a RoutingElement, I extract the polyline data.
Although I've implemented this workflow, I'm not getting any results. Can you please help me identify what might be going wrong or suggest any improvements?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-05-31 12:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-05-31 01:55 PM
Can you clarify what you mean by "not getting any results"? At what point in the 3 steps you described does the process seem to fail? For example, is the process correctly finding MEP elements? If so, how are you trying to get the required information from them (and what happens)?
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-06-03 06:52 AM
In the third step, I am not able to obtain any polyline data; First two steps succeed. When I use the following line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2024-06-03 11:41 AM