Hello!
I´m trying to create a complex element consisting of multiple subelements :
For that I´m using C++ MDL API. First I create complex header via mdlComplexChain_createHeader. Then I create my subelements. Lines are created within single mdlLine call, while Complex chains are in loops with multiple mdlLine calls and then appending them to the mother header(The complex chain). After I create them, i append them to the owner with mdlElmdscr_appendDscr() . However, even though my creation is closed element (all lines are connected), microstation keeps adding a line between my two single lines, like the shape wasnt closed or something. Im also attaching a picture describing my problem. The same behavior happens even if i dont add the complex chains...
Thanks for any tips.
Lubo
Lubo B said:First I create complex header via mdlComplexChain_createHeader. Then I create my subelements. Lines are created within single mdlLine call, while Complex chains are in loops with multiple mdlLine calls and then appending them to the mother header(The complex chain). After I create them, i append them to the owner with mdlElmdscr_appendDscr()
It's faster to post a code sample than to describe it. Also, a code sample removes any ambiguity in our interpretation of what you're doing.
Lubo B said:MicroStation keeps adding a line between my two single lines
The direction of lines is important. In the closed shape you are creating, all components must be clockwise or counter-clockwise.
Lubo B said:I use MSVC
Here's a table of Visual Studio and MicroStation SDK versions.
Regards, Jon Summers LA Solutions
I tried to play around also with the directions of my lines, sometimes the "connection line"(the problematic one) changes direction too ( changes the vertices that its connecting), but I never got to get rid of it. I also tried to specify in mdlComplexChain_createHeader that I wanted to create complex chain instead of complex shape(in hope of this line disappearing), but didnt work as well. The problem is also that I cant access this problematic line from code, so cant hide it manually after creating my element.
Lubo B said:I tried to play around
As Jon wrote: Post your code.
To explain by words what your code does, does not provide any usable details and the problem cannot be analyzed.
It's like to discuss a problem with playing on piano describing what finger to when put on what key, but to do not share music notation. I think you agree it would be time wasting useless discussion.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Jan Šlegr said:It's like to discuss a problem with playing on piano describing what finger to when put on what key
Good analogy!