Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/13/2021 in all areas

  1. If you have a few layers then you could have a pop menu or toolbar, you would make a selection then click on the menu option inside the menu or toolbar is ^c^cchprop la layername
    2 points
  2. Welcome to CadTutor Frenul. This sounds like you might want to know about the LAYTRANS command. Particularly helpful if a lot of these are coming from repeat suppliers. Here you go https://knowledge.autodesk.com/support/autocad/learn-explore/caas/video/youtube/watch-v-sMUiMWiL0Z4.html
    1 point
  3. Explaining a bit more it has a defun which is a little function that can contain like a 1000 lines of code but is called from the command line by typing resetbylayer, if you want it to run as part of load sequence hence the line (c:resetbylayer) without the double semicolon means run the defun, note its at end of code. A defun with c : means the name can be used as a command (defun restbylayer would need (resetbylayer) to work within in a lisp program. Using accoreconsole is super fast, it edits a dwg without opening, you have to call a script so in this case the script file would have (load "resetbylayer") alternatively the script could just have. (command "_.setbylayer" (ssget "_A" '((0 . "*TEXT")(8 . "12"))) "" "" "") save Close https://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console.html For this task I am old fashioned and use a CMD DOS function dir *.dwg >dwglst.txt /b to make a list of all the dwg's and use Word to convert to a script, get a coffee and watch or if lots go to lunch. PS always backup beforehand.
    1 point
  4. So, if I read this correctly, you have 2 lists in the example. List 1 is the raw numbers List 2 are the numbers rounded to the nearest 0.5?. If you add together all List 1 you get a different answer to adding all of list 2. Your routine is probably doing exactly what you have told it to do. I think you need to sum together all the raw numbers and then round the result to get an accurate answer. Imagine a shorter list: 2.25 2.25 2.25 2.25 2.25 2.25 + 2.25 + 2.25 + 2.25 + 2.25 = 11.25 Go with your method and sum up the original list that's been rounded to the nearest 0.5? 2.5 + 2.5 + 2.5 + 2.5 + 2.5 = 12.5 Suppose you want the answer to the nearest whole number? Lets round the results....11.25-->11 and 12.5-->13 However what happens if you want then to the nearest 5? lets round the results....11.25-->10 and 12.5-->15 or nearest 10, could do that by rounding the last set of results, 10-->10 and 15-->20 (showing that rounded a rounded number can create a larger error) Hoping this shows that you are going to get errors adding together rounded numbers rather than going back to the originals values, summing them all up and then rounding to the precision you need from the original unrounded sum. Each time you repeat the process you are potentially adding in more errors.
    1 point
×
×
  • Create New...