All Activity
- Past hour
-
Lisp routine to add hatch geometry to properties from unbounded hatch
andyb57J replied to andyb57J's topic in Civil 3D & LDD
I fully understand what you were saying but joining the polylines for each piece of hatch (where there maybe over 1000 individual hatch areas is just not practical. As I said previously my current process was to use the HATCHGENERATEBOUNDRY command to regenerate the boundaries and then re-hatch them globally. This provided me with the two missing fields in the property manager being the area and accumulated area of all selected hatch which was the information I was try to obtain. What I was hoping to achieve was being able to use the hatch already within the drawing once it has been exported from Civil3d to AutoCAD without having to regenerate the boundaries and hatches which would be on multiple layers. The post by BIGAL yesterday and the lisp he provided supplies the missing data within the command line which is suitable as this data is only required to complete spreadsheets within the drawing o convey information to the user etc. Again I thank you for your input. -
Lisp routine to add hatch geometry to properties from unbounded hatch
SLW210 replied to andyb57J's topic in Civil 3D & LDD
I moved your thread to the Civil 3D & LDD Forum since this is a Civil 3D issue, specifically. -
Lisp routine to add hatch geometry to properties from unbounded hatch
SLW210 replied to andyb57J's topic in Civil 3D & LDD
The solution is to recreate the hatch boundary has has been suggested several times. You might can fix them using MAPCLEAN. As I stated the polylines are there, you just need to join and close. - Today
-
Lisp routine to add hatch geometry to properties from unbounded hatch
SLW210 replied to andyb57J's topic in Civil 3D & LDD
The link works fine for me. Basically it states the reason the information is missing is due to errors in the creation of the geometry. You should have stated you were having trouble accessing the Autodesk Forums. -
Lisp routine to add hatch geometry to properties from unbounded hatch
andyb57J replied to andyb57J's topic in Civil 3D & LDD
Thankyou so much. This is generally what I wanted although it still doesnt show the area etc in the properties manager after it recreates the hatch. but I get the information I need from the command line. Again thankyou -
Hello fellow Cadsters, I had the unfortunate experience of a computer technician who updated my OS unilaterally without my authorization. Now Autocad will not run. Does anyone have access to a an active link for the Autocad SP2 .dmg? Shot in the dark, this is a messed up situation that is best resolved with thousands of dollars I do not want to spend right now. So anyone who can help me would have my eternal gratitude. Scott
-
scottt63 joined the community
-
Lisp routine to add hatch geometry to properties from unbounded hatch
andyb57J replied to andyb57J's topic in Civil 3D & LDD
Thankyou. This gives what I needed even though area is shown in the command line. -
Lisp routine to add hatch geometry to properties from unbounded hatch
andyb57J replied to andyb57J's topic in Civil 3D & LDD
The left is the hatched area as exported from Civil3d using using the EXPORTC3DDRAWING command. As you can see although AutoCAD shows the hatch as "HATCH" there is no geometry (ie. Area or Accumulated Area). The right is the hatched area after I use the GENERATEHATCHBOUNDRY command and rehatch the area. It gives the two geometry fields I require. Purpose is to allow the user without Civil3d to select the hatched areas, (given there could be hundreds of them) and obtain the accumulated area from the drawing without having to manually calculate or use excel spreadsheets. - Yesterday
-
Lisp routine to add hatch geometry to properties from unbounded hatch
andyb57J replied to andyb57J's topic in Civil 3D & LDD
Thankyou -
Lisp routine to add hatch geometry to properties from unbounded hatch
andyb57J replied to andyb57J's topic in Civil 3D & LDD
Thankyou and I did but unfortunately that site just continually refreshes. Doesn't give me a chance to read it'. Will keep trying -
Pick block insert point only
JerryFiedler replied to JerryFiedler's topic in AutoCAD 2D Drafting, Object Properties & Interface
Okay I had time to investigate this issue. True, the "Show grips within blocks" setting toggles the grip's visibility for a block. That is, when you SELECT the block you either see all grips or just the insert point. However, if for example, you use a command like LINE and you are asked to "select the start point" and you move your cursor onto the block each and every one of the internal grips is energized as the cursor passes over it. So, that setting really is not what I was looking for. What I need is the AutoCAD point selection routine to only SELECT the insert point for blocks. I will solve my issue by using "points" instead of my target block. The "point" only has one grip so even if you are zoomed out the point selection routine will get the proper point. Let's consider this post solved. Thanks for your interest. -
Full screen Interface
BIGAL replied to Discus84's topic in AutoCAD 2D Drafting, Object Properties & Interface
Yes but makes drafting hard. menubar command, drag toolbars onto the main screen area and click the red "X", Ribbonclose to remove ribbon. -
Copy model AND paperspace
BIGAL replied to Discus84's topic in AutoCAD 2D Drafting, Object Properties & Interface
"Edit, Paste to original coordinates" Copy & paste Model Copy & Paste layout Copy & Paste layout -
niknik joined the community
-
Hi, Is there a way to remove all menus and icons and just work with black background in Autocad 2010? Thanks!
-
so is this lisp correct? yhanks very much
-
Get the Z coordinate from a set of 3D faces at the specified point's coordinates
GLAVCVS replied to dilan's topic in AutoLISP, Visual LISP & DCL
But this isn't the only anomaly in your drawing. As @Stefan BMR says, there are many duplicate 3DFACEs. And sometimes, the Z coordinates don't even match. With all this, your interpolation algorithm becomes unreliable because it depends on the 3DFACE you choose to determine the Z value. Therefore, I think you need to first filter your drawing to eliminate duplicate 3DFACEs using some criteria. -
You may also need (acet-load-expresstools) Needed on some Express Tools to use in LISP.
-
Lisp routine to add hatch geometry to properties from unbounded hatch
SLW210 replied to andyb57J's topic in Civil 3D & LDD
Did you even bother to click the link I posted that explains the issue? -
Copy model AND paperspace
Discus84 replied to Discus84's topic in AutoCAD 2D Drafting, Object Properties & Interface
Hi, Almost good except: there, in the original coordinates is the same MS object , projected to the same PS layouts. If there was a way to move MS items with their corresponding PS layouts then a copy paste would work. Thanks for reply. -
Marc I corrected the code above. Use it carefully. Based on your sample, I assumed that there is always a hatch and a region. If the region is missing, the result would be an empty block.
-
Hello Stefan, thanks for your suggestion. I've tried to run your code but it prompts this error: no function definition: STOCK:ACDOC I am not familiar with Visual Lisp then I've re-written my code in order to explode the Region instead of the Hatch. Now it works much better, thank you!!! I've also managed to solve the problem to erase all the exploded blocks by including another erasing routine.
-
Get the Z coordinate from a set of 3D faces at the specified point's coordinates
GLAVCVS replied to dilan's topic in AutoLISP, Visual LISP & DCL
I hadn't realized. There's a problem with the 3DFACEs in your drawing. Normally, the first and last points coincide. But in your drawing, the first and second points coincide. If you want to solve it you can use this code: (defun c:ajusta3DFACEs (/ cj ent lstent p1 p2 p3 p4 n r la c) (if (setq cj (ssget "x" '((0 . "3DFACE")))) (while (setq ent (ssname cj (setq n (if n (1+ n) 0)))) (setq lstent (entget ent) r nil la nil c 9) (foreach l lstent (if (member (car l) '(10 11 12 13)) (if la (if (not (equal (cdr l) (cdr la) 1e-8)) (setq r (cons (cons (setq c (1+ c)) (cdr l)) r) la l) ) (setq r (cons (cons (setq c (1+ c)) (cdr l)) r) la l) ) ) ) (if (= (length r) 3) (entmod (append (reverse (cdr (member (assoc 10 lstent) (reverse lstent)))) (reverse (cons (cons 13 (cdr (last r))) r)) (list (assoc 70 lstent)) ) ) ) ) ) ) -
Get the Z coordinate from a set of 3D faces at the specified point's coordinates
BIGAL replied to dilan's topic in AutoLISP, Visual LISP & DCL
This may be useful. A different method. The p1 is from your list, the 3d is a 3dface. ; get point on 3dface ; By Alan H Oct 2021 (defun c:pt3dface ( ) (while (setq p1 (getpoint "\npick point")) (setq p2 (mapcar '+ p1 (list 0.0 0.0 10000.0))) (setq 3d (entget (car (entsel "\npick 3dface")))) (setq p3 (cdr (assoc 10 3d))) (setq p4 (cdr (assoc 11 3d))) (setq p5 (cdr (assoc 12 3d))) (setq zpt (cal "ilp(p1,p2,p3,p4,p5)")) (if (= zpt nil) (princ "\nPoint not on 3dface") (alert (strcat "\nPoint is X= " (rtos (car zpt) 2 3) " Y= " (rtos (cadr zpt) 2 3) " Z= " (rtos (caddr zpt) 2 3))) ) (setq zpt nil) ) (princ) ) (c:pt3dface) -
Get the Z coordinate from a set of 3D faces at the specified point's coordinates
dilan replied to dilan's topic in AutoLISP, Visual LISP & DCL
Yes, you are right. My list can have 100 thousand points or more, and analyzing each point for each set of 3D faces takes a lot of time. In the drawing, 3D faces are duplicated only by the X and Y coordinates. But the coordinates of the Z vertices of these 3D faces are different, the difference can be minimal, sometimes one of the three vertices may be the same, but the other two are different. And I have to calculate this minimal difference or count 0 if the vertices are in the same coordinate Z in the vertices of the 3D faces. It turns out that each set of 3D faces is created by one point, but for each set, the coordinate of the Z points is different or sometimes equal. -
Get the Z coordinate from a set of 3D faces at the specified point's coordinates
Stefan BMR replied to dilan's topic in AutoLISP, Visual LISP & DCL
Dilan In your first post code, if the point is on a vertex or on a edge, one of 3 inters functions will return a point, so your program stops calculating the elevation, because, later, the if function checks for null inters. There is another way, for sure. I'll give it a try later. The pvertexlist and overtexlist lists are not correct built. Some of the points are nil. I think it's easier to extract the coordinates from ENAME, from 10, 11, 12 and 13 dxf codes, then remove the duplicate. A 3dface has always 4 coordinates, but if it shows just 3, that means 1 is duplicated. More, you consider the duplicate pair the first and the second vertex, but in reality it can be any pair. In the dxf, you have multiple 3dface duplicates. Is it really necessary? I guess the sample ij just a small part of a larger project and you are comparing each point with each face. Eliminating the duplicates will improve the speed quite a lot. BTW, calling the function for each point with the same selection, and then extracting the coordinates from each face over and over again, it is also time consuming.