I am working on OpenCities Map Enterprise CONNECT Edition Update 6 Version 10.06.01.02.
I am having issues with these two functions, CreateCellElement1 and AddElements. When passing the arrays of elements the application throws an error.
Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE))
at Bentley.Interop.MicroStationDGN.Application.CreateCellElement1(String Name, Element& Elements, Point3d& Origin, Boolean IsPointCell)
Originally had this application running on MicroStation v8i. I use these two functions to draw the elements in groups. After converting to OpenCities and swapping out all the dlls the application throws an error on these two functions. I am able to draw each element individually without any issues. The strange thing is sometimes the functions executes properly, however most of the time they do not. I am using .NET Framework 4.7.2.
Any assistance or guidance would be greatly appreciated. Thank you.
This forum is for regular use discussion of the civil design software.
Since you are discussing actual programming, you probably want the Civil Programming forum or the regular Programming forum. There is also a specfic OpenCities forum that may be helpful to you.
You can move your post by selecting the "More" next to "Cancel and "This Helped me" at the bottom of your post.
Microstation 08.11.09.919Power GeoPak 08.11.09.918Power InRoads 08.11.09.918
I recommend to move your question to Geospatial programming forum, specialized to programming of OCM products. To move existing discussion to another forum, use More > Move tool under your original post.
Also, please share your code. To discuss programming problems without knowing the code makes no sense.
BTW You mentioned you use Net 4.7, but the latest OCM products are based on Net 4.6.2.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
I built my application under both 4.6.2 and 4.7.2 and the same issue occurs.
Anytime I call CreateCellElements1() or AddElements() the error message is thrown. I am able to call the other create elements without any issues and I am able to call AddElement(). But when I pass an array the application does not like this.
Joey Luen said:I built my application under both 4.6.2 and 4.7.2 and the same issue occurs.
It's good to know. Even when the difference between the version is minor and should typically not cause any problems, it's always better to target exactly the same NET Framework version.
Joey Luen said:Anytime I call CreateCellElements1() or AddElements() the error message is thrown.
Sorry, but this is not code!
It seems you try to discuss two different issues, because the two mentioned methods do different things. Also the context is very different.
It's recommended to do not mix more issues into one topic, because in discussion it's not typically clear what exactly is discussed.
Joey Luen said:CreateCellElements1()
The method takes a cell from library. Do the library and the cell exist?
Joey Luen said:AddElements()
I would say it's probably bug (especially when AddElement() works. But again, it would be nice to see the code.
Joey Luen said:the error message is thrown
Did you try the same methods in VBA? (because it may help to distinguish whether it's e.g. bug in implementation)
Exists both errors in any workspace? (because how cells are treated by DSF depends on workspace and XFM configuration)
Did you try to create and analyze memory dump? (in this case probably the max one, including managed heap)
Is it possible to try the same code with the latest OCM CE Update 7?