We use the mdlPatter_area function in different MS Versions from SE to Connect . (We develop MDL since 1989
In Connect we have the following problem which works fine in SE up to V8i.
The same drawing, the same values like cellname , size etc.. , same cell library. It is archpa.cell which we use the origin from Connect and a test with the V8i library.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In Connect the patter nlike ANSI31 are not correct scaled, BATEN pattern does not appear etc..
In other drawings ANSI31 etc are OK, but BATEN is missing etc.
It seems that Connect uses additional values from the DGN settings which V8i (or SE to V8i) do not
Regards
Thomas Kurtz
Small code snippet. Same in V8i and Connect, Same Values
patt_err = mdlPattern_area
(&patternEdP,/* Output element descriptor */
edP, /* Element to be patterned */
NULL, /* No holes */
NULL, /* No cell descriptor */
uniCellName,
groesse, /* Active pattern scale */
angle, /* Pattern angle in radians */
rowSpacing, /* Active row spacing */
columnSpacing, /* Active column spacing */
-1, /* View < 0 => use top view */
FALSE, /* Search NOT file for holes */
NULL); /* Use design file origin */
Thomas Kurtz said:We use the mdlPatter_area function
There's an example of IAreaFillPropertiesEdit in SDK example ..\Elements\ElementsExample\ElementsExampleEditTool.cpp.
IAreaFillPropertiesEdit
..\Elements\ElementsExample\ElementsExampleEditTool.cpp
In general, where a new class exists in the MicroStationAPI, it's preferable to use that rather than the MDL functions. The MDL functions seem to be neglected after the introduction of a class-based API.
Regards, Jon Summers LA Solutions
Jon Summers said:In general, where a new class exists in the MicroStationAPI, it's preferable to use that rather than the MDL functions.
In general, if the mdl function still exists and isn't deprecated, it should produce the same result as it did previously. When applicable, the mdl function will wrap the C++ api as is the case with the pattern api. Sure switch to C++ if you're up to it, but that also means a larger switch to use things like EditElementHandle, etc. and might not be worth when you potentially end up executing the same code, i.e. IAreaFillPropertiesEdit is already being called by mdlPattern_area.
Thomas Kurtz said:It seems that Connect uses additional values from the DGN settings which V8i (or SE to V8i) do not
This should not be the case. Connect started supporting annotation scale for patterns, and this was back ported to some V8i version, but that shouldn't be a factor if you haven't set it for your models...
Extract the pattern params in V8 and Connect and compare the modifier flags for both true scale and annotation scale...
HTH
-B