AutoCAD Visual LISP / AutoLISP :: Draw Geodesic Dome Shape?
Sep 15, 2000how to draw a geodesic dome shape? some sort of lisp routine perhaps...
View 7 Replieshow to draw a geodesic dome shape? some sort of lisp routine perhaps...
View 7 RepliesI have to design a 3d model of 4v geodesic dome and I've never ever used 3d feature before . I am using Autocad 2012.
View 9 Replies View Relatedi would like to build one of these domes in my backyard and id like to be able to make simple plans to use. how would i go about drawing one of these up or is there a simple command like sphere or torus that would start me out? URL....
View 6 Replies View RelatedHow do I select the layer in which I want to draw?
for example i draw two line and Each of them has to be in different layer.
How do I select the layer which I want to draw?
is there a way to draw a polyline and have autocad clip everything outside of that polyline and discard it so that i end up with a smaller drawing. only the information in that polyline, nothing outside of the polyline
View 3 Replies View Relatedhow to draw a text entity in 3d, where I know the 3d ins point, and the plane it should be flat to.
I have not drawn text or inserted blocks programatically before where the plane they lie on is not flat.
I have done it before by setting a ucs and drawing stuff, but now I want no switches of UCS involved.
[URL]
how I would go about writing a function that would calculate the length of a diagonal of a rectangle using SQRT function? I've been trying but so far nothing!
View 4 Replies View RelatedLisp code here for draw for example triple parallel line ? each line will be own layer and color..
View 8 Replies View RelatedI have made a lisp routine to draw lines on polyline. And here are a lot of lines on it. So using comand
"(command "line" pt1 pt2 " ")"
takes a lot of time. Is here a way to creat lines in memory or similar and only then draw them all on screen?
I have search but coudin't find any info. I do not know how to formulate a query.
I've written my first little Lisp function.What it's for is drawing a simple borehole profile that can then be used to draw stylized cross sections on top of it.
Upon start the lisp, pick a point on screen (to get the X coordinate [x1 below]), then enter ground level at the command line [g1 below], then enter as many thicknesses as are present in the borehole log (will vary, but typically between 3-12). These I added to a list, because that seemed to make sense when I did it.
What I want it to do then is draw a pline from x1, g1 down to the next point (x1,g1 minus the 1st thickness), then the next (x1,g1 minus the 2nd thickness) etc., to the bottom of the borehole.
Then my CAD guys can sit there, and using the borehole logs, enter the values of the boreholes and it draws them on the screen, making it easy to join th dots.
It might be good if it placed a Acad point at each point as well, but I'm not overly bothered about that at the minute.
Here's my attempt so far.
(prompt "Type 'e1' to run...")
(defun c:e1 ( / )
(command "graphscr") (setq x1 (getpoint "
Pick insertion point:")) (setq x1a (car x1))
(initget (+ 1 2 4)) (setq g1 (getreal "
Enter ground elevation: "))
(initget (+ 1 2 2)) (setq lvllist nil ) (while (setq lvl (getreal "
Enter layer thickness <Exit>: ")) (setq lvlList (append lvllist (list lvl))) )
(princ) )
I would like to be able to draw squares by the area they should have. So that if I need a square of 50m2 autocad automatically draws a square of sqrt(50) x sqrt(50)
Because right now I have to draw 200 squares with 100 different areas and I have to calculate and manually draw each one of them.
i need a vlisp program to draw polyline between two blocks.
View 3 Replies View RelatedThe first rectangle is drawn from 0,0 at the World Coordinate System. There is never any trouble with the code below when the objects are drawn at the WCS. The problem is when I try to draw a bounding box around an object while in another UCS. It seems that it always draws the bounding box at the WCS instead of my UCS. I have used (trans <pointlist> 0 1) on all combinations it seems and I still cannot get it to draw the bounding box at the current UCS.
(defun c:GetFromBoundingBox (
/
*ACAD_DOCUMENT*
mspace
pSelectedObject
lwLeft
upLeft
lwRight
upRight
[code]...
I have a inserted block with 4 tags for Length, Thickness, Elevation and Width.How can extract attributes tag values and draw a closed polyline + 2 internal lines, parallel to the block?
Block Name: ID_DATA
Tags: LEN, THI, ELE and WID.
Each internal line placed in a third width.
I have this code to draw grid lines within a rectangle:
;Variable settings(defun var_set () (setq *var_lst* '("cmdecho" "osmode" "expert" "plinewid" "dynmode") *var_usr* (mapcar 'getvar *var_lst*)) (mapcar 'setvar *var_lst* '(0 0 2 0 0)) (vl-load-com))(defun var_reset ()(mapcar 'setvar *var_lst* *var_usr*)) (defun *error* (msg) (if (not (member msg '("console break" "Function cancelled" "quit / exit abort" "" nil)) ) (princ (strcat "
Error: " msg)) ) (and ;(vl-bt) (var_reset) ) (princ) ) (defun string-list (data) ;by lee-mac @theswamp (if (vl-string-search "@" [code].........
The above gets me the grid lines; but I have a block inserted at both ends of the grid line; how do I get the selection of those entities (selection set "frame") after each array?
or I would need to map a point list and draw each grid individually how do I go about that?
Attached is the sample of the output I'd like to achieve using LISP.
Routine that will draw a insulation hatch around a circle?
View 9 Replies View RelatedI continue learning....
(setq ins (vlax-ename->vla-object ( ssname sele cod)) nombre (vla-get-name ins) ) (setq bloque1 (vla-item (vla-get-Blocks (vla-get-Document ins) ) nombre ) ) (setq s_ent1 (vla-item bloque1 1)) (setq pt1 (vla-get-startpoint s_ent1 ))(setq pt2 (vla-get-endpoint s_ent11 ))(setq s_ent2 (vla-item bloque1 2)) (setq pt3 (vla-get-startpoint s_ent2 ))(setq pt4 (vla-get-endpoint s_ent2 ))(command "_pline" pt1 pt2 pt3 pt4 "c")
Why dont draw de _pline?
i make a lips that draw doors and window in 3d from block in 2d......the problem..It does not work in all autcad¡¡ the same version but different pc.
View 9 Replies View RelatedIs there a lisp routine to draw 3D object by the LOFT way ? .
View 4 Replies View RelatedI have a list with many points is it possible that i can draw a line or polyline on those points using MapCar function.
View 6 Replies View RelatedI have drawings with a lot of polyline objects. I need a routine which will draw multilines by coordinates of vertexes of this polylines. For example, if there is a pline with coordinates 10,10 - 20,20 i want to draw in other layer MLINE with the same coordinates. I know it's should be simple but can not gues how to do it. I've never used LISP before.
View 5 Replies View RelatedCan a AutoLISP command be written to read an attribute in a block and draw a circle with the attribute as the diameter using variables? The appilcation is taking the diameter of a tree trunk (the attribute), multipling by 12, and drawing the canopy circle on hundreds of those blocks. So the circles drawn will vary in size.
Not sure how this could be set up, i'm not familiar with LISP writing at all.
1) Read block, single, mulitple or definition?
2) Read Attribute
3) Varaible of attribute, (attribute is an inch measurement...it needs to be multipled by 12 to get feet for final use as circle diameter drawn)
4) Draw circle, variable, with diameter coming from attribute variable (attribute in inches that is multipled by 12)
5) Center point or circle to be block's base point
I have to put some trusts between two beam. It sounds easy but i'm unable to handle the divide and round off commands in the lisp. See attachement also.
To draw my trust between the 2 beams, what I normally do, is that I manually take the distance between the two points say it's 10 000 and wrote it down. Then I divide it by my max gap, say 1200, it is the max space between trust.
10 000/1200 = 8.333333 that's the result of how much trust and space between them that i'll need, 8 trusts, 9 spaces between the 2 beams. (That is what I'm unable to do in the lisp, tell it to round off 8.333 to 9 and use 9 for divide command)
What I manually do at this point to draw these trust is that I must create a temporarly line between the 2 beams, perpendicularly to these and divide it by 9.
It gives me 8 cross (or point) to draw my trusts. All this is long to do manually because I have many bay in building and I have to redo this operation for every the bay.
So, what I would like the lisp to ask is:
Specify distance between two beams (Between where and where) :
Specify the lenght of the trust :
Specify max gap: I would like to answer a number here, say like 1200 max
(The lisp should draw the lines on the current layer, color and linetype of the current layer and not draw a line at the beginning and at the end because that's where my Beams are. I hoped you understand, see attachement.
Should also have something that handle a ESCAPE hit or cancel, something like this:
(defun trap1 (errmsg) (command "_.undo" "_end") ; undo end (setvar "osmode" oldsnap) ; restore variables (setvar "cmdecho" 1) ; enable cmdecho (setq *error* temperr) ; restore old error handler (prompt "
[Code] ....
why do not draw the line between ptm1 and pt3?
(defun c:PUNTOM (/ pt1 pt2 pt3) (setq pt1 (getpoint "
Initial point : ")) (setq pt2 (getpoint "
Final point : ")) (setq pt3 (getpoint "
Offset : "))(setq ptm1 (mid (pt1 pt2))) (command "_line" pt1 pt2 "")(command "_line" ptm1 pt3) (princ));;;;;;;(defun mid (p1 p2) (list (/ (+ (car p1) (car p2)) 2.0) (/ (+ (cadr p1) (cadr p2)) 2.0) ));;;;;;;;
I need to draw an ellipse at a specific point on a drawing.
i can calc the major and minor and i have a polar point of where it should be drawn.
i just need the code to draw the ellipse.
I do a lot of repetitive tasks in my daily drawings and I’d like to make life easier! I was researching how I could write a lisp to draw a walkway path for a roof. I came across a couple of interesting posts but couldn’t follow the code because of my lack of understanding the language.
So what I do is draw a 30” x 30” square (using the rectangle command). Then copy it so there is a 2” gap between them. Then I go back and hatch them with a dot hatch scaled to 96. What I’d like to do is type a command and it would draw the walkways for me and hatch them if possible. The problem is the last one is a custom cut size depending on the length of the walkway run?
Now I know I can draw a line, draw the square, hatch the square, array it on the path with set distance between items, then fix the last one so it looks the way I want it to, and then delete the line. But why do all that when I have a program that allows me to customize it to be done for me?
i am writing something that will draw consecutive lines with a rubberband to be used as a leader from a block's insertion point. this:
(WHILE
(SETQ LN (GETPOINT "
Select Next Point (ENTER to Finish) : "))
(COMMAND "LINE" (GETVAR "LASTPOINT") LN "")
)
works, but does not include the rubber band. i tried:
(WHILE
(SETQ LP (GETVAR "LASTPOINT"))
(SETQ LN (GETPOINT LP "
Select Next Point (ENTER to Finish) : "))
(COMMAND "LINE" LP LN "")
)
which includes the rubberband, but will not exit the loop. The last break source in VLIDE shows that
(GETPOINT LP "
Select Next Point (ENTER to Finish) : ") is casuing an error. Placing
(SETQ LP (GETVAR "LASTPOINT"))
outside the loop causes all lines to be drawn from the same point rather than the endpoint of the previous line.
This is to trim a line that crosses another. I draw lots of plumbing plans. It draws a circle based on 'dimscale', trims a line to that circle, then erases the circle. The problem is if you miss the trim point (PT2) it does not erase the circle and you lose your object snaps.
;Pipeline Break
(Defun C:bb (/ s1 ds1 r1 PT1 PT2 AX)
(setq s1 (getvar "osmode"))
(setq ds1 (getvar "dimscale"))
(setvar "osmode" 63)
(setq r1 (* ds1 0.03125))
(setq PT1 (getpoint "
[code]....
There are a ton of lisp to match text rotation to a selected line, but not vice versa.
View 9 Replies View RelatedI'm looking for a lisp routine that will draw a line between all matching numbers that are repeated 3 times or more in a selection.I'm using AutoCad 2012.
View 9 Replies View RelatedLisp 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