Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hatching individually ????? 3

Status
Not open for further replies.

turbo2omni

Mechanical
Dec 27, 2002
13
0
0
US
I use autocad files to import into our laser programming system and have to hatch letter and any designs individually.

ie: a e i o u

would require five separate hatch entities to burn the "best" on the part (heat concentration isssues)

The best way I have now is "H" and select the area and pound the spacebar or enter key four times and go again.

there has to be some way to do this (last job contained 5 thousand charcters, that is 25,000 keystrokes in hatching alone) I NEED to be able to select lots of characters and have autocad make each one its on hatch pattern. I am new to writing lisp files so this feels alittle over my head for now but I am learning very quickly

please any one HELP. I am going crazy!!! space space space space YES CRAZY space space space space

TIA
 
Replies continue below

Recommended for you

I would suggest that in a seperate drawing create A-Z in each five hatch patterns you want and store the drawing with the WBLOCK command. In your main drawing, use insert block to bring the hatch entities into the drawing. Explode the block and use copy command to bring whatever hatch entities into your drawing. When you get through, draw a rectangle and delete the entities. This only works with one drawing scale. On the design aspect, you need to ask other people in your office that maybe has already created this designs otherwise maybe contacting these organizations about emailing their Autocad designs to you. The point is why reinvent the wheel when someone else already have. Let me know if this approach is acceptable.

 
OK I am not sure I understand you totally but I don't think I was perferctly clear either.

The charaters, symbols and shapes I must hatch are always different. different font different logo ect. So... there would be no way for me to make any quick blocks to just insert.

Our laser software likes R14 DWGS better than any other format in can except. If I want to burn the letter "R" onto a part. I have to type it out in autocad, explode it to turn it into a pline the use a hatch pattern to create the fill. Our laser software doesn't care what kind, scale, or anything the hatch pattern is in autocad. it just "see's" a hatch pattern with said boundry's. It then uses this information to create a "toolpath" for the laser beam.

The problem I am trying to fix is that if I have 10 circles to fill and I select them all at once and create one hatch object the laser software see's that as such and during the "burn" would jump from circle to circle, not creating the quaility or speed of burn we need. SO.... what I have to do is hatch all 10 circles individually the laser reads it as 10 separate objects burns them as such and life is great for the laser operator. but.... often I get jobs with 1000 plus separate objects and recently 5000 objects, so hatching them one by one is a real pain to say the least. My space bar needs your help

 
you could make a button that looks like this

^C^Chatch;ansi31;1;0;\;

"ansi31" can be whatever hatch pattern you are using
and then "1" is the scale and "0" is the angle.
(if you use the solid pattern, you dont need scale and rotation)
The "\" is a pause for you to pick an object, and then it has a final enter to finish.
As long as you have closed plines this will work.
Basically, hit the button, pick the object, hit the button, pick the object, etc.

If you don't want to hit the button everytime, you could put the code into a lisp, and have a button to call the lisp. Then when you hit the spacebar, it will repeat the whole series over again, (otherwise it will just repeat the hatch part and not the rest)
 
I am trying that button as we speak. Not a complete Cad programming type wiz. my useaga has been fairly limited, but I am on the downhill side of the learning curve now. I'll let ya'll know if I find a solution.

Thanks

and keep the ideas rolling
 
WOW thanks that button did the trick. I wasn't aware how simple it was to build a button. now instead of all kinds of spacebar pounding I am just clicking away on the mouse. much much faster
Thanks

That leaves me with is the anyway to select everything and have several hatch objects created at once or am I dreaming.

Thanks again. instead of 25000 clicks on that last job I would have been down to 10000 much faster movements
 
Try this code which I created quickly, I think it will work well, but it still needs to be developed to ensure that it does not affect autocad system variables. Tell me your results. I have tried it on a drg with four simple rectangles only.

(Defun c:htc ()
(prompt "\nSelect Objects: ")
(setq ss1 (ssget))
(setq count1 -1)
(repeat (sslength ss1)
(setq count1 (+ 1 count1))
(setq en (ssname ss1 count1))
(command ".hatch" "solid" en "")
)
(setq ss1 nil)
(princ); nice departure
)
 
Hi,
Do You need the Acad object "hatch" or can You work with lines too? If Yes, then hatch all objects with one select, and after that use "_explode"
Regards Lothar


Win NT4.0 (SP6),
ACAD 2000i (SP2), ADT 3.0 (SP3),
ACAD 2002, ADT 3.3,
OCÈ 5200

 
Yes I need hatch objects

And that lisp file seems to work pretty good. there is a couple things that would normally hatch pretty smooth that it didn't hatch but 90% is a great improvment.

Is there anything I can do for you. That program made my life so easy

Thanks
 
The only problem I have really found with that lisp program is island detection in o's and e's and r's and that kinda thing.

as far as smaple drawings go it is pretty simple just a line of text exploded into polylines and hatched so that each character has its own hatch pattern.

That lisp file is just about there.

Trust me I am reading all my "lisp for dummy's" type books ASAP.
 
Status
Not open for further replies.
Back
Top