Is it possible, and if so how can I dimesion circumferences in LT 2k2?
This is a message I came across on Autodesk's own discussion list. It is a menu macro... create a new button, and paste this code into it. ================== And for those of us who can't run VBA or LISP [grin]: ^C^C_pedit;\;;_list;@;;_undo;2;_dimangular;@;t;$M=$(rtos,$(g etvar,PERIMETER)); ================== I made some modifications, and here is my message; ================== Re: button to dimension arc lengths I just got your Button Macro to dimension Arc lengths, and have adapted it to call out the lenght of a polyline with a leader. In your original routine, you convert the arc to a polyline so that when you list it, an overall length is given. This causes the internal Autocad variable, PERIMETER to be updated with the lenght of the polyline. Then you undo it all, and use that PERIMETER variable in the arc length dimension. I see that the PERIMETER variable is set when you list a number of different entities, so it can be adapted for many objects. I've also added the NEA snap option so that the leader connects at the object where you select it. New macro which will call out polyline length (and other things as well) *^C^C_list;\;_le;nea;@;\\;;$M=$(rtos,$(getvar,PERIMETER));; ==============
I used your macro, it almost worked. I had the leader, but then it prompted me with an empty mtext window. Below is the output I got while running it. Command: _list Select objects: 1 found Select objects: ELLIPSE Layer: "0" Space: Model space Handle = 6C Area: 37863.0868 Circumference: 753.5739 Center: X = 397.3437 , Y = 459.8007 , Z = 0.0000 Major Axis: X = -60.8475 , Y = -143.5248, Z = 0.0000 Minor Axis: X = 71.1795 , Y = -30.1766 , Z = 0.0000 Radius Ratio: 0.4959 Command: _le QLEADER Specify first leader point, or [Settings] <Settings>: nea to @ Specify next point: Specify next point: <Ortho on> Specify text width <0>: Enter first line of annotation text <Mtext>: Command: 753.5739 Unknown command "753.5739". Press F1 for help. Command: --------------------- and another ----------------------------- Command: _list Select objects: 1 found Select objects: CIRCLE Layer: "0" Space: Model space Handle = 78 center point, X= 439.6910 Y= 163.8896 Z= 0.0000 radius 7.2080 circumference 45.2895 area 163.2245 Command: _le QLEADER Specify first leader point, or [Settings] <Settings>: nea to @ Specify next point: <Ortho off> Specify next point: <Ortho on> Specify text width <0>: Enter first line of annotation text <Mtext>: Command: 753.5739 Unknown command "753.5739". Press F1 for help. Command: The macro appears to be trying to enter 753.5739 as the value in the text box, no matter the size of the arc. Or is my understanding of this flawed? I copied and pasted the code direct from your post. I take it that you aren't having similar problems
The macro appears to be trying to enter 753.5739 as the value in the I don't remember if I pasted in the code from my working macro. It is possible that the newsgroup is inserting a carriage return. OOPS! I just tried the macro as I have it on my current machine and it is not working on mine either. I have just transvered from a full verison of AutoCAD to IntelliCAD and now AutoCAD LT (We are doing some station shuffling here at work). I think there is a difference in the behavior of the PERIMETER variable between full AutoCAD and LT. If I use it on a polyline, it works fine. I think the original poster's command sequence had made theirs work by converting the arc first to a polyline, and then listing that polyline. The prior steps were then undone and the leader drawn using the PERIMETER variable as the value. Sorry, I don't have time now to re-work it now. Perhaps you can visit the AutoDesk site (I think Google Groups also serves it) to see the discussion under AutoCAD LISP Customization. I think a good search term would be "Arc length". The AutoCAD help file is difficult to figgure out on this topic as well. It is using a DIESEL expression (I think). Joe Dunfee