Hello.
I have one very strange issue with hatch patternscale, and couldn't understand what cause it so I hope
that somebody know why this happen.
Problem is when I set patternscale value to Hatch entity with code, pattern is not scaled on the same way as
if it's scaled from AutoCAD user interface. For example if I set value to 0.1, than set to 0.2, set back to 0.1 it's
visible that hatch patterns scaling is not identical in two iterations with same patternscale value 0.1. This is not case if I change patternscale inside AutoCAD UI. On Properties pallete is visible that parameter is applied
properly, but does not have same effect on pattern scaling when value is changed from code and AutoCAD UI.
this is code:
// Start a transaction
using (_AcDb.Transaction tr = db.TransactionManager.StartTransaction())
{
//Hatch entity
_AcDb.Hatch hatch = (_AcDb.Hatch)objid.GetObject(_AcDb.OpenMode.ForWrite);
//Pattern and scale
hatch.PatternScale = Scale;
hatch.PatternSpace = Scale;
//Color
hatch.ColorIndex = iColor;
//Pattern
hatch.SetHatchPattern(_AcDb.HatchPatternType.PreDefined, "some autocad predefined");
hatch.EvaluateHatch(true);
//Accept changes
tr.Commit();
}
edit Kerry : [ code=csharp ]