DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Hatch patterns & materials

Started by adriank, June 06, 2019, 02:39:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Adrian 2.0

There is a DCad bug that I've been living with for many years that probably needs to be raised again in the hope that someone at IMSI can take a look.

The program has an infuriating habit of generating extra hatch patterns - called 'Gradient 1' up to (in most of my files) 'Gradient 399'
As far as I can work out they are all identical & I have no idea why they get created.
I have never made or used a gradient pattern in my life!
The reason it is so annoying is that of the 120 or so standard hatches (I only use maybe 30 altogether) the 2 I use most are Ansi31 & Win Solid. That's at both ends of a long list, so it's fairly easy to scroll to the bottom of the list & find Win Solid quickly.
When DCad adds 399 extra patterns on the end it's not so easy quickly scroll to the pattern I want.
Preferably I'd like DCad to stop making them, but failing that I'd like a way to (quickly) delete them - plus delete some of the standard ones I never use while I'm at it. (whales? really?)

A similar problem exists in the materials menu.
In this case, after the standard material list, DCad makes extra materials called 'Mat 23' through to 'Mat 120', then come all the materials I have created for myself (I have about 13 or 14 special materials) and after that DCad continues to produce 'Mat 121' through to 147 on the latest file I checked - but the number varies.
Again, I've never created a material called 'Mat' nor have I ever used it.
This is more annoying than the hatch patterns in a way, because the special materials I use are buried somewhere in the middle of a sea of rubbish.
The materials can be deleted, one-by-one in the options/materials menu but it's painfully slow and they just come back again anyway.

Does anyone else get annoyed by this, is there a solution?

Just to amuse myself I pasted the entire dropdown list of hatches into one screen capture (attached) to graphically demonstrate the absurdity of having 399 extra useless patterns. That's nearly 4 times the original list, and of those the ones highlighted in green are the only ones I recall using - ever.
Imagine how quickly I could find the hatch I want if I could tailor the list to suit me (and have the list alphabetical instead of 2 x alphabetical)!

Adrian

Lar

#1
Wow, what a crazy list.

I have never seen this issue though. My hatch list is pretty stable. The only time I see gradient hatches appear in the list is if I inadvertently created one somehow, which I delete. I never see hundreds of them.




The only time I ever see new hatch patterns appear in the list is if I import an autocad file with non-dcad hatches in them (haven't seen it in a while tho, so can't remember if they are strictly non-dcad hatches). I usually welcome them, though, being a nice addition to my hatch arsenal. They usually disappear between new installs.



That reminds me... I created a few custom hatches in my time and you have to add the hatch info to one of the Hatch files (but doing it wrong could cause problems). However, I have 2 gradient hatches but I don't see them in any of the 2 sys hatch files. Everything on a computer is written down somewhere so if you can find the info on the bad g-hatches you can maybe just highlight and delete. Be careful with sys files tho. Read up on what to do exactly. I haven't created any custom hatches in a while so I can't remember the pitfalls.
Lar

Adrian 2.0

Hi Lar,
Do you mean to tell me I'm the only one with this problem? Not sure how I feel about that...  'special' or 'picked on'?
I have also made (or tried to make) hatch patterns by duplicating and modifying an existing pattern in the Sys file but it's painful.
I have also in the past deleted a bunch of hatches I know I'll never use (whale) but of course they come back ass soon as I upgrade.
In the end it's too much bother & I just scroll through the long list (mine is longer than yours, it seems!) every time.

A more user-friendly interface to manage things like hatch patterns - maybe a 'favourites' folder or something would be nice.

What about materials? do you have any 'mat' additions you don't want?

Adrian

DrollTroll

#3
We had some serious discussion around this gradient issue back in V22 beta, and I believe the problem was determined to be due to the existence of custom gradients in a paperspace layout. There was a time when everytime a paperspace template was loaded, it would keep adding its custom gradients to the list in the drawing. That behavior has since been fixed, but if you've got a drawing (or template) that already had the problem, you'll need to manually delete all the gradients and re-save the drawing.

If you'd like to send me a drawing, I'll see if I can fix it for you.
As for the hatch patterns: DesignCAD has 47 vector hatch patterns (Angle - Zigzag) that are hard-coded in; there's no way to remove these. The WIN_* hatch patterns are actually bit-pattern fills, rather than vector-based, and always appear at the bottom of any vector patterns in the drawing; they are also hard-coded and can't be removed.

There is also a sample file of custom hatch patterns in DCHatchC.sys. Rename this file and restart DesignCAD and you'll only see the build-in hatch patterns( *in any new drawings you create -- existing drawings may not be affected by this*); however, as Lar mentioned, if you import a dwg file any hatch patterns it contained will also be imported into the drawing.
If you like *some* but not all of the hatch patterns in DCHatchC.sys, use a text editor like notepad or PsPad to delete the ones you don't want -- just select and the line beginning with the pattern name and all numeric lines up to the next pattern name.
25 years with DesignCAD

Adrian 2.0

Hi DT, thanks for looking at this.
My problem definitely has nothing to do with paperspace as I've never used it and I don't know anyone using DCad who does, so I've never imported a paperspace file.

I have in the past modified the DcHatch files but it is painfully slow to do and easy to make a mistake.
What is the difference between DcHatch and DcHatchc? they both appear to have the identical hatch pattern files in them.

What I can't find anywhere is the gradient hatch files - they are not in DcHatch or DcHatchc.

As you mentioned, I do sometimes get a long list of ACad hatches when I import a file, but those hatch patterns generally slot in after 'woodgrain' and before Win-solid etc. Then, after the Win-Diagcross come all 399 gradients.

Something really weird just happened.
Last week I had 'sanitised' my standard titleblock page in an attempt to reduce my 'disappearing rubber band' issue - which also sanitised the hatch pattern list. When I opened it just now however, the gradient patterns have come back, and the rubber band issue has come back with it- even though I have not edited the file since I saved it - only copy & pasted files from it to new work sheets.
I now wonder if the two issues are linked - is it only files with extra hatches that have my rubber-band issue?
For what it's worth I have attached that file, but I don't see how cleaning up one file will help, won't the problem return as soon as I open another file?

Adrian

DrollTroll

#5
OK, I have a tool that I have developed for internal use that can delete entire streams of data from a drawing. I used that tool to delete all the non-default hatch pattern definitions from your drawing (this stream also includes gradient definitions).

The drawing is attached. Please spend some time fiddling with it (open, modify, save as, switch in and out of paperspace and save, etc.) and make sure the gradients don't come back. If it stays clean, I'll send you a copy of my utility, with instructions, and the caveat that it has no safety rails -- if you accidentally destroy a drawing, it's gone.

DCHatch.Sys is basically just a redundant copy of DCHatchC.sys -- DesignCAD only actually loads the contents of DCHatchC.sys.
Once you sanitized the drawing, using it for all-new work should leave it clean of any new Gradients, but it may be that copy/pasting data from an older drawing that has the gradient population could still contaminate it. Loading any old symbol files? They may also need some gradient cleanup before they can be safely used.

Because Gradient Fills are unique to each drawing, and not a set of vector instructions, they don't get stored globally in an ini or sys file -- they're stored directly in the drawing data, in a data stream named 'Hatch Pattern'. With your posted drawing, I used my custom program to delete this entire stream from the drawing, and voila! all the gradients were gone.
25 years with DesignCAD

Lar


As for finding a particular hatch pattern in the dialog, you can just hit the first letter of the hatch's name and you will be taken to the next hatch on the list that starts with that name.


You can also record simple macros with hatch patterns you usually need to get it to be the default, thereafter just call up the regular command until you need another hard-to-get-at pattern (that you recorded a macro for).


Or, you can also have a small file of you favorite hatches opened alongside your working file, switch to this file, use the Same As button on the desired hatch, abort the command, switch back to the working file, start the hatch command there and the chosen hatch will be the default. This way you can also capture the scale and angle (having multiples of the same pattern but each with different scales and angles).


Lar




Adrian 2.0

Thank you DT, that file does indeed seem to be 'clean' of extra hatches.
Your utility tool you used sounds very useful - would it also clean out the 120-odd 'mat' materials that also have taken up residence in the file if I ask it to?
I'd love to have a copy of the tool to play with - I'm thinking that every time I open an old file with the intent of taking some drawing out of it I'll need to sanitize it first. I'm hoping that running the tool is not too time-consuming...
I do understand that I'd be using it at my own risk - I'll make backup copies of any file I try it on.

Thank you too, Lar for mentioning the idea of a dedicated hatch drawing with all my favourites drawn and scaled correctly, that's a brilliant idea. The lack of parity in scale proportions is a major fumble in programming in my opinon & I've reported on that before.
The major one that keeps catching me out is that 'Concrete' 1 & 4 need to be drawn at 10x the scale of 'Concrete' 2 & 3. If I have just hatched a section of my drawing in Conc2 then I change to Conc1 for the next hatch without remembering to change the scale the result can be so dense it hangs the program for 5 minutes while it tries to render with dots something that appears to be a solid hatch!

DrollTroll

25 years with DesignCAD

Adrian 2.0

DT, I don't know how to thank you enough - I had long suspected that you wear a cape (and your pants on the outside) but I can now confirm you are a genuine super-hero!

Your DcParcer program works beautifully - and it is so easy to use.
I experimented by deleting the material stream and sure enough, it got rid of about 120 'Mat' materials BUT it also got rid of my biggest headache - the issue with disappearing rubber-band previews that I've been battling to get help with ever since V2018 was released. I've checked with several drawings that I know cause the problem if I copy from, and they all behave normally after deleting the material stream.
I'm also deleting the hatch stream of course, but that alone does not solve the rubber-band issue, whereas the materials alone does solve it.

I did a little digging back through my old files and it appears the extra hatches & materials started appearing about May or June 2010. It started out with 3 gradient hatches appearing and 120 Matt materials. (I did find one file with 2 gradient hatches dated May 2009, but all other files in that era were clean, and I can't discount the possibility those 2 had come from an import)
By end of 2010 there were typically 50 gradient hatches in most files. Not sure when they blew out to 399, but it wasn't in one leap - I found files with 320 gradients in between then and now.

What version of DCad was current in 2009 & 2010?

I'm now in the process of copying all my 'current' folder of work to a backup disc (10,600 files!) so I can sanitize every file I need before I open it (then rename it so I know it is clean). A pity your program can't process blocks of files...

Adrian

DrollTroll

Glad it proved useful. I really didn't intend it to be used specifically for this purpose, since it's a very blunt instrument. A nicer tool would somehow allow the deletion of only actually-unused materials or hatch patterns or whatever-type-of-thing, instead of all-or-nothing. However, if all you have is a hammer, a hammer will have to do.

In may ways the Insert Manager works in a better way-- with that tool you can at least see whether a symbol is actually being used or not, and whether it's used directly in the drawing, inside another symbol, or by a paperspace template. However, it doesn't offer a means of globally deleting *all* unused symbols in one whack, so I guess there's room for improvement there as well.
25 years with DesignCAD