farhad Posted March 16, 2020 Posted March 16, 2020 I want hatch (different pattern) many areas that made by lines I have coordinate of internal point, pattern name, hatch color, background color in excel sheet Can anybody tell me how I do that at ones? Quote
steven-g Posted March 16, 2020 Posted March 16, 2020 Are the areas closed? You can run a macro created in Excel to do what you need for hundreds of hatches but if there are any non 'closed' areas it will break the chain of commands. If you are sure all areas are closed then post a sample of the excel data, it will probably need sorting into a different order, it will be easier to explain with a sample to work from. 1 Quote
farhad Posted March 28, 2020 Author Posted March 28, 2020 thnx steven-g all areas are closed all custom hatch pattern path was added to support files there is a sample of the excel data Book1.xlsx Quote
BIGAL Posted March 28, 2020 Posted March 28, 2020 Matching your sample put this in cell G2 =CONCATENATE("-hatch Properties ",C2," ",D2," ",E2," ",A2,",",B2," ") then copy down for all hatches, then select the cells in column G copy then paste to Autocad command line. hatches should appear. 1 Quote
steven-g Posted March 29, 2020 Posted March 29, 2020 This should work, select the 'yellow' cells Ctrl+c then in AutoCAD LT make sure the command line is active, the cursor should be blinking in the command line, so you might need to click on the command line a couple of times, then Ctrl+v (if the command line isn't active then AutoCAD will use pasteclip). Hatch.xlsx 1 Quote
steven-g Posted March 30, 2020 Posted March 30, 2020 Hi Bigal, it's a concatenate shortcut and easier to spell Quote
farhad Posted April 15, 2020 Author Posted April 15, 2020 I wrote 320 line in excel sheet to hatch 320 areas The problem comes in when I try to copy all line and paste in command line "Valid hatch boundary not found. Point is directly on an object." but when I copy just 5-10 line and zoom to areas it works all areas are closed and internal point is correct. Is there a way to do that at ones? HATCH.dwg HATCH.xlsx Quote
steven-g Posted April 15, 2020 Posted April 15, 2020 Running a script brings with it a few problems all of it's own. For example if the coordinates you use are close to snap points then Autocad will still snap to them, I don't think that is the problem here though. In any case it is wise to turn off osnaps before running a script unless your script actually uses osnaps. The hatch command can be fussy with internal pick points if it can't 'see' the whole area physically on the screen, so you would need to zoom to each hatch area before using the hatch command. But another problem here are the coordinates you are using the pick points are just too close to the boundaries only 0.1 units away and even in a script AutoCAD thinks it is you entering commands and clicking with the mouse, it looks like AutoCAD thinks you are picking the boundaries because your coordinates are so close to the edges. We would need to see your command history to say for certain exactly what the problem is, but if you run the script and look through the command history yourself you probably will see Analyzing the selected data... Point is directly on an object. This shows that your coordinates are too close to the boundary lines, or you might also see Analyzing the selected data... Valid hatch boundary not found. Teling you AutoCAD can't 'see' the boundary as it isn't on screen. You could start each line of the script with the zoom command and use the 'centre' option giving it the same coordinates as the hatch pattern and then a zoom level of maybe 100 (thats going to be trial and error) but most important is first make the coordinates closer to the centre of the hatch areas, or at the very least further from the edges. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.