PDA

View Full Version : Line type macro .......



Filthy McNasty
7th Jan 2011, 10:16 pm
I wonder if someone can help me .............

First, I want to create a macro which will draw a polyline on a layer which will have a certain line type (hidden, center, whatever)

Something like this :


^C^C-layer;make;FC-DGNINFO_F_C_CW-412;color;blue;;;pline \w;0;;

I tried several option such as

^C^C-layer;make;FC-DGNINFO_F_C_CW-412;linetype;center;color;blue;;;pline \w;0;;
But it didn`t work out.



Second, another macro which will calculate length of existing polyline and place the value on top of the line.

I am using AutoCAD 2010 version

Thank you!

ReMark
8th Jan 2011, 12:42 am
There are a couple of lisp routines, here at CT, that with display the value of a picked line and place it above the top of the line. A quick search should turn one or both of them up.

Filthy McNasty
8th Jan 2011, 12:49 am
I`ve been searching the forum and haven`t found anything that work with 2010 version. For the first macro, second option is what I found in the forum but as I mentioned, it does not work with AC2010.

I am assuming it takes some minor tweaking in the code ........ tried several options but couldn`t figure it out.

Filthy McNasty
11th Jan 2011, 12:52 am
I managed first macro to work, just a little tweak........ but I have another problem, can not save macro , when I close AutoCAD and open it again, non of macros are working ....... that`s so weird ........ anybody has idea?

ReMark
11th Jan 2011, 01:02 am
Assign the macro to a button. You'll have to edit your CUI.

Another option might be to use the Action Recorder found on the manage tab of the Ribbon. See the Action Recorder panel.

Filthy McNasty
11th Jan 2011, 02:39 am
Assign the macro to a button. You'll have to edit your CUI.

I did that............ for some strange reason macro is not saved.
I had similar problem with 2008 version , macro box in CUI was grayed out so I couldn`t edit it but in this case I can edit it but not save it ..........

ReMark
11th Jan 2011, 12:02 pm
The process for creating a button and assigning a macro to it is pretty straight forward and usually presents no problem whatsoever. Perhaps you missed a step. Are you following the steps laid out in your Customization Guide?

jmyrwen
30th Oct 2011, 04:59 pm
^c^c-la;m;LAYERNAME;lt;hidden;;c;1;;^c^cpl;


))))))))))))))))))))))))))))))))))(((((((((((((((( ((((((((((((((((((((

SLW210
31st Oct 2011, 02:14 pm
Please read the CODE POSTING GUIDELINES (http://www.cadtutor.net/forum/showthread.php?9184-Code-posting-guidelines), these apply to macros also.