TheSwamp

CAD Forums => CAD General => Topic started by: craigr on June 03, 2005, 11:50:24 AM

Title: Is this Macro possible?
Post by: craigr on June 03, 2005, 11:50:24 AM
We have several CAD guys that refuse to stick to standards. When confronted about it, they stay with standards for a while, then go back to doing it the way they want to. - I know, this is something that many CAD managers deal with.

One thing that they often have a problem with is Text font, size, color & layer. So, when I review their dwgs, I simply correct one word, then use the 'Match Properties' icon for the incorrect ones. (I hope I explained this well enough).

What I have tried to do in the past is make an icon that all I have to do is click the icon then the words that I want to be those properties.

Example - Arial .08 size. - click the icon, then click their 'RomanS .1 size' and it turns to Arial .08 size, Bylayer color & Layer 0.

'-properties' is not a recognized command. So, I tried inserting a block of correct format, matching the properties of that block, then erasing that inserted block. - this doesn't work.  

Is this possible?

craigr
Title: Is this Macro possible?
Post by: Dommy2Hotty on June 03, 2005, 11:53:25 AM
Probably easiest to use entmod.  Here's the code breakdown for text:
Code: [Select]
Select object: ((-1 . <Entity name: 7ef96368>) (0 . "TEXT") (330 . <Entity
name: 7ef6fcb8>) (5 . "4574D") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8
. "AR-NOTE") (100 . "AcDbText") (10 20973.1 1817.84 0.0) (40 . 3.5) (1 .
"test") (50 . 0.0) (41 . 0.85) (51 . 0.0) (7 . "arch") (71 . 0) (72 . 0) (11
0.0 0.0 0.0) (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 0))

Should be able to figure out which one's you'll need to modify by referencing that.

8 is layer
40 is height
1 is contents
7 is textstyle
Title: Is this Macro possible?
Post by: whdjr on June 03, 2005, 12:00:20 PM
The best way to have them use the standards is after you check them and mark them up, give them back to the individual to make his own corrections.  After a couple of times of having to change their own work they will hopefully get the message.  If that doesn't work make em stay in at recess and do it on their own time. :D
Title: Is this Macro possible?
Post by: craigr on June 03, 2005, 12:00:48 PM
'Entmod' is not a recognized command. - I use LT2005.

Is your code a macro?

Your code looks foreign to me, so I'm guessing it's a Lisp.

I can't run a lisp in LT.

Thanks,

craigr
Title: Is this Macro possible?
Post by: Dommy2Hotty on June 03, 2005, 12:14:23 PM
My code is entity information...but since you can't run LISP....sorry about that...here's the code to get what I showed, just F.Y.I.
Code: [Select]
(entget (car (entsel "Select object: ")))

Once you select an object, it will break it down into that information for you.
Title: Is this Macro possible?
Post by: craigr on June 03, 2005, 12:18:42 PM
Here is what I get -

Command: (entget LISP command is not available.

Command: (car LISP command is not available.

Command: (entsel LISP command is not available.

Command: "Select object: "))) Unknown command ""SELECT OBJECT: ")))".  Press F1 for help.

craigr
Title: Is this Macro possible?
Post by: VerticalMojo on June 03, 2005, 12:53:00 PM
I know the "change" command will allow you to change the layer & color but not sure how to change text height and style.... I will keep looking around. :?
Title: Re: Is this Macro possible?
Post by: CADaver on June 03, 2005, 01:02:30 PM
Quote from: craigr
We have several CAD guys that refuse to stick to standards. When confronted about it, they stay with standards for a while, then go back to doing it the way they want to. - I know, this is something that many CAD managers deal with.
I can't answer the direct question 'cuz I don't use LT, so I'm unaware of it's features.

However, I can solve the real problem (at least here I have).  As a CAD Manager I don't deal with it, I don't tolerate it.  It will be explained once or twice and the perp will be required to make the changes.  If it happens again he'll be written up.  Three "writes" and you're out.  Usually one is all it takes to get attention, and it gets EVERYBODYs attention.
Title: Is this Macro possible?
Post by: Dent Cermak on June 03, 2005, 01:12:12 PM
To change the text height and style using the "CHANGE" command you simply hit "ENTER" after typing "CHANGE" on the command line. If you don't select "PROPERTIES" the default takes you straight to style, height and text.
Title: Is this Macro possible?
Post by: Wyatt Earp on June 03, 2005, 01:13:16 PM
You can use Diesel in LT (or at least you could). It is a bit more involved but with a good resource and lots of time on your hands you can do just about anything in LISP with it.

The old R12 books are the best at explaining diesel IMHO...

Cheers
Title: Is this Macro possible?
Post by: craigr on June 03, 2005, 02:14:21 PM
(If I remember right) -

Sadly, Diesel went away back in 2003 or 4.

So, LT users are stuck with Macros or 'add on' software to enable lisps.

craigr
Title: Is this Macro possible?
Post by: VerticalMojo on June 03, 2005, 02:20:25 PM
Quote from: Dent Cermak
To change the text height and style using the "CHANGE" command you simply hit "ENTER" after typing "CHANGE" on the command line. If you don't select "PROPERTIES" the default takes you straight to style, height and text.


No go on AutoCAD LT 2000

This is what I got...
Quote from: Command Line
Command: change
Select objects: 1 found
Select objects:
Specify change point or [Properties]:
No changeable object selected
Command:
CHANGE
Select objects: 1 found
Select objects:
Specify change point or [Properties]: p
Enter property to change [Color/Elev/LAyer/LType/ltScale/LWeight/Thickness]:
Command:
Title: Is this Macro possible?
Post by: VerticalMojo on June 03, 2005, 02:26:57 PM
Quote from: craigr
(If I remember right) -

Sadly, Diesel went away back in 2003 or 4.

So, LT users are stuck with Macros or 'add on' software to enable lisps.

craigr


I dont think that is true.....

Try this as a macro.... if it works that you have it.

Code: [Select]
^C^Cgripblock;$M=$(-,1,$(getvar, gripblock))

Check out this topic on Diesel
http://www.theswamp.org/phpBB2/viewtopic.php?t=758&start=0
Title: Is this Macro possible?
Post by: craigr on June 03, 2005, 02:32:26 PM
Your statement worked. So I did a search on 'Diesel' within LT and it appears that LT is still able to use Diesel.

I stand corrected  :oops:

I don't know where I had read that it went away, so sadly I cannot correct them.

craigr
Title: Is this Macro possible?
Post by: VerticalMojo on June 03, 2005, 02:53:25 PM
Hey at leat you know the truth now. :)

Back to your problem..... Have you tried to use the change command? I’m not sure if what Dent suggested works on LT 2005. If you can change all the properties with it then we can work from there.
Title: Is this Macro possible?
Post by: craigr on June 03, 2005, 03:03:53 PM
'Change' does work - kinda'.

Here are the properties it offers to change -

Enter property to change [Color/Elev/LAyer/LType/ltScale/LWeight/Thickness]:

The only thing left is Font type, Arial, and Text Size, .08. I tried the LtScale, but that didn't do it. (I believe that is for the MASTER scale.)

But, we're getting closer.

craigr
Title: Is this Macro possible?
Post by: VerticalMojo on June 03, 2005, 03:16:24 PM
This is ugly but ..... it works.

Code: [Select]
^C^C-mtext;1;h;.08;s;Arial;2;x;;change;last;;p;c;bylayer;la;0;;_matchprop;last;\;erase;last;;
Title: Is this Macro possible?
Post by: craigr on June 03, 2005, 03:28:38 PM
VerticalMojo -

I walked thru your macro and understand everything but the 'x'.

You are basically doing the same thing that I came up with, except that I inserted a block that already has all of our 'standard' properties, then did a 'matchproperties' from it.

The problem was that you could only do one entity per click of the icon.

Which now that I think of it, I wonder if a * before the macro would fix it?

 :? craigr
Title: Is this Macro possible?
Post by: VerticalMojo on June 03, 2005, 03:44:38 PM
I thought of the block way but I didn’t want to have it connected to anything..... This way you don’t need a block. The "X" is just temporary text that is inserted then deleted at the end of the macro. That’s what makes it ugly, but its the only thing I came up with.

If you add another  _matchprop after the macro you can match the last change and continue with the command. Kinda like this....

Code: [Select]
^C^C-mtext;1;h;.08;s;romans;2;x;;change;last;;p;c;bylayer;la;0;;_matchprop;last;\;erase;last;;_matchprop;

or in your code...

Code: [Select]
^C^C-insert;size08;\;;;explode;last;matchprop;last;\;erase;last;;_matchprop;

so the first change you would have to select twice
Title: Is this Macro possible?
Post by: craigr on June 03, 2005, 03:46:58 PM
Well, I'm close....

^C^C-insert;size08;\;;;explode;last;matchprop;last;\;erase;last;

The only problem remaining is to erase the inserted block only.

I guess could insert it at a point that I KNOW would NEVER have anything else there, then erase that coordinate once I am finished with the macro.

craigr