Have you ever worked on Electrical drawings, especially "Lighting Layout" drawing?
In a Lighting Layout drawing, the blocks representing the normal light will be placed in a room as ...
one unit from the edges of wall & two units in between them.
This is a common concept.
So a draftsman has to either calculate manually or either place a line touching both walls (towards the LENGTH or WIDTH) and then using AutoCAD builtin command DIVIDE, he can get the required points.
But, Its annoying to use a long procedure of dividing & putting/erasing the POINTS, Hence, I worked to develop a LISP routine.
So this LISP routine is actually ...
A command to DIVIDE a line/pline/arc in equal segments with 1-unit from both ends and 2-units in between segments.
* DIVIDE_ALTERNATE.LSP (2Kb)
This command will DIVIDE a line/pline/arc in equal segments with 1-unit from both ends and 2-units in between segments.
Sequence of command lines for this routine:-
Command: DVD
Pick LINE/PLINE/ARC:
Enter the number of POINTS:
Download : DIVIDE_ALTERNATE.LSP
Tuesday, September 9, 2008
Monday, September 8, 2008
How to SAVE x-y coordinates of a point
Here we have seen how to save a selection with our favorite name. How about saving a PICK POINT with a specified name?
Someone will think that whats the use of saving an specified x-y coordinate in a drawing session?
Ofcourse there is a need. Lets assume that in a large scale drawing, you have drawn a temporary object say line/circle/point for some reference. Later on you forget to erase that object & also forget the exact location of its placement. This single line command will SAVES the exact location point (x-y-z coordinates) which you can get back any time in the whole drawing session. Even after erasing the object placed temporary on that point, you can always get back the point just by entering
!pt
at "Specify point" prompt of any AutoCAD builtin command.
* GETPT.lsp (1Kb)
This command will save x-y-z coordinates of any specified point under the name PT.
Sequence of command lines for this routine:-
Command: GETPT
Pick point to SAVE its location :
Download : GETPT.lsp
Someone will think that whats the use of saving an specified x-y coordinate in a drawing session?
Ofcourse there is a need. Lets assume that in a large scale drawing, you have drawn a temporary object say line/circle/point for some reference. Later on you forget to erase that object & also forget the exact location of its placement. This single line command will SAVES the exact location point (x-y-z coordinates) which you can get back any time in the whole drawing session. Even after erasing the object placed temporary on that point, you can always get back the point just by entering
!pt
at "Specify point" prompt of any AutoCAD builtin command.
* GETPT.lsp (1Kb)
This command will save x-y-z coordinates of any specified point under the name PT.
Sequence of command lines for this routine:-
Command: GETPT
Pick point to SAVE its location :
Download : GETPT.lsp
Labels:
POINT,
save coordinates,
x-y coordinates
Sunday, September 7, 2008
Attrib Replacement
As here I have mentioned about the necessity of replacing of two text entities as well as provided a LISP routine towards its solution.
For a typical AutoCAD drawing using blocks with Attribs, same problems of replacing texts some times occur where we have to replace one ATTRIB with the another.
For example, In an architectural floor plan layout, If someone uses a block with attrib for the room numbering, sometimes room numbers have to be replaced. An AutoCAD draftsman might use built-in AutoCAD command DDATTE, but he has to modify both or sometimes more than 2 Attribs.
Hence I developed a LISP routine for replacing Attribs so as to work fast.
* AttribReplace.lsp (2Kb)
This command replaces two attrib values of same type of a block.
Sequence of command lines for this routine:-
Command: ATTR
Select FIRST Attrib:
Select SECOND Attrib:
Select FIRST Attrib:
(The command work continuously till you Enter or press "Esc".)
Download : AttribReplace.lsp
For a typical AutoCAD drawing using blocks with Attribs, same problems of replacing texts some times occur where we have to replace one ATTRIB with the another.
For example, In an architectural floor plan layout, If someone uses a block with attrib for the room numbering, sometimes room numbers have to be replaced. An AutoCAD draftsman might use built-in AutoCAD command DDATTE, but he has to modify both or sometimes more than 2 Attribs.
Hence I developed a LISP routine for replacing Attribs so as to work fast.
* AttribReplace.lsp (2Kb)
This command replaces two attrib values of same type of a block.
Sequence of command lines for this routine:-
Command: ATTR
Select FIRST Attrib:
Select SECOND Attrib:
Select FIRST Attrib:
(The command work continuously till you Enter or press "Esc".)
Download : AttribReplace.lsp
Labels:
Attrib,
Attrib Replace,
BLOCK/ATTRIB
Thursday, September 4, 2008
Change selected Texts Height to a source Text
After these two TEXT lisps (here & here), once again I am here with a new one on TEXT.
Sometimes we need to change the HEIGHT of a selection of TEXT entities, equal to that of a picked source TEXT.
Match properties command will do this, but this inbuilt AutoCAD command will change all the other properties like as color, layer etc.
So this LISP is here for you.
It will only change the HEIGHT of all selected texts same as the picked source TEXT.
* SAMETXHT.LSP (2Kb)
This command change the HEIGHT of a selection of TEXT entities, equal to that of a picked source TEXT.
Sequence of command lines for this routine:-
Command: STH
Select text to change its height:
Select objects:
Select string to match its height:
Download : SAMETXHT.LSP
Sometimes we need to change the HEIGHT of a selection of TEXT entities, equal to that of a picked source TEXT.
Match properties command will do this, but this inbuilt AutoCAD command will change all the other properties like as color, layer etc.
So this LISP is here for you.
It will only change the HEIGHT of all selected texts same as the picked source TEXT.
* SAMETXHT.LSP (2Kb)
This command change the HEIGHT of a selection of TEXT entities, equal to that of a picked source TEXT.
Sequence of command lines for this routine:-
Command: STH
Select text to change its height:
Select objects:
Select string to match its height:
Download : SAMETXHT.LSP
Labels:
Modify,
Text,
Text Height
Wednesday, September 3, 2008
Drawing a Quarter or Semi Circle
Want to make a closed QUARTER (of a CIRCLE) as POLYLINE?
and/or
Want to make a closed SEMI-CIRCLE as POLYLINE?
These may required as symbols of Electro Mechanical drawings.
This LISP will sure help you to get what you required just in 4-simple prompts.
* QSCircle.LSP (3Kb)
This command will draw a QUARTER CIRCLE or a SEMI CIRCLE as a POLYLINE object.
Sequence of command lines for this routine:-
Command: QSC
Quarter-circle/Semi-circle
and/or
Want to make a closed SEMI-CIRCLE as POLYLINE?
These may required as symbols of Electro Mechanical drawings.
This LISP will sure help you to get what you required just in 4-simple prompts.
* QSCircle.LSP (3Kb)
This command will draw a QUARTER CIRCLE or a SEMI CIRCLE as a POLYLINE object.
Sequence of command lines for this routine:-
Command: QSC
Quarter-circle/Semi-circle
:
Pick center of polyline circle...
Radius of circle is... <2.0> =
Specify rotation angle or [Copy/Reference] <270>:
Download : QSCircle.LSP
Labels:
Draw,
Quarter Circle,
Semi Circle
Rotating any entity in exact 90° direction
Just today, a friend of mine has asked me to make a LISP file for him from which he can able to rotate a single entity in the exact 90° direction and only when he picks it.
Its not so hard. We can use the "ROTATE" command inside the LISP file. And the entity is rotated with respect to the POINT where you picked it. Where as while using builtin AutoCAD command "ROTATE" a user has asked for 3 prompts, Select Objects + Base point + Rotation Angle.
* ROT90.lsp (1Kb)
This is a command for rotating any entity in exact 90° direction.
Sequence of command lines for this routine:-
Command: ROT90
Select object:
Download : ROT90.lsp
Its not so hard. We can use the "ROTATE" command inside the LISP file. And the entity is rotated with respect to the POINT where you picked it. Where as while using builtin AutoCAD command "ROTATE" a user has asked for 3 prompts, Select Objects + Base point + Rotation Angle.
* ROT90.lsp (1Kb)
This is a command for rotating any entity in exact 90° direction.
Sequence of command lines for this routine:-
Command: ROT90
Select object:
Download : ROT90.lsp
Labels:
AutoCAD commands,
Modify,
Rotate
Tuesday, September 2, 2008
HIGHLIGHT the previous selected objects...
While working on modifying the drawing objects, one needs to HIGHLIGHT the previous selected objects so as to change their properties (such as LAYER, COLOR, LINETYPE etc.)
A normal drafter would simply give the command "SELECT" & when the "Select Objects" prompt came, he/she type "P"
& so goes the previous selected objects HIGHLIGHTed.
Its OK.
But .... How about getting the previous selected objects HIGHLIGHTED just by Entering a command name in the command-line?
So simple man.
Grab this LISP.
* HighlightObjs.lsp (1Kb)
This command HIGHLIGHTS the previous selected objects.
Sequence of command lines for this routine:-
Command: SEH
Download : HighlightObjs.lsp
A normal drafter would simply give the command "SELECT" & when the "Select Objects" prompt came, he/she type "P"
& so goes the previous selected objects HIGHLIGHTed.
Its OK.
But .... How about getting the previous selected objects HIGHLIGHTED just by Entering a command name in the command-line?
So simple man.
Grab this LISP.
* HighlightObjs.lsp (1Kb)
This command HIGHLIGHTS the previous selected objects.
Sequence of command lines for this routine:-
Command: SEH
Download : HighlightObjs.lsp
SAVING a selection-set with your favorite name?
How about SAVING a selection-set with your favorite name?
In a drawing session, sometimes we need to save a selection of entities without using GROUP command, so that we can use this same selection later.
This small LISP routine fills up your requirement.
* SAVESET.lsp (1Kb)
This command SAVES a selection-set with your given name.
Sequence of command lines for this routine:-
Command: SVS
Type a name for this selection-set:
Select objects:
Download : SAVESET.lsp
In a drawing session, sometimes we need to save a selection of entities without using GROUP command, so that we can use this same selection later.
This small LISP routine fills up your requirement.
* SAVESET.lsp (1Kb)
This command SAVES a selection-set with your given name.
Sequence of command lines for this routine:-
Command: SVS
Type a name for this selection-set
Select objects:
Download : SAVESET.lsp
Labels:
group,
Select,
Selection set
Monday, September 1, 2008
Text Replacement ...!
While working on TEXT entities, I had forced to make several LISP routines. First I think its a complex job as TEXT includes alpha-numeric characters as well as in AutoCAD it is inserted as a single line TEXT & multi-line also.
But later on I got interest & still happy to make any kind of LISP related to TEXT.
In Electro Mechanical drawings, such as in "Panel-Board Schedules" more & more times a drafter has to replace one text value to another. What to do?
Some find it easy to EDIT them using DDEDIT. But what if we have a large no. of values to be replace with each other? Isn't it a trouble some & time wasting job?
So came this LISP routine.
Just pick one text & then other .... wow...
You can see the values will be replace instantly !!
* TextReplace.lsp (3Kb)
This command replaces two text objects.
Sequence of command lines for this routine:-
Command: TRP
Select FIRST text:
Select SECOND text:
Select FIRST text:
(The command work continuously till you "Enter" or press "Esc".)
Download : TextReplace.lsp
But later on I got interest & still happy to make any kind of LISP related to TEXT.
In Electro Mechanical drawings, such as in "Panel-Board Schedules" more & more times a drafter has to replace one text value to another. What to do?
Some find it easy to EDIT them using DDEDIT. But what if we have a large no. of values to be replace with each other? Isn't it a trouble some & time wasting job?
So came this LISP routine.
Just pick one text & then other .... wow...
You can see the values will be replace instantly !!
* TextReplace.lsp (3Kb)
This command replaces two text objects.
Sequence of command lines for this routine:-
Command: TRP
Select FIRST text:
Select SECOND text:
Select FIRST text:
(The command work continuously till you "Enter" or press "Esc".)
Download : TextReplace.lsp
Labels:
Draw,
Text,
Text Replace
Subscribe to:
Posts (Atom)