[V8 MDL] Is mdlElmdscr_areTwoIdentical broken?

I wrote some VBA code to compare two elements.  The VBA code calls into the MDL.  The VBA code uses mdlElmdscr_areIdenticalToTolerance because mdlElmdscr_areTwoIdentical never returns True.

Is mdlElmdscr_areTwoIdentical broken?

Parents
  • mdlElmdscr_areTwoIdentical just does a memcmp of the element data...so unless you created the 2nd descriptor by calling mdlElmdscr_duplicate you do want to allow for some "fuzz" in the comparison of doubles, etc.

    HTH

    -B



    Answer Verified By: Jon Summers 

  • Unknown said:
    mdlElmdscr_areTwoIdentical just does a memcmp of the element data

    Two otherwise identical elements will have different and unique Element IDs.  Since the Element ID is part of an element's data (see struct elm_hdr in mselems.h), performing memcmp on two MSElements will always tell us that they are different.

    Consequently, mdlElmdscr_areIdenticalToTolerance is a better choice — not because of the tolerance parameters, but because of the comparison flags.  The flags (see header file mselmdsc.fdf) let us instruct MicroStation to ignore certain data, such as the Element ID, when comparing two elements.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: Jon Summers 

Reply
  • Unknown said:
    mdlElmdscr_areTwoIdentical just does a memcmp of the element data

    Two otherwise identical elements will have different and unique Element IDs.  Since the Element ID is part of an element's data (see struct elm_hdr in mselems.h), performing memcmp on two MSElements will always tell us that they are different.

    Consequently, mdlElmdscr_areIdenticalToTolerance is a better choice — not because of the tolerance parameters, but because of the comparison flags.  The flags (see header file mselmdsc.fdf) let us instruct MicroStation to ignore certain data, such as the Element ID, when comparing two elements.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: Jon Summers 

Children