James Fuentes Posted September 2, 2013 Share Posted September 2, 2013 (edited) thanks for the lisp sir, but can you kindly modify more the lisp so that it will work when there is a line that is due north or due west or due south or due east in the polygon? thanks sirs...here's the drawing sir...sorry for the late response...hope you consider me... TABLE.dwg Edited October 25, 2013 by James Fuentes Quote Link to comment Share on other sites More sharing options...
fixo Posted September 2, 2013 Share Posted September 2, 2013 thanks for the lisp sir, but can you kindly modify more the lisp so that it will work when there is a line that is due north or due west or due south or due east in the polygon? thaks sirs... Welcome a board, James Please upload your .jpeg or .png image of this table to see how it should be in your drawing, just a few lines from this table I didn't understand your explanation correct Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted October 3, 2013 Share Posted October 3, 2013 Hi guys, The Fixo's code is very useful. It's help me a lot. But I really need modify the table format. Maybe someone can help me out please! If anyone interest in my request, please see the attach file. Thank you everybody!! TABLE.dwg Quote Link to comment Share on other sites More sharing options...
ymg3 Posted October 8, 2013 Share Posted October 8, 2013 But I really need modify the table format The attached file will do it, any number of repetitions across. At the beginning of the program, there is a constant section where you can adjust some of the parameters, among them is rep currently set at 5. Make sure that you set your textstyle height to 0.0 The prompts are in spanish but that should not be a problem for you. Take a little time to study this code as well as Fixo's excellent code and you'll be able to do that kind of modifications. ymg derrotero.LSP Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted October 8, 2013 Share Posted October 8, 2013 Hi ymg3, How are you? Thank you for replay. Amazing code, ymg3!!!! It was almost exactly I was looking for. You code works only for UCS-World. But if I rotate the UCS and saved to other name didn't work properly. And I'd like the lisp giving the azimuth for the current UCS. Could you please see the attached file? I really appreciate your kind help. Regards TABELA_1.dwg Quote Link to comment Share on other sites More sharing options...
ymg3 Posted October 8, 2013 Share Posted October 8, 2013 Madruga_SP, I think you are being a little lazy here. If you go in gile's subroutine listpol and apply a trans function to the points, (setq lst (cons (trans pt 0 1 ) lst)), your coordinates will now be in current UCS. For the wipeout it is going to be a little more complicated but I will post anew when ready. It would also be possible to choose your starting point. I hate this, as it adds a new prompt. However we could make it that when you select the polyline it would start at the nearest point of selection and thus get away from the additional prompt. Do look at the code and do try to modify yourself, this is the only way you will learn. This forum is for that, not a shopping mall. ymg ;;; listpol (gile) ; ;;; Returns the vertices list of any type of polyline (UCS coordinates) ; ;;; ; ;;; Argument ; ;;; pl : a polyline (ename or vla-object) ; (defun listpol (pl / pa pt lst) (vl-load-com) (setq pa (if (vlax-curve-IsClosed pl) (vlax-curve-getEndParam pl) (1+ (vlax-curve-getEndParam pl)) ) ) (while (setq pt (vlax-curve-getPointAtParam pl (setq pa (1- pa)))) (setq lst (cons (trans pt 0 1 ) lst)) ) ) Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted October 8, 2013 Share Posted October 8, 2013 Hi ymg, Do look at the code and do try to modify yourself, this is the only way you will learn. You're right. I'll try it out. The problem is I'm just a beginner programmer, I don't have much knowledge about lisp. But I'll be back as soon I get a solution... This forum is for that, not a shopping mall. lol I agree with you... Sorry if I seem to be pesky. I had no intention. Thank you very much Quote Link to comment Share on other sites More sharing options...
ymg3 Posted October 9, 2013 Share Posted October 9, 2013 Madruga_SP, Here it should work in UCS as requested. I've also modified so that point 0 will be the one nearest to where you selected the polyline. Also modified the formatting of the deg min sec so that we get 0°00'00" instead of 0°0'0" so leading zero will be there for the minutes and the seconds. There was a bug in in circular wipeout function preventing it from working properly when the UCS origin was not at 0, should be OK now. ymg derroteroucs.LSP Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted October 9, 2013 Share Posted October 9, 2013 Hi ymg, How are you? I'd to say thank you very much for the big help. I'm very satisfied and happy with the goal. It's worked like a charm! Thank you for take your time helping me out. God bless you! As I promisse you, I'll study the code and I'll try improve it. Also I'd to thank you fixo, you helped me a lot. :notworthy::notworthy: Best Regards Quote Link to comment Share on other sites More sharing options...
ymg3 Posted October 10, 2013 Share Posted October 10, 2013 Madruga_SP, I've updated the program to includes the change by Lee Mac in the circular wipeout subroutine. Questions for you: 1. When you work in a UCS, do you want the text around the polyline to stay oriented per WCS ? As it is now it rotates with the UCS. 2. Do you want the table to rotate with the UCS or you want to keep it as per WCS ? As it is now the table is oriented per WCS. 3. Would and option to label the lines with the azimuth and the distance around the polyline be useful ? Let me know and I'll adjust accordingly. ymg derroteroucs.LSP Quote Link to comment Share on other sites More sharing options...
are_lit Posted October 10, 2013 Share Posted October 10, 2013 Hai mr. Small Fish, quiet useful lips you give here. but how can i modified it to included coordinate of the point? Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted October 10, 2013 Share Posted October 10, 2013 Madruga_SP, I've updated the program to includes the change by Lee Mac in the circular wipeout subroutine. Questions for you: 1. When you work in a UCS, do you want the text around the polyline to stay oriented per WCS ? As it is now it rotates with the UCS. 2. Do you want the table to rotate with the UCS or you want to keep it as per WCS ? As it is now the table is oriented per WCS. 3. Would and option to label the lines with the azimuth and the distance around the polyline be useful ? Let me know and I'll adjust accordingly. ymg Hi ymg, You're very kind, I have no word to say thank to you! That code is really important for me. Because I've already wasted a lot of time doing this job, and the lisp is fantastic! Let's go to your answer... 1- I'd like to the texts around the polyline stay always WCS-World oriented, even if rotate it. 2- The table is OK, don't need to rotate according to WCS. 3- Will be amazing if the code give me the option to put azimuth and distance around the polylines. But you don't need to bother about that, actually I have other lisp to do that. If you don't mind I'd like to ask you just one more thing... Is there any way to export all marcos, azimute and distance to a word document? e.g 0-1 25°15'02" 32,65m 1-2 152°05'30" 50,26m 2-3 48°03'05" 80,22m Because I need to make a data-sheet of the area. Kind Regards Quote Link to comment Share on other sites More sharing options...
ymg3 Posted October 10, 2013 Share Posted October 10, 2013 are_lit, Of course you can. However this could be a little involved since as you modify to a UCS your coordinates move. ymg Quote Link to comment Share on other sites More sharing options...
ymg3 Posted October 10, 2013 Share Posted October 10, 2013 Madruga_SP, Exporting to Word is possible, but the Table as it is contains Text. Much depends on what you need in Word, Please post an example of what you do in word. I will modify the routine so that text stay oriented to the WCS and repost when ready. ymg Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted October 10, 2013 Share Posted October 10, 2013 Hi, my friend Exporting to Word is possible, but the Table as it is contains Text. I just need the marcos to know where the label came from, azimuth and distance to fill the data-sheet. Thank you TESTE.txt Quote Link to comment Share on other sites More sharing options...
ymg3 Posted October 10, 2013 Share Posted October 10, 2013 I just need the marcos to know where the label came from, azimuth and distance to fill the data-sheet. If yo dou EXPORTTABLE at the command line, you will get a CSV which can be imported to WORD easily. ymg Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted October 10, 2013 Share Posted October 10, 2013 EXPORT Table is good. It's worked! No need lisp for that, the autocad command is sufficient. Thank you, ymg. Quote Link to comment Share on other sites More sharing options...
ymg3 Posted October 11, 2013 Share Posted October 11, 2013 Madruga_SP, Here it is with the text rotation staying per WCS. I've also added a clipboard function, so as you complete the table the data is all in the clipboard to paste in whatever program. Added an option to start the numbering from whatever base number you want. Also in the constant section you defines the layers and the color you want. Some jurisdiction force you to utilize prescribed names for layers. ;;; Constant Section Adjust These Values ; (setq txth 7.00 ; Text Height your Style must be set at 0.0 ; tith (* txth 1.25) ; Table Title Text Height ; areh (* txth 1.5) ; Heigt for Area Annotation ; worad (/ txth 2.0) ; Wipeout Radius ; osnum (* txth 2.0) ; Offset for Numbers around polyline ; colw (* txth 10) ; Width of Columns ; rowh (* txth 2. ; Height of Datarows ; rep 5 ; Number of Repetions of 3 columns Data ; basenum 1 ; Base Number for beginning numerotation ; separator "\t" ; Separator for Clipboard text ; ) ;;; Set the various layers and color below ; (setq pollay "TERRENO" pollaycol 180 ; Layer for Polylines ; wolay "WIPEOUT" wolaycol 2 ; Layer for Wipeouts ; tbllay "MEDIDAS" tbllaycol 4 ; Layer for Table ; stalay "NRO-DIVISAS" stalaycol 2 ; Layer for Station Numbers ; arealay "AREAS" arealaycol 2 ; Layer for Areas ; annotlay "ANNOTATIONS" annotlaycol 2 ; Layer for Annotations ; ) I still need to do some ameliorations on the TEXT color in the table and will probably add settings for that. If I have a bit of time, will make it multilingual and add the annotations on the polyline. OH!, Last I got fed up of typing DERT so now it is DT to start the program. ymg dt.LSP Quote Link to comment Share on other sites More sharing options...
Madruga_SP Posted October 11, 2013 Share Posted October 11, 2013 Hi ymg, It's just impressive! Better than I thought... Your code is doing everything than I want, just one single click. Actually is 2 clicks. lol Why is the wipeout is not working. Am I doing something wrong? I've changed the radius and didn't work. Thank you very much again. I'd like to invite you to come to Brazil to watch the Opening Cup match next year, my treat! Regards Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted October 11, 2013 Share Posted October 11, 2013 Madruga_SP... You have to activate WIPEOUTS by firstly creating and deleting temporary dummy WIPEOUT... Here is code I've modified, but still hoping to have translation... M.R. dt.LSP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.