Hi,
I some drawings (dgn files, converted from dwg files) that have some tables in them. I would like to use vba to delete all these tables. Is there an msdElementType for a table? Or something equivalent?
--Thanks,--Robert Arnold
Hi Robert,
RobertArnold said:dgn files, converted from dwg files
to be sure: Are the tables, when converted from dwg, represented zas MicroStation tables?
RobertArnold said:Is there an msdElementType for a table?
I think tables are stored as extended element, so no 'element type id' exists: all elements, stored as extended type, share the same type (but different element handler).
RobertArnold said:I would like to use vba to delete
I think tables are not supported by VBA
But maybe the tables can be selected by key-in?
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,
In the Mstn information dialog, it lists the type of these element as "Table" with rows and columns.
Yes, I do see that using a msdElementType value of 106 includes the tables. Is there a way of seeing what the "element handler" is from vba?
RobertArnold said:Is there a way of seeing what the "element handler" is from vba?
Handlers are an OOP concept. VBA pre-dates such concepts by a decade or so.
VBA lets you Declare a procedural function from Windows or MDL implemented in a DLL. It doesn't provide access to OO classes implemented in a DLL
Regards, Jon Summers LA Solutions
Is there a list of element types that would be included in msdElementType = 106? If they are all items that I don't need, maybe I just delete all type 106 elements...
--Thanks,--Robert
No. VBA API is based on element types IDs, so not compatible with the concept of "one element type for different elements".
RobertArnold said:Is there a list of element types that would be included in msdElementType = 106?
No. Even in SDK, type 106 (and 107, which is non-graphical variant) is not listed.
What I know, 106/107 elements are used for tables, parametric modeling, point clouds attachment, some elements created by OpenCities Map products, and maybe even more.
The situation is even more complicated: Types 106 and 107 can be used together, so one element (as seen by a user) can be stored as several 106 and 107 elements. Only the owner handler knows how to access these elements.
Honestly, I think there is no solution using VBA (unfortunately there is also no key-in to select tables in opened model).
With regards,