Hi all,
Does anyone know of any way the extract data from Section Cut Graphics of a Clip Volume, specifically coordinates? I havent had any luck in VBA with anything I have tried, but willing to move to the SDK if theres a solution there.
What I am aiming to do is to insert a cell at the extents of a clip volume cut and just need to find a way to get coordinates I can use as insertion points.
I am using Microstation CE Update 15.2.
Regards,
Mark
Mark Shamoun said:What I am aiming to do is to insert a cell at the extents of a clip volume cut
What is that clip volume cut? Is it a DGN graphic element, a saved view, a fence boundary or something else?
Please post a small DGN example, annotated so we know where you want to place the cells.
Regards, Jon Summers LA Solutions
Hi Jon,
Its simply Cut graphics from a Clip Volume, created by creating a Clip Volume in a 3d DGN model and then only toggling the Cut option in the View settings.
In the previously attached image, i hope to find the coordinate of the left-most and right-most point as an example.
OpenRoads Designer 2023 | Microstation 2023.2 | ProjectWise 2023
Hi Mark,
Mark Shamoun said:Its simply Cut graphics from a Clip Volume,
using the picture you shared it seems it's not quite true: The section graphics seems to come from reference, so it leads to a question whether it's saved view (how the section is identified and attached as a reference) and also whether it's cached or not.
Mark Shamoun said:I havent had any luck in VBA with anything I have tried, but willing to move to the SDK if theres a solution there.
I guess it's not possible in VBA (but it's really a guess only). Section graphics is generated on the fly (when not cached), whereas classic VBA expects elements persisted in DGN file.
What is accessible in VBA when elements are selected (so they can be retrieved from the selection set)?
Using C++, maybe also NET, you should be able to do it.
Mark Shamoun said: Does anyone know of any way the extract data from Section Cut Graphics of a Clip Volume, specifically coordinates?
Does anyone know of any way the extract data from Section Cut Graphics of a Clip Volume, specifically coordinates?
What exactly to you want to retrieve, based on what identification? Specific element (how it will be identified), the min/max coordinates from all elements, the section borders...?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Jan Šlegr said:using the picture you shared it seems it's not quite true: The section graphics seems to come from reference, so it leads to a question whether it's saved view (how the section is identified and attached as a reference) and also whether it's cached or not.
Apologies, it is just a referenced in 3d DGN model with no caching or anything like that. Similarly I would be looking to use the same clip volume cut function with live 3d data in some circumstances.
Jan Šlegr said:What is accessible in VBA when elements are selected (so they can be retrieved from the selection set)?
The entire unclipped elements are visible in VBA, i have had no success with VBA "seeing" that the elements are clipped. All data returned is as if the elements have not been clipped at all.
Jan Šlegr said:What exactly to you want to retrieve, based on what identification? Specific element (how it will be identified), the min/max coordinates from all elements, the section borders...?
Maybe this will make more sense - these 3d models include linear 3d linestrings. that when clipped to Cut Graphics end up being a single point - what i would like to do write a routine to attach a cell to these clipped linestring points (I hope that makes sense?)
Mark Shamoun said: when clipped to Cut Graphics end up being a single point - what i would like to do write a routine to attach a cell to these clipped linestring points
Here's a macro to find zero-length lines. Perhaps you can adapt that?
Mark Shamoun said:it is just a referenced in 3d DGN model with no caching or anything like that.
ok, so in such case, I guess the clipped elements are generated on the fly and do not exist anywhere.
Mark Shamoun said:i have had no success with VBA "seeing" that the elements are clipped.
Yes, because VBA API is designed to work primarily with element persisted in DGN file, whereas clipped elements are typically created as in-memory representation (and even more, often using different element type than source element ;-)
Mark Shamoun said:what i would like to do write a routine to attach a cell to these clipped linestring points (I hope that makes sense?)
Yes, it makes sense.
I see two individual tasks there:
Different aspects of clipping were discussed in the past already, so I recommend to search this forum for similar topics. But be aware, probably only C++ API is able to handle all requirements.