AutoCAD Visual LISP / AutoLISP :: Convert Solid To Hatch?

Jan 6, 2005

is there a way to convert multiple 2d solids to hatches.

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Automatically Pick Up All Hatch And Solid Hatch Patterns

Aug 6, 2008

I am in need of a lisp routine which will automatically pick up all hatch and solid hatch patterns within a drawing and change the colour to colour 254.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Converting 2D Solid Into Hatch

Mar 26, 2012

I'm looking for a lisp routine which will 'convert' number of 2dsolid into hatch. Drawing contains dozens of 2dsolids (solids are on one layer, there are also other entities on this layer) which have different colors, have common verticies and edges. i.e. I want to kind of 'join' solids of the same color and convert them into one hatch colored as original solids and placed on existing layer (let it be layer '0' zero for now). Same color solids can exist in few locations - there is a case to make few separate hatches of the same color (all joined solids should be represented as 1 hatch, should not separate after separate hatch command). There is max of 20 different colors (all of them from ACI index). Solids are not crossing themself or other solids (just joining with 1 or 2 verticies).

There are also 2dsolids with 'zero-area' - represented as a line - those should be erased at the beginning (not to have a line-like hatch).

Example drawing attached.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Polylines Into Double Lines With Hatch

Feb 10, 2012

I need a function that allows to convert the polylines selected with a width globalize defined in a double closed line (spaced by the same width of the polyline), with a hatch inserted automatically defined.

Brilliant idea to draw raceways quickly: instead of making handmade double lines, connect, enter the hatches all by hand, you could quickly draw the polyline with width identical to the size of the duct, and then the lisp transform it into a duct more aesthetically pleasing if compared to the full polyline!

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert A Poly Face Mesh To A Solid?

Oct 10, 2011

Looking for a lisp to convert a poly face mesh to a solid.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Entmake A Hatch Entity From A Hatch Template?

May 2, 2013

I am trying to entmake a hatch entity from a hatch template.

After entget the template hatch entity, i get the followings

Select object: ((-1 . <Entity name: 7ed11b78>) (0 . "HATCH") (330 . <Entity
name: 7efc7c10>) (5 . "737") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
"SECTION-LABEL") (62 . 255) (100 . "AcDbHatch") (10 0.0 0.0 0.0) (210 0.0 0.0
1.0) (2 . "SOLID") (70 . 1) (71 . 0) (91 . 1) (92 . 1) (93 . 8) (72 . 1) (10
633596.0 5.79713e+006 0.0) (11 633519.0 5.79713e+006 0.0) (72 . 1) (10 633519.0
5.79713e+006 0.0) (11 633519.0 5.79708e+006 0.0) (72 . 1) (10 633519.0
5.79708e+006 0.0) (11 633500.0 5.79708e+006 0.0) (72 . 1) (10 633500.0

[code]....

Now I  wrote the following code using the above data as follows

(entmake (list (cons 0 "HATCH") (cons 67 0) (cons 410 "Model") (cons 8 "SECTION-LABEL") (cons 62 255) (cons 10 (list 0.0 0.0 0.0)) (cons 210 (list 0.0 0.0 1.0)) (cons 2 "SOLID") (cons 70 1) (cons 71 0) (cons 91 1) (cons 92 1) (cons 93 8) (cons 72 1) (cons 10 pt1) (cons 11 pt2) (cons 72 1) (cons 10 pt2) (cons 11 pt3) (cons 72 1) (cons 10 pt3) (cons 11 pt4) (cons 72 1) (cons 10 pt4) (cons 11 pt5) (cons 72 1) (cons 10 pt5) (cons 11 pt6) (cons 72 1) (cons 10 pt6) (cons 11 pt7) (cons 72 1) (cons 10 pt7) (cons 11 pt8) (cons 72 1) (cons 10 pt8) (cons 11 pt1) (cons 97 0) (cons 75 0) (cons 76 1) (cons 98 1) (cons 10 (list 0.0 0.0 0.0)) (cons 450 0) (cons 451 0) (cons 460 0.0) (cons 461 0.0) (cons 452 1) (cons 462 1.0) (cons 453 2) (cons 463 0.0) (cons 63 5) (cons 421 255) (cons 463 1.0) (cons 63 7) (cons 470 "LINEAR")))

The point variables pt1, pt2....pt8 are all defined. But when I run the code the hatch is not being created? Why?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Non-solid Entities On Solid Layer

Mar 19, 2012

We have this need to have all of the solids in a drawing to be placed in the "solid" layer.

Sometimes folks are drafting lines to develop these solids, and keeping the lines on the "solid" layer, rather than moving them to another layer, or deleting them altogether.

I could get folks to run this command before leaving the drawing.

I'm thinking something along the lines of:

Select all entities that are on the solids layer that are not solids.

If nil, great, do nothing.

If entities are selected, let me do something with them.

I'm hoping the following can be modified ever so slightly.

 (setq non_solid (ssget "X" (list (cons 0 "3DSOLID")(cons 8 "solid"))))

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Hatch Pattern Angles

Apr 11, 2012

Basically I have one hatch pattern that was used at different UCS values. The hatch patterns are correctly shown on the screen as shown in the attached image. But the puzzling thing is that they both have a pattern angle of 0.

I have been writing a program that globally changes hatch patterns, but the problem is that once I update the pattern, they all have the same angle. I need them to keep their current rotation when the patterns are updated. I cannot seem to find object access to what that actual angle is.

vla-get-patternangle does not seem to provide the data I am looking for.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create A Hatch Pattern

Jul 16, 2012

I'm trying to create a hatch pattern to match a floor tile. I want a 24" long x 6" wide plank tile.  The tiles should be offset from each other 8" (a 2/3 1/3 pattern lengthwise).  My problem is I only can get a 6" offset (3/4 1/4 pattern).Here's the code I've got:

0, 0,0, 0,6
90, 0,0, 6,6, 6,-18

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change All Hatch To Particular Layer

Nov 7, 2013

Lisp that can select all hatch in a drawing with a layer called AELE, even if it is embedded in a block and change it to layer AHAT with Green colour?

The layer AHAT may or may not already exist in the drawing.

We need to run the lisp on a lot of drawings (exported from Revit) so I need to use the script to run this lisp on multiple drawings.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Message When Remove Hatch

Jun 27, 2012

I have the following code to delete all hatch in a drawing. At the end of the command there is a notice that all hatch have been eliminated.

However, the last message displayed is: "Hatch boundary associativity removed".

(defun c:deletehatch ( / d l )(vl-load-com) (setq d (vla-get-activedocument (vlax-get-acad-object))) (vlax-for a (vla-get-layers d)(if (eq :vlax-true (vla-get-lock a))(progn(vla-put-lock a :vlax-false)(setq l (cons a l)) ) ) ) (vlax-for b (vla-get-blocks d)(if (eq :vlax-false (vla-get-isxref b)) (vlax-for o b (if (wcmatch (vla-get-objectname o) "AcDbHatch")(vla-delete o)) ) ) ) (foreach a l (vla-put-lock a :vlax-true)) (vla-regen d acallviewports) (princ (strcat "All HATCH have been removed")) (princ))

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Modify Hatch Code

Aug 20, 2013

Modify the attached lisp I found in this forum to work using a different hatch pattern, scale and angle.  The new hatch should be in default Autocad "LINE" pattern and angle set to 90 degrees (vertical). If possible, I would like the angle and scale to be editable.  Find attached Multi_Hatch-45 code posted by CADaStroumph in 2008.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Hatch Pattern

Nov 4, 2012

i'm newbie in customizing tools in autocad especially in creating hatch pattern. i understand that to create new hatch pattern is by adding a new hatch pattern in acad.pat file with specific angle.

my question is is it posibble to create a hatch pattern that can use specific angle follows the object shape?

This is what autocad can do by default this is what i'm trying to create

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Frame Of A 3D Solid

Oct 15, 2013

when I use the "_list" or "_massprop" command in AutoCad I can see the information in the attachment. when I use "(entget (entlast))" I can't see the values for the frame (Begrenzungsrahmen)

How can I get these values for the frame (Begrenzungsrahmen) in LISP?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Draw Insulation Hatch Around A Circle

Jul 23, 2004

Routine that will draw a insulation hatch around a circle?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Accessing Hatch Area From ActiveX

Mar 30, 2007

Hatch objects: Note To access this property, use the IAcadHatch2 interface.How can I access the Object.Area of an AutoCAD hatch. AutoCAD 2006 has properties that can be assigned to Fields so why can't I find the object att- area in any lisp vars?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Point Entity In A Hatch Pattern

Nov 29, 2012

Is it possible to include a point entity (rather than a zero-length line as in the standard SQDOTS pattern) in a custom hatch pattern?

If so what's the exact format of the line in the .pat file that defines the point?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Subtract Solid With Clearance?

Jan 19, 2012

know if there is a way to subtract one solid from another "with clearance" i.e. with an additional evenly applied clearance?  I have seen this function in other applications, wondering if it possible somehow in Autocad?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Color Of Hatch Inside Blocks

Oct 2, 2013

I don't give the right keywords with Google !?So from a classic selection (or ALL for ALL Blocks of the DWG) of entities,

we will keep ONLY blocks (Static or Dynamic)I am looking for a Lisp/VLisp routine to update all Color of Hatches inside Blocks when the Hatch Color is xxx If the color hatch is NOT XXX we don't update !

The problem : update all hatch from blocks where Color = 255 (or any other value)

---> other classic Color (1-256)
--> RGB Color 255,255,255 or any other

I don't know at all how to switch hatch entities from classic color to RGB color inside a Block..And dynamic block in Lisp/VLisp are far from my level  0.2 in Lisp ...

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Deploying Custom Hatch Patterns Using Installer

Nov 29, 2012

I am wanting to build an installer to deploy some custom hatch patterns.   Getting the hatch patterns onto disk is easy; however, I need to add this location as a support path (presumably via a registry entry) but the number of potential registry entries is huge given the combination of AutoCAD releases and verticals.   The other option I had was to deploy the hatches to the same location as ACAD.PAT and search for this location during installation.

FYI - I plan to use Inno Setup but am not opposed to another installer.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Polyline With Global Width To Hatch?

Feb 8, 2010

I have a bolt program that draws the thickness of a bolts in elevation as a polyline with a global width, what i need is a lisp to then change this lwpolyline to a hatch, ie if global width is 20 and the polyline is 30 long i need to change this to a 20x30 solid hatch, is it possible to get the the global width and length and convert this to a boundary hatch? I need the same thing done for bolts in plan too as the circle is a lwpolyline also.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Animation With Shaded Solid Model

Aug 23, 2009

I am trying to do some minor animation with a shaded solid model. I have tried mslide and a script... this make s very jerky, flashing animation.

I tried a lisp routine to move the object in small increments, again the motion is very flashy and slow, as it appears to struggle perhaps with the shading.

I noticed doing a move command, and moving the same object manually, dragging the object around the screen with a mouse makes for pretty smooth motion. Way better than what I was doing.... Is there a way to do this programatically?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Centerline Along Length Of 3D Solid Shape?

Dec 10, 2013

Lisp to draw a line along the length of a 3d solid? I have some UB (I sections) columns and beams modeled and would like to select all solids and for it draw a centerline end to end

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change All Selected Hatches To Solid?

Apr 1, 2012

I need to convert a lot of different hatches to solid hatches.

I haven´t found a way to do it in Autocad 2012.

script that cycles to all selected hatches and change the properties to solid?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Odd Shape From Solid With Profile Of Polyline

May 16, 2012

Any routine that would allow you to cut out an odd shape from a solid with the profile of a polyline?The goal would be to have all the pieces that are left, not subtract them out..

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write Routine That Will Make Layer Called Hatch

Aug 1, 2012

I am trying to write a lisp routine that will make a layer called hatch, set it as current and then run the hatch command.

BUT the hatch command is not bring up the hatch dialogue box, it just puts things on the command line.

The layer is being made & set current.

The lisp is as follows:

(defun c:hh (/ ec)
(setq ec (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command "-layer" "m" "hatch" "c" "8" "" "l" "continuous" "" "s" "hatch" "")
(command "hatch")
(setvar "cmdecho" ec)
)

On another matter, I have just found the bevel lisp routine by Terry Miller which works great BUT only for imperial measurements. How to make Terry's metric, that will work for metric measurements.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Solid Rectangle Shape File

Sep 8, 2011

I want to create a custom linetype that uses a solid rectangle 0.5wide and 1.0 long.  Basically I want to create a shape file from an existing block I have so that I can insert it into the linetype definition.  Is there an easy way to do this in ACAD 2009?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Batch Convert DGN To DWG?

Nov 23, 2011

My work needs to convert thousands of DGN files to DWG. We are using AutoCAD 2012. Is it possible to batch convert dgn files with a LISP and a mapping file?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Convert To String ACL

Jun 6, 2012

I have a list that is "acl", I would like to convert it to a string "acl", everything that I have read uses alot of code. Does this  really take that much code to do?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Field To Text

Aug 1, 2006

What is the Command that Converts a Field to Text so that I can stop a Field updating after the initial set-up? I need to apply this in lisp.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Code To Convert All Lines

Sep 18, 2013

I need a lisp code to convert all Lines, Polylines, Arcs and Splines to Polylines with 0.4 width.

I prepare this:
(defun c:CH2pl ( / SS);changes all lines, plines, arcs and splines to POLYLINE with 0.4 width(if (setq SS (ssget "_X" '((0 . "LINE"))))(command "_.pedit" "m" SS "" "Y" "w" 0.4 ""))(if (setq SS (ssget "_X" '((0 . "*POLYLINE"))))(command "_.pedit" "m" SS "" "w" 0.4 ""))(if (setq SS (ssget "_X" '((0 . "ARC"))))(command "_.pedit" "m" SS "" "Y" "w" 0.4 ""))(if (setq SS (ssget "_X" '((0 . "SPLINE"))))(command "_.pedit" "m" SS "" "Y" 10 "w" 0.4 "")))

 But I want pure lisp code in a professional way!

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved