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).
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.
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"))))
I have started using Balsamiq mockups [URL]...... for preparing mockups of dialog boxes
The one I have created below still needs tweeking. Creating DCL files from xml or html?
Balsamiq Mockups is really cool and worth checking out. The dialog boxes are saved as bmml files which is based on XML. I am keen to try to create a way to translate the bmml file to dcl.
Here is a sample of what the code looks like from a sample bmml file:
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.
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:
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))
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.
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
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?
I need to be able to convert "polylines" (as opposed to "2d polylines") to 3d polylines. Here is the issue: the polylines that I want to convert have object data attached to them and they are at the proper Z elevation. When I use the "Convert 2d to 3d polyline" function, the conversion does take place, but all of my object data is removed from the object. And since one of my attributes reflects the overall elevation of the object (which all of the verticies will be the same elevation - even though it will be a 3d polyline), there are too many objects to individually update the attribute information when I am pressed for time.I am working in Civil 3d 2010. Any way to do this using Civil 3d?
The multileader should end up on the same layer as the Mtext. (Currently it uses the current layer.)The multileader should hold the same rotation as the Mtext. (Currently it goes to zero.)The multileader should be created in the same location as the Mtext, without the user having to click. (Currently the multileader is created wherever the user clicks.)The multileader should be created without a leader. We can add one afterwards if needed, but for many we don't need a leader. (We're just using the object as mtext with a box around it.)
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?
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?
I would like converting all objects that has forced linetype to be on a linetype layer.
So if there are objects that have forced linetypes - dashed/hidden/phantom, etc., those entities would be moved to a linetype layer based on their forced linetype. The entities would all be changed to color bylayer, linetype bylayer.
So if there is a rectangle that is sitting on an EQUIPMENT layer, the routine would put that rectangle on a new layer called DASHED and change its forced linetype to BYLAYER.
Lastly, once that's done, the next and final step is to locate a the existing layers with matching linetype - say, OBJECTS with DASHED as a linetype, and merging it to that layer.
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 ...
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!
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.
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.
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?
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
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..
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.
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?