replace hatch with another pattern

replace hatch with another pattern

Anonymous
Not applicable
694 Views
3 Replies
Message 1 of 4

replace hatch with another pattern

Anonymous
Not applicable
Does anyone have a VB code to replace one named hatch pattern with another. I'm driving AutoCAD 2000 from VB 6. I need to replace pattern SOLID with a closely spaced ANSI31. What I really should do is replace any pattern which can't be exploded with some default pattern that can be exploded. My end result is a DXF file without anything that resembles a BLOCK. I have an old legacy VAX/VMS program that cant deal with blocks importing these stripped down dxf files. thanks LJB
0 Likes
695 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Hi ljb From Acad Help (2005), not sure for 2000: object.SetPattern PatternType, PatternName Object: - Hatch The object or objects this method applies to. PatternType: AcPatternType enum; input-only - acHatchPatternTypePreDefined Selects the pattern name from those defined in the acad.pat file. - acHatchPatternTypeUserDefined Defines a pattern of lines using the current linetype. - acHatchPatternTypeCustomDefined Selects the pattern name from a PAT file other than the acad.pat file. PatternName: String; input-only The name of the pattern. Sets a default hatch pattern name of up to 34 characters, no spaces allowed. Returns "" if there is no default. Enter a period (.) to set no default. Remarks: The hatch pattern can be defined by one of the following options: PreDefined: Selects the pattern name from those defined in the acad.pat file. UserDefined: Defines a pattern of lines using the current linetype. CustomDefined: Selects the pattern name from a PAT file other than the acad.pat file. NOTE The SetPattern method should only be used for the active document. Cheers -- Juerg Menzi MENZI ENGINEERING GmbH, Switzerland http://www.menziengineering.ch
0 Likes
Message 3 of 4

Anonymous
Not applicable
What determines if a hatch can be exploded? Is pattern SOLID unique or are there other patterns that cant be exploded and I would need to replace? thanks
0 Likes
Message 4 of 4

Anonymous
Not applicable
Hi ljb AFAIK, you can explode each pattern except 'SOLID'. Cheers -- Juerg Menzi MENZI ENGINEERING GmbH, Switzerland http://www.menziengineering.ch
0 Likes