AutoCAD Visual LISP / AutoLISP :: Union Items After An Array Polar
Mar 12, 2012I would like to do an array polar for 4 items and union with the command "union" all of them automatically.. how can i do that in a lisp ?
View 9 RepliesI would like to do an array polar for 4 items and union with the command "union" all of them automatically.. how can i do that in a lisp ?
View 9 RepliesI'm trying to define a grid based on polar coordinates.
Can be produced using the following MATLAB
n=1:50000;r=sqrt(n);t=360/((sqrt(5)+1)/2)+1)*pi/180*n;plot(r.*cos(t),r.*sin(t),'o')
I need to insert points based on the polar coordinates defined by the equations. I knew a little bit of LISP 10 Years ago, now it's a total blank. I've been trying to write a script to make this work but after 5 days I'm still without sucess.
In asp I'd write:
arrFileName = Split(DrawingName, "_")
JobNumber = arrFileName(0)
DrawingTitle = arrFileName(1)
SheetNumber = arrFileName(2)
I'd like to do the same thing in lsp. I don't want to be limited to three fields so the split function is perfect.Is there an equivalent?
I have a lisp file that reads in a point list from a text file and creates a number with a circle around it for every point, then a line from one circle to the next in line with the center point of each circle. Is there a simple way of making the lines "go behind the circles". The portion of code that creates the circles, lines and text is as follows and a cutout screen dump of what it looks like is below.
(setq amount 0)
(foreach item lines
;;; ;;
;;; Create the text ;;
;;; ;;
(setq x (+ (atof (nth 2 item)) (car pt_origin)))
(setq y (+ (atof (nth 3 item)) (cadr pt_origin)))
[Code]....
IV 2010
I wish to have a lisp than enable to do automatic offset base on some selection of lines ,circles or polylines object as shown in attachment.
View 9 Replies View RelatedHow can i select/highlight all items in a Multi_select list_box?
View 4 Replies View RelatedI have 3d items exported from sketchup, that have extrusion vectors to them.the VLA-GETBOUNDINGBOX lisp function seems to return values from the block's coordinate system.
I need values as if there was no extrusion vector, in WCS.I am not clear on how to do this, as it seems like I want a fundamentally different box.Is there a way to recalc the box orthogonal to world coord system for each insert of the block? URL....
im trying to change an attribute for only items visible on screen why dose the follow in then work and the one there after not?
(command "_attedit" "N" "N" "A4LANDSCAPE" "MYDWGSTATUS" "*" "" (cadr (fnsplitl (getvar "dwgname"))))
(command "_attedit" "N" "Y" "A4LANDSCAPE" "MYDWGSTATUS" "*" "" (cadr (fnsplitl (getvar "dwgname"))))
A program that prompts:"select objects:" then I can select some objects like as text, line, circle,... after that program find all texts in selected items and swap text
swap means: xxx/yyy ===> yyy/xxx ; "/" is a divisor
swap function for one text is here:
(defun c:swap ( / pos ent el txt)
(vl-load-com)
(if(null #div#)(setq #div# "/"))
(setq #div#
(if(=(setq tmp(getstring(strcat "
Divisor character: <"#div#"> ")))"")
#div# tmp
)
[Code]....
but I want a program to prompt me like this:
(prompt "Select objects:")(terpri)
(setq a (ssget '((0 . "TEXT"))))
and gets divisor char </>:
after that:
(setq n (sslength a))
(repeat n
....
)
repeats n times, n=number of texts in my selection
I have a base(blue) with an array(orange) positioned on a face.
When I select all & UNION the whole geometry becomes orange & I would like it to become blue.Selecting the base first then the array doesn't seem to work.
I've tried using the union tool in AutoCAD 2013 as well as the Boolean join function in Inventor Fusion 2013. In AutoCAD it doesn't let me select more than one object (says that the array is the only object and that individual unit blocks are duplicates). In Inventor Fusion I can't seem to get the hand of selecting the target & tool bodies.
View 1 Replies View RelatedI am trying to do a polar array of a small circle within a large circle. I chose the center point of the large circle as the center point of the array, but for some reason the smaller circles are not in perfect array as some one them slightly overlap the larger circle. Is there some way to calibrate it correctly?
View 1 Replies View RelatedI have drawn a bar counter in 3d which has a top rectangular shape with curved corners. The front of the bar has 100mm wide wooden fascia panels and they need to follow the line of the bar. I am using the Polar Array function which works great except I cant seem to get the panels to follow the curves/arcs around the corners, but they sit neatly on all the straight edges of the bar. So in other words the panels are straight and lined up on the straight parts of the bar but the panels stay at 90 degrees instead of following the curved areas of the bar.
View 1 Replies View RelatedI put the three holes in the outer ears/lugs with a Polar Array and want to change their diameter to make them smaller. If try to use Delete Faces to remove the holes it drastically effects one of the other lugs.
Is there a better way to edit holes in an array and is there a way to make arrays non-associative after the fact of creating them? The dwg is saved in 2007 but created with 2013
sequence for creating a Polar Array? I have no problem with Rectangular Array but for some reason I have no success with Polar. include what it should say in the command line in the sequence. I am looking to place 22 .1" circles around a 1.5" circle. I am using v2000 if it matters, however I can use v2007 if need be.
View 8 Replies View RelatedI cannot find the drop down for Polar array. I just have the 4 squares for array when I click on it I can request polar as the array type but it gives me a quirky menu with grips and does not allow me to set fill angles and number of pieces. I had issues loading this program, Map3D 2013 and was wondering if it was skipped in the installation, The circular pattern button is not on list of commands but does show in the documentation provided.
View 2 Replies View RelatedI just signed up after scouring Google for days on this problem:
View 9 Replies View Relatedi'm trying to do a polar stretch and array for rigid insulation. RIGID2.dwg is my best option. but as you can see in the jpg, the first line should have arrayed already, because the gap is over 2". i tried to follow the instruction someone used for the clothes hangers URL.... and it resulted in RIGID.dwg, with the lines rotating off the main line.
View 9 Replies View RelatedThis is an oven design in 3D. But I would do it brick by brick, if feasible. Below the picture. Some considerations: I tried to do using Autocad 2012 using the Polar Array new feature, but I can not close the oven on top.
[URL].......
I've made this block . when i rotate the vertical line I need to add lines every 15° as you see in the image, i've seen that polar array is not possible in the dynamic blocks.
View 8 Replies View RelatedI do not understand how to draw a polar array around a rectangular shape. If it were a rectagular dining table of any size how do I array the dining chairs around the table's shape. Alternatively what if I had a large square table and wanted to array 12 chairs with 3 chairs on on each side of the table ????? I get polar arrays around a circle or polygon but do not understand the rectangle concept ???
View 2 Replies View RelatedIs there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high? If there is no lisp already created, how to create one?
See Continuous dimension attachment for example.
I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.
I have a list ("temp.dwg" "temp2.dwg") and would like to add the string "insert text here" into each item in the list resulting in ("insert text heretemp.dwg" "insert textheretemp2.dwg"). how would i go about doing that using LISP?
View 2 Replies View RelatedIs there a way to programatically set a visual style before a drawing actually opens?
We have some huge models and people seem to forget to change their visual styles back to 2D wireframe before saving and exiting drawings. Some models will crash on some workstations when trying to open in a rendered mode.
I found a lisp with a function that looked to set viewport visual styles. But it does not seem to be supported anymore. --> (vla-put-VisualStyle vport 1)
I'm trying to write a lisp routine that, when I invoke the mleader command, osmode is set to "nearest" & orthomode is set off. I then would like the original settings to be returned.
attached is what I have written so far:-
Lisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.
View 4 Replies View RelatedI'm creating an array using a block from an existing dwg file on my drive. When i import this block on it's own, i can explode it to ownerspace with "bref.ExplodeToOwnerSpace();" but when i'm creating the array, i don't have this ability and i'm left with one of my blocks in the array exploded, and the rest not. How do i explode the blocks in the array? When i try to use acEntClone.ExplodeToOwnerSpace(); it doesn't exist and i only have the option of acEntClone.Explode().
The Original Block
Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; Database acCurDb = acDoc.Database; LayerTable acLyrTbl;
[Code]....
How to trim an array? I want to trim out array items as if using a crossing window, not as the trim command does. See attachments. I want to be able to trim as in array 2, not as array 1.
View 9 Replies View RelatedDo is IV able to make a array out rotate items?
View 9 Replies View RelatedIf you have a housing with say, 12 cylinders in the flange which are to be cut out of the housing to become the 12 bolt-holes. If you positioned your cylinders using polar array, are you supposed to be able to use the command solid/substract? I can't as it won't pick the array parts to cut. I had to resort to rotating/copy all the cylinders around the flange and then it works great. Any way to do holes through a solid...
View 9 Replies View RelatedIs it possible to execute a certain command based on multiple selections withinin a dcl? for example: two radio colums, one with selections A and B, and a second with selections 1 and 2. is it possible to program commands based on user selections from each column? ex: if A and 1- do a command. A 2- do a different command, etc...
I tried :
(action_tile "key1" "(setq A t")
(action_tile "key2" "(setq B t")
(action_tile "key3" "(setq 1 t)(done_dialog)")
(action_tile "key4" "(setq 2 t)(done_dialog)")
(if
(and (a) (1)
)
(command ...
but was unsuccessful. no matter which combination was selected, the command under all combinations would run.