Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/18/2021 in all areas

  1. Had a quick look today how many lsp files do I have. Well found 4500, some are duplicates some are versions, explains why sometimes seem to remember doing something and can not find. They are not all mine just collected a few hundred along the way. Was just wondering Lee, Alan JT, Pbe, Ronjonp, GRRR just to mention a few how many do you have ?
    2 points
  2. Ok I apologise just see so many times do it for me, but your having a go, if your happy can provide code for pick location for table and make a header, and title row, pick pline then use INSERTROWS function and add rows as required, this could be 1 by 1 or pick lots of plines. Happy to provide example code. As a side answer table cells can have a field as an answer so if change pline shape will update.
    2 points
  3. lspsurf.exelspsurf.lspBy the way I just found something like that installed in the Express tools from Autodesk It's a small software that allows you to see your routines and to have a quick look at them. I just hope it can be useful to you too. Althought it can be useful to have a look at your code Steven, I really like this forum, where one can always keep learning. Thanks to you all guys.
    1 point
  4. Of the stuff I've gathered \ written over ~20 years, 370 files .. could probably get rid of half of them too.
    1 point
  5. I wanted to add a side note for future use to anyone experiencing the same or similar issues. We were about to delete my profile on the computer thinking that there was a setting that was preventing the DWG from fully opening. Even though it was a new computer and new install of Civil 3d my previous setting were still there from bringing over my profile for the new computer. By deleting my profile it would have set things back to a stock setting. This was a best guess based on the fact that other Designers could open the same file just fine and we had exhausted all other options besides doing a full reinstall of Civil 3d. (we did do a fix and repair install) TR's way was much faster and only affected CIvil 3d. Thank you again TRogers.
    1 point
  6. Welcome to the forum, TRogers. Way to go, hit it out of the park on your first at-bat!
    1 point
  7. Something like this ;; Example shows how to pick a single table cell on screen and change its value. ;; This example demonstrates the ActiveX properties/methods HitTest, ;; GetCellType, GetText and SetText. ; original code by Lee Ambrosius 2015 (defun c:SelectTableCell ( / pick vHeight vWidth lwrLeft uprRight vector SS_TABLES cnt eMax tableObj row col cellValueOrg) ;; Ask the user for a point on screen (if (/= (setq pick (vlax-3d-point (getpoint "\nSelect Cell to edit: "))) nil) (progn ;; Get the corners of the screen display to build our selection set (setq vHeight (getvar "viewsize")) (setq vWidth (* (/ (nth 0 (getvar "screensize")) (nth 1 (getvar "screensize"))) vHeight)) (setq lwrLeft (list (- (nth 0 (getvar "viewctr")) (/ vWidth 2)) (- (nth 1 (getvar "viewctr")) (/ vHeight 2)) 0)) (setq uprRight (list (+ (nth 0 (getvar "viewctr")) (/ vWidth 2)) (+ (nth 1 (getvar "viewctr")) (/ vHeight 2)) 0)) ;; Get the current display orientation (setq vector (vlax-make-safearray vlax-vbDouble '(0 . 2))) (vlax-safearray-fill vector '(1 1 1)) (setq vector (vlax-make-variant vector)) ;; Select all the table objects visible on screen (if (setq SS_TABLES (ssget "C" lwrleft uprright (list (cons 0 "ACAD_TABLE")))) (progn (setq cnt 0 eMax (sslength SS_TABLES) ) ;; Step through all the items in the selection set (while (> eMax cnt) ;; Geta table object from the selection set (setq tableObj (vlax-ename->vla-object (ssname SS_TABLES cnt))) ;; Return values for what cell was picked in (setq row 0 col 0) ;; Check to see if a valid cell was picked (if (= (vla-hittest tableObj pick vector 'row 'col) :vlax-true) (progn ;; Get out of the loop (setq cnt (1+ eMax)) ;; Check to see what the Cell Type is (Text or Block) (if (= (vla-GetCellType tableObj row col) acTextCell) (progn ;; Let's get the value out (setq cellValueOrg (vla-GetText tableObj row col)) ;; Change the current value (vla-SetText tableObj row col "Revised Text") (vla-Update tableObj) (alert "Cell text was changed.") ;; Restore the original value (vla-SetText tableObj row col cellValueOrg) (vla-Update tableObj) (alert "Cell text was changed back to the original value.") (setq cnt eMax) ) ) ) ) (setq cnt (1+ cnt)) ) ) ) ) ) (princ)
    1 point
  8. 1 point
  9. Ok you need to look at Aeccoreconsole it will run without opening drawings. The attached code is for plotting a range of layouts in a dwg so would suit your needs, it would need to be changed slightly to accept the layout range from a script etc. Edit the following. (defun AH:pltlays (numlay numend / lay) (SETVAR "PDMODE" 0) (setvar "fillmode" 1) (setvar "textfill" 1) (setq alllays (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object)))) (setq count (vla-get-count alllays)) ;(if (not AH:getvalsm)(load "Multi Getvals.lsp")) ;(setq vals (AH:getvalsm (list "Enter plot range" "Enter start tab number" 6 4 "1" "Enter end tab number" 6 4 (RTOS COUNT 2 0)))) ;(setq numlay (atoi (nth 0 vals))) ;(setq numend (atoi (nth 1 vals))) Ok so a typical Aeccoreconsole is ran from a batch file :: Path to AutoCAD core console set accoreexe="C:\Program Files\Autodesk\AutoCAD 2020\accoreconsole.exe" :: Path to the script to run set script="C:\Users\[USERNAME]\Desktop\TESTER\tester2.scr" %accoreexe% /i C:\Users\[USERNAME]\Desktop\IPAD\TESTER\TEST1.dwg /s %script% %accoreexe% /i C:\Users\[USERNAME]\Desktop\IPAD\TESTER\TEST2.dwg /s %script% %accoreexe% /i C:\Users\[USERNAME]\Desktop\IPAD\TESTER\TEST3.dwg /s %script% %accoreexe% /i C:\Users\[USERNAME]\Desktop\IPAD\TESTER\TEST4.dwg /s %script% %accoreexe% /i C:\Users\[USERNAME]\Desktop\IPAD\TESTER\TEST5.dwg /s %script% The script file would be (load "plotpdfrange") (AH:pltlays 1 100) plotA3Pdfrange.lsp
    1 point
  10. Sounds like you may need to reset your settings to default. Close Civil 3D... The easiest way to do this is to go to your Windows Registry Editor. Browse to HKEY_CURRENT_USER\SOFTWARE\Autodesk\AutoCAD\R24.0\... There, you will see ACAD-4100:409. Right-click on it and delete it. Restart Civil 3D.
    1 point
  11. From the advice you got elsewhere, the solution may be to weed out as many of the zero readings as you can. I can't tell how you built your surface, so I'm not sure how you would do that. If there are a lot of zero-level triangles, you can probably consolidate them. I believe there's a surface utility for that, I haven't used it much. Once you have taken out the skew of the zero readings, you should be able to use vertical exaggeration to get good separation of the rest of your values (assuming you still need to). Another possibility is to use a grid surface, if you don't need pinpoint accuracy for your readings. Depending on data distribution, though, that might make it worse.
    1 point
  12. @Erhanask Here is how you make this program work like the FILLET command in the sense that it will use the last default radius until you select the keyword "Radius" or "R" to change it. Look at my comment in the code to set the initial default if you are in a new drawing. I have currently just used 0.5, but you can set it to something more appropriate for your scale. ;; original code written by Lee Mac. Altered By P. Kenewell (defun c:qarc ( / a b c r z ) (setq z (trans '(0 0 1) 1 0 t) a (angle '(0 0) (trans (getvar 'ucsxdir) 0 z t)) b (+ a 4.712388980384689) ) (if (not qarc:def)(setq qarc:def 0.5)) ;Set the default radius to your preference (setq r qarc:def) (princ (strcat "\nCurrent Radius = " (rtos r 2 3))) (initget "Radius") (while (setq c (getpoint "\nArc center [Radius]: ")) (if (= c "Radius") (if (not (setq r (getdist (strcat "\nSpecify arc radius <" (rtos qarc:def 2 3) ">: ")))) (setq r qarc:def) (setq qarc:def r) ) (entmake (list '(000 . "ARC") (cons 040 r) (cons 050 a) (cons 051 b) (cons 010 (trans c 1 z)) (cons 210 z) ) ) ) (initget "Radius") ) (princ) ) @Lee Mac may have a more efficient way to code this.
    1 point
  13. You mean the intersection between the red line and all the white lines? Refer to our legend here: http://lee-mac.com/intersectionfunctions.html#intersectionsbetweensets It works fine to me when I tried inspecting: (LM:intersectionsbetweensets (ssget '((62 . 256))) (ssget '((62 . 1))))
    1 point
×
×
  • Create New...