Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/12/2020 in all areas

  1. Hi @BIGAL, thank you for your CODE, I have not so familiarity with lisp language, as I have with VBA, however the scope of code was to give a path, a way to follow, some suggestions to AMIR, I don't know exactly what needs he want to do. Once he had a starting code of course he can expand the procedure functionality writing some other code. Initially he asked "....Hi all guys, I'm recently started vba autocad, for my first program I'm going to create a selection set of texts and sort the texts by y coordinate, but I couldn't find a way to sort them by Y coordinate :..." , seems he received more help than he required: He has a code to retrive object coordinates, first step in order to get the object coordinates and later sort by Y coordinate. He has a code to sort the selected text by Y coordinate and redraw the same on drawing He has a code for exporting selected text on drawing into a text file readable by a notepad He has a code for exporting in Excel selected text, relative coordinates, and some other object information. I guess he has now more opportunities to manage own drawing automation compared with starting request. Thank you again, bye.
    1 point
  2. peterpan you can check if excel is open, if not open a new session or open an existing xls file. Whilst this is lisp it the same method for checking in VBA. There should be examples of Bubblesort in vba which could be useful I have a recursive one in lisp for up to 5 levels say num,x,y,z,code. Like excel columns sortGetExcel.lsp
    1 point
  3. Hi Amir, I hope I have been not so much boring with several reply, and I guess my code opened you a big possibility to use code as your needs and more. Let me know if you need something else.
    1 point
  4. All enumerations will evaluate to either an integer or some other constant data type - hence the name; the protected symbol is merely used to give some meaning to an otherwise 'magic number' e.g. (eval acbylayer) = 256. I strongly disagree with your suggested 'timesaver' as it will render code unreadable and completely defeats the self-documenting purpose of the enumeration symbol.
    -1 points
×
×
  • Create New...