View Full Version : Change diameter
Steve
09-11-1998, 06:30 AM
Does anyone currently have a macro that will change the diameter of a cicle without having to delete and redraw the geometry. thanks in advance Steve p.s. please include syntax for command in your reply s.
John Bruce
09-11-1998, 12:44 PM
I have a macro that will change the diameter of a circle that you can have. I wrote it to do one then quit, so if you want to go though several in a row you will need to modify it to add a loop. And now for a try at manual HTML.<p>with luck this is on a new line<p><pre>DEFINE CCD LOCAL CIR LOCAL R1 LOCAL R2 LOCAL R3 LOCAL Ctr LOCAL D2 read pnt 'Pick the circle to change' CIR inq_elem CIR if (inq 403 <> CIRCLE) display 'The element you picked is NOT A CIRCLE' Change_circle_diameter else let R1 (inq 3) let Ctr (inq 101) read number 'Enter the NEW DIAMETER for this circle' D2 let R2 (D2/2) let R3 (R2/R1) MODIFY Assistance DEL_OLD SCALE CENTER Ctr R3 CIR END END_DEFINE </PRE>If when I review this on the newsgroup it is not formatted correctly I will E-mail it to you.<p>Good luck
John Bruce
09-11-1998, 01:08 PM
OK - all of you who looked at my macro have noticed that I define the name as CCD, but in the line where I check to see that the selected element is a circle, I point back to the top of the macro with an incorrect name. Well I changed the macro name to shorten it after I checked to see that CCD was unique.<p>the line that reads<p>display 'The element you picked is NOT A CIRCLE' Change_circle_diameter<p>should read<p>display 'The element you picked is NOT A CIRCLE' CCD<p>the macro would work with out the change less you pick something other than a circle, at which time you would see the message<p>The element you picked is NOT A CIRCLE<p>then you see the SYSTEM POINT OUT MY ERROR<p>*** The macro Change_circle_diameter is not defined<p>I guess I am human ???
Poul S. Berthelsen
09-17-1998, 04:52 AM
I have a macro that changes any circle or arc to a custom input value. It is even possible to change the value without interrupting the macro. here it comes: DEFINE Change_circle {Input the desired value of the new circle or arc. The macro changes multiple circles and arcs to the value, and it is possible to change the value without stopping the macro} LOCAL New_diameter LOCAL Infotext DEFINE Mo MODIFY SCALE CENTER (INQ 101) (New_diameter/((INQ 3)*2)) Elempnt END END_DEFINE READ NUMBER 'Change circle: Input diameter (D):' New_diameter LOOP LET Infotext ('Point circle or input new diameter ('+STR New_diameter+ ')') READ PNT NUMBER PROMPT Infotext Elempnt IF ((TYPE Elempnt)=NUMBER) IF (Elempnt>0) LET New_diameter (Elempnt) END_IF ELSE INQ_ELEM Elempnt IF ((INQ 403)= CIRCLE) Mo END_IF IF ((INQ 403)= ARC) Mo END_IF IF ((INQ 403)= C_CIRCLE) Mo END_IF END_IF END_LOOP END_DEFINE
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.