I make an associative patterning in XM. That works.
Now I want to have the patterning a different color, syle and weight then the boundary. I tried the code below, but it does not work. Any hints?
John Schippers
paramsPattern.angle1 = ........; paramsPattern.space1 = .......; paramsPattern.space2 = .......; paramsPattern.scale = ..........; paramsPattern.weight = symb.weight; paramsPattern.color = symb.color; paramsPattern.style = symb.style;
paramsPattern.modifiers |= PATMOD_COLOR; paramsPattern.modifiers |= PATMOD_STYLE; paramsPattern.modifiers |= PATMOD_WEIGHT; paramsPattern.modifiers |= PATMOD_ANGLE1; paramsPattern.modifiers |= PATMOD_SPACE1; paramsPattern.modifiers |= PATMOD_SPACE2; paramsPattern.modifiers |= PATMOD_SCALE; paramsPattern.modifiers |= PATMOD_CELL;
patternOption = PATTERN_AREA;
status = mdlPattern_addAssociative (&pEd, -1, -1, ¶msPattern, &dataPoint, NULL, patternOption, ACTIVEMODEL); filePos = mdlElmdscr_rewrite (pEd, NULL, filePos);
The symbology stored in the pattern linkage only affects the display of point cells...is the cell you are using to pattern with a point cell?
-B
Thanks Brien, that is the solution.
Just to make this complete (I know it's not that fresh, but I stumbled over this)
Is the color in PatternParams used for hatches that are associative ?
Is there any other way to change symbology than to exchange the associative hatch/pattern at an element, with
1. extract patternparams and origin, 2. change value and modifier, 3. delete Linkage, 4. add the changed patternparams with mdlPattern_addAssociative (reusing rotation an style) ?
What happens, when more than one Linkage is appended (what is the index good for, does Bentley create more than one pattern)? And how to use it inside a mdlModify... operation (extract uses elementunion, append an elementdescriptor) ? I currently use mdlElmdscr_duplicateSingle but this adds some overhead (especially in mass operations)!
TIA Michael
What do you mean by Point Cell?
A "point cell" is a type of a Type 2 cell with certain characteristics, the latter of which are identified in Help > Contents: