AddHatch Fails

FDrg.ModelSpace.AddHatch(0,'ANSI37',True,0); is returning exception message : Bad name for hatch pattern.from DelphiDoes it work with VBA

Comments

  • With VB I meant

  • try:FDrg.ModelSpace.AddHatch(1,'ANSI37',True,0);.addHatch(PatternType, PatternName, bAssociativity )On Bricscad PatternType and PatternName should match, meaning that you must pass the correct PatternType in relation to the PatternName used. If not, you will indeed get the exception message : Bad name for hatch pattern"You cannot create a Predefined Hatch named "_USER" or a UserDefined Hatch named "SOLID" or "AINSI31". BricscadDb.AcPatternType.acHatchPatternTypeUserDefined=0acHatchPatternTypePreDefined=1acHatchPatternTypeCustomDefined=2

This discussion has been closed.