[V8i C++] Problems with "On the fly" cell creation and Annotation Scale

Hi all,

I want to create some cells "On the fly" and set the Annotation Scale.

I've tried to follow the guidelines in this thread: 

https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/83654/v8i-c-on-the-fly-cell-creation-and-annotation-scale/234571

Based on this I've now got these lines:

mdlCell_setIsAnnotation(pedCellElm, TRUE);

TransformInfo addAnnotationScale;

addAnnotationScale.SetOptions(TRANSFORM_OPTIONS_AllowSizeChange | TRANSFORM_OPTIONS_ApplyAnnotationScale);
addAnnotationScale.SetAnnotationScaleAction(ANNOTATIONSCALE_ADD);
addAnnotationScale.SetAnnotationScale(mdlModelRef_getEffectiveAnnotationScale(mdlModelRef_getActive()));
EditElemHandle eeh(pedCellElm, true, false);
eeh.GetHandler().ApplyTransform(eeh, addAnnotationScale);

My problem is that MicroStation crashes in the last line (ApplyTransform)

What am I doing wrong ?

Regards, Evan

Parents Reply Children
No Data