Essentially, I'll be creating a sort of Venn diagram. So for the purposes of this exercise, let's assume it's the classic Venn diagram of three intersecting circles. But I need this to work with closed polylines, that may also have arc segments in them.
Anyway, so I have these intersecting areas, and I need to create bounding polylines for each area, and assess the number of overlaps. So, as in a Venn diagram, the areas where only one circle is present can then get shaded one color, areas where two circles are overlapping can get a different color, and the area where all three circles overlap can get a third color.
I'm clearly going to have to be converting the various boundaries to Regions, and performing some Unions. It seems I could grab all objects, convert them to Regions 2 at a time, and compare their Union'ed area to their individual area, to determine if they overlapped at all. With only the 3 cirlces, that would work, but when I have 35 individual polyline areas with arcs, suddenly this method feels like it will break down.
I need a lisp that creates a polygon of N points, so to enter a only the distance between these points, after choosing N points in the drawing for approximately creating polygons.
I'd like to run one command that allows the user to draw a polygon viewport then sets that VP to 1/8"=1'-0".
It can be nearly accomplished with a macro, but falls just short because the polygon vp requires an unknown number of clicks, so there is no way to know how many pauses for user input in the macro.
I have a window schedule lisp routine that places a 6-sided polygon around text that label each window. I want to change the code so that its a circle instead of a polygon. Here is the code line that needs to be modified:
I am trying to add a reactor, where if the object i move or copy is s a block of a certain name, then i would like to run update field on the last object (being copied) or the object being moved.
I have been searching for some information on how to pass objects into a function so I can mess with their properties. Somehow I haven't been very successful. Anyway...What I want to do is take two items (light fixtures) and swap their positions on the drawing. It seems like it must be really simple, but I'm just not finding the key puzzle pieces to do it. It seems like if I could figure out how to pull two objects into the function (whether by selecting them and running the function or by selecting them after I run the function) I could very easily save the coordinates of one to variables and then just swap them.
I want to move a large 3D steel file on top of a 2D architectural background. The ISSUE is that when i move it (in plan view "aka top view") the X,Y coordinates change AND the Z coordinate changes... But, I want the Z coordinate to stay the same . I wrote a LISP file that doesnt seem to work (SEE BELOW):
(defun C:MoveXY (/ PT1 PTB PT2)(setvar "CMDECHO" 0)(setq PT1 (getpoint " Specify Base Point or [Displacement] Displacement: ")PTB (getpoint " Specify second point or <use first point as displacement>: ")PT2 (list (car PTB)(cadr PTB)(cddr PT1)))(command "_.MOVE" (SSGET) "" PT1 PT2))
It seems my issue comes when i get to the command line (ssget) seems to mess it all up . How to use the ".Move" command with the (ssget) function?
Any way to detect of there are objects currently selected using Autolisp, visual lisp or even VBA. I would like to be able to do something using that as a conditional, so that (assuming the hypothetical variable isSelected is an on/off indicator of whether or not something is selected) I can code something like this:
I find that the command to move objects to a different layers runs very slow in one of the drawing. I want to find out what wrong with the drawing and how to speed things up.
I have a LISP program that batch processes a large number of drawings. One of the step to process each drawing is to change the colors of some objects according to the status of the objects. I do this by moving the objects to a later that has the right color. So far the program only takes 2 to 4 minutes to process each drawing. But the program takes close to 90 minutes to process one specific drawing. I track down the problem has to do with the command that moves the objects to the right layer, like this:
This command takes a very long time to finish, like 40 minutes each time it runs (to move 1200+ objects), and the program needs to run it twice for a total of approximately 80 minutes.
Please note that the drawing itself is not the largest drawing, and it doesn't have the largest number of objects to be moved either. It is close to the top-5 drawings in term of drawing size and the number of objects to be moved. I cannot say that the drawing size or the number of objects to be moved are the cause of the problem.
I tried to "speed up" by moving 200 objects incrementally. That didn't work. I tried to "speed up" by moving 100 objects incrementally and saving the drawing after each 100 objects are moved. That didn't work either; actually the speed is slightly slower than simply moving 1200+ objects all at once.
I don't know what to do. I believe there may be something unusual about that drawing. By the way, the reason why I choose to change color by moving objects to a different layer has to do with the fact that I have found this is the best way so far. I tried to change the color of the objects directly. But I find that the color of some sub-parts of the objects are not changed (because their color is by-layer). That's why I choose to change color by moving objects to a different layer.
How I can check the drawing, any different way to change color that is better.
I need a program to move some selected text to a line something like as extend command but for text objects!
suppose that there is a horizental line (y=constant) or vertical line (x=constant) and some selected text(or other objects), I want a lisp program that move these selected text (or objects) by their "insertion point" to this line.
in other word, if the selected base line is horizental (y=constant) then property of "Y" of all selected text should change to line's "Y"; and if selected base line is vertical (x=constant) then value of "X" of all selected text should match to line's "X" value.
for example, for base vertical line (x=constant) and 3 selected text(or can be any object) result is:
The CADdesigners have asked me if i can make a function that runs through our AutoCAD 2012 MEP model attaching certain predefined classification definitions to ducts, pipes, MVparts etc.
I have used hours searcing for examples / tutorials on how to connect to the MEP objects not finding what i need.
Any Lisp Routine to scale text objects a certain value and have the program actually scale each text object as you pick them.
The change text height using the Properties function does not work for what I need because the objects I need to scale are Mtext objects with Background Mask, and when you use the Properties function to change their text height it messes up the background mask so that you have to select each text entity and stretch the mask area smaller or larger, but if you use the scale function it scales the background mask as well so the background mask coverage is still the same.
I have this code that I wrote years ago that I want to update to select two types of civil3d objects and show them selected with grips on the screen. This function works fine
but if I add the extra object like this which I assume is the wrong syntax i only get the second type of objects. Need correct syntax I should be using for selecting more than one object in an ssget statement.
I am having trouble moving an object a certain distance. The distance is defined by a pre-defined variable. I just can't figure out the syntax for the autolisp command.
Here is the bit of code if written, there is more code not shared here that defines the points for the polyline .
;-- the varaible box_height is defined earlier in the routine
;-- Draw the polyline for the top of the cabinet (command "pline" p1tt P2tt P3tt P4tt P5tt P6tt P7tt P8tt "c")
;-- Assign the new part a variable name (setq cab_toppl (entlast))
;-- Extrude the polyline to make the top of the cabinet (command "extrude" cab_toppl "" cab_intw "0")
;-- Assign the new part a variable name (setq cab_top (entlast))
;-- Rotate the top of the cabinet down to the floor of cabinet
(command "rotate3d" cab_top "" 2 p1tt p2tt 90)
;-- Move the top of the cabinet to the final location
;-- HERE IS THE PART I'M HAVING TROUBLE WITH. ESSENTIALLY ONCE THE PART IS CREATED I'VE NAMED IT CAB_TOP AND AM NOW TRYING TO MOVE IT IN THE Z AXIS THE DISTANCE DEFINED BY THE VARIABLE BOX_HEIGHT WITHOUT USER INPUT
I 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.
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.