Recent Posts

Pages: 1 ... 8 9 [10]
91
AutoLISP (Vanilla / Visual) / Re: Get VideoCard Info.
« Last post by kruuger on April 09, 2024, 03:41:28 PM »
I don't know, maybe all 3 are the same...
dig more this issue. probably problem is that it is one monitor with 1 on each side, but at the end it is one big window desktop.
looks like return main screen info :(
92
AutoLISP (Vanilla / Visual) / Re: BricsCAD Bundle and Plugins Path
« Last post by Tharwat on April 09, 2024, 02:18:19 PM »
Thanks guys for your replies.
93
AutoLISP (Vanilla / Visual) / 2025 new Enterprise package.
« Last post by Lonnie on April 09, 2024, 01:21:50 PM »
Ok I've started a thread maybe a half dozen times and I've figured out my answers. I am bitting the bullet and just putting a place holder here in case I need a quick question answered.
Thank you for the indulgence. 

I am starting my 2025 custom AutoCAD package. If it's all right with you all I will do one thread for many questions I am sure I'll have.

My first line in my cuidoc lisp is

(setq var1 (getenv "DCEload21"))
(if (/= var1 "loaded")
   (load "\\\\dce\\designdata\\cadd\\dc acad\\default\\general\\support\\Enterprise 2021\\2021 DCE Profile.lsp")
      (princ var1)
)

The profile lsp does one time things.

Like
Code: [Select]

Sets Trusted Paths: Sets trusted paths for AutoCAD so that Lisp files don't face challenges.

Folder Existence Check: Defines a function to check if a folder exists locally and create it if it doesn't.

Sets Support Paths: Specifies support paths and working paths for various AutoCAD functionalities.

Loads the Enterprise Menu Configuration:

Sets Help File Pathing: Specifies the location of the help files.

Adds the location of our custom dictionary file.

Sets Printer Configuration Paths: Specifies paths for printer configurations.

Sets Plot Style Table Paths: Specifies paths for plot style tables.

Sets Automatic Save Location: Sets the location for automatic saving of files.

Sets Drawing Template File Location: Specifies the location of drawing template files.

Sets Default Template File Name: Specifies the default template file name for new drawings.

Sets Log File Locations: Sets locations for various log files.

Sets Save Version of AutoCAD: Sets the save version of AutoCAD.

Sets Various Variables: Sets various AutoCAD variables needed for operations.

Setts Additional Variables: Sets additional optional variables to aid in work.

Changes Screen Colors: Changes screen colors for model space background, command area, and crosshairs.

Adjusting Layer Isolation: Adjusts layer isolation settings.

Sets Registry Value I can update values if needed.

AutoCAD's new Custom Install looks to only use an arg file as it's configuration file. Anyone foresee a problem with pathing for an enterprise setup?

If anyone has suggestions before I ask questions please feel free to help.

Finally !
94
AutoLISP (Vanilla / Visual) / Re: which code can change Tolerance Display to Basic
« Last post by ribarm on April 09, 2024, 12:19:47 PM »
I've just looked at your code, you missed (= tol 0) in the line (if (or (= tol 1) (= tol 2) (= tol 3)) ...
95
XDRX-API / [XDrx-PlugIn(136)] Extract dimension text
« Last post by xdcad on April 09, 2024, 11:06:19 AM »
https://www.cadtutor.net/forum/topic/75587-help-with-extracting-text-from-one-dimension/#replyForm

Code: [Select]
(defun c:tt (/ e ms mat ents basepoint)
  (if (and (setq e (xdrx-nentselex
     (xdrx-string-multilanguage
       "\n拾取标注文本<退出>:"
       "\nPick Dimension Text<Exit>:"
     )
     '((0 . "*text"))
   )
   )
   (xdrx-object-iskindof (car (last e)) "dimension*")
      )
    (progn
      (setq ms       (xdrx-get-currentspace)
    mat       (xdrx-matrix-identity 3)
    ents      (xdrx-object-deepclone ms (car e) mat)
    basepoint (xd::geom:get9pt (xdrx_entity_box ents) 5)
      )
      (xd::drag:freemove ents basepoint (+ 1 4 128) 547 t)
    )
  )
  (princ)
)
96
AutoLISP (Vanilla / Visual) / Re: which code can change Tolerance Display to Basic
« Last post by masao on April 09, 2024, 09:58:22 AM »
You quoted my code that is not last one... Copy with ctrl+c and ctrl+v the code into notepad and save it as *.lsp - be sure that all file types are selected from notepad before you save it as *.lsp... I am tired now and don't understand what else do you want... It works for me perfectly...

Bye and best wishes...

thanks so much,i fix ok.

i just add textbox. so just fix dimgap <0 can get box. i didn't know at first. thank you so much.

Code: [Select]
(defun c:tolerance_Display (/ DT ENT ID SDT)

(setq acdoc (vla-get-activedocument (vlax-get-acad-object)))

(while


  (setq dt  (ssget ":S" '((0 . "DIMENSION")))
        sdt (sslength dt)
        id  0

  ) ;_ end of setq

(vl-cmdf "_.undo" "_begin")

  (repeat sdt

    (progn
      (setq
        ent (ssname dt id)
        tol    (vla-get-tolerancedisplay (vlax-ename->vla-object ent))
        id  (1+ id)

      ) ;_ end of setq

(if (or (= tol 1) (= tol 2) (= tol 3))

(vla-put-textgap (vlax-ename->vla-object ent) -0.625)

      (vlax-put-property
        (vlax-ename->vla-object ent)
        'toleranceDisplay
        4
      ) ;_ end of vlax-put-property



)

    ) ;_ end of progn
  ) ;_ end of repeat

(vl-cmdf "_.undo" "_end")

)
 
  (princ)
) ;_ end of defun
(princ)
;;;;;;;;;;;;;;;;;;;;;;;;;;
97
AutoLISP (Vanilla / Visual) / Re: which code can change Tolerance Display to Basic
« Last post by ribarm on April 09, 2024, 09:30:57 AM »
You quoted my code that is not last one... Copy with ctrl+c and ctrl+v the code into notepad and save it as *.lsp - be sure that all file types are selected from notepad before you save it as *.lsp... I am tired now and don't understand what else do you want... It works for me perfectly...

Bye and best wishes...
98
AutoLISP (Vanilla / Visual) / Re: which code can change Tolerance Display to Basic
« Last post by masao on April 09, 2024, 09:16:56 AM »
I've added lower and upper deviations choices...

Code - Auto/Visual Lisp: [Select]
  1. (defun c:dimtolerances-ss ( / *error* ch chh tm tp s i e )
  2.  
  3.  
  4.   (defun *error* ( m )
  5.     (if m (prompt m))
  6.     (princ)
  7.   )
  8.  
  9.   (initget "Yes No")
  10.   (setq ch (cond ( (getkword "\nDo you want to keep deviation or not [Yes/No] <Yes> : ") ) ("Yes")))
  11.   (if (= ch "Yes")
  12.     (progn
  13.       (setvar (quote dimtol) 1)
  14.       (initget 1)
  15.       (setq tm (getreal "\nSpecify lower deviation : "))
  16.       (setvar (quote dimtm) (- tm))
  17.       (initget 1)
  18.       (setq tp (getreal (strcat "\nSpecify upper deviation - for symertical, type : " (rtos (- tm) 2) " : ")))
  19.       (setvar (quote dimtp) tp)
  20.       (setvar (quote dimtdec) 2)
  21.       (setvar (quote dimtzin) 0)
  22.       (initget "Yes No")
  23.       (setq chh (cond ( (getkword "nDo you want text frame or not [Yes/No] <Yes> : ") ) ("Yes")))
  24.       (if (= chh "Yes")
  25.         (setvar (quote dimgap) (cond ( (> (getvar (quote dimgap)) 0) (- 0 (getvar (quote dimgap))) ) ( t (getvar (quote dimgap)))))
  26.         (setvar (quote dimgap) (cond ( (< (getvar (quote dimgap)) 0) (abs (getvar (quote dimgap))) ) ( t (getvar (quote dimgap)))))
  27.       )
  28.     )
  29.     (progn
  30.       (setvar (quote dimtol) 0)
  31.       (initget "Yes No")
  32.       (setq chh (cond ( (getkword "nDo you want text frame or not [Yes/No] <Yes> : ") ) ("Yes")))
  33.       (if (= chh "Yes")
  34.         (setvar (quote dimgap) (cond ( (> (getvar (quote dimgap)) 0) (- 0 (getvar (quote dimgap))) ) ( t (getvar (quote dimgap)))))
  35.         (setvar (quote dimgap) (cond ( (< (getvar (quote dimgap)) 0) (abs (getvar (quote dimgap))) ) ( t (getvar (quote dimgap)))))
  36.       )
  37.     )
  38.   )
  39.   (prompt "\nSelect DIMENSION entities...")
  40.   (setq s (ssget "_:L" (list (cons 0 "DIMENSION"))))
  41.   (repeat (setq i (sslength s))
  42.     (setq e (ssname s (setq i (1- i))))
  43.     (vl-cmdf "_.-dimstyle" "_a" e "")
  44.     (entupd e)
  45.   )
  46.   (*error* nil)
  47. )
  48.  

M.R.

thanks ,if add textbox to (vla-put-tolerancedisplay obj 4) ,i must get which metadata? (get size and dimtp and dimtm)

dimgp can add textbox?
99
AutoLISP (Vanilla / Visual) / Re: which code can change Tolerance Display to Basic
« Last post by ribarm on April 09, 2024, 08:49:10 AM »
I've added lower and upper deviations choices...

Code - Auto/Visual Lisp: [Select]
  1. (defun c:dimtolerances-ss ( / *error* ch chh tm tp s i e )
  2.  
  3.  
  4.   (defun *error* ( m )
  5.     (if m (prompt m))
  6.     (princ)
  7.   )
  8.  
  9.   (initget "Yes No")
  10.   (setq ch (cond ( (getkword "\nDo you want to add or keep deviation or not [Yes/No] <Yes> : ") ) ("Yes")))
  11.   (if (= ch "Yes")
  12.     (progn
  13.       (setvar (quote dimtol) 1)
  14.       (setq tm (getreal "\nSpecify lower deviation - for symetrical it must be negative number <0.0> : "))
  15.       (if (not tm)
  16.         (setq tm 0.0)
  17.       )
  18.       (setvar (quote dimtm) (- tm))
  19.       (setq tp (getreal (strcat "\nSpecify upper deviation - it must be higher number than : " (rtos tm 2) " - and for symetrical must be the same but positive value (" (rtos (- tm) 2) ") <0.0> : ")))
  20.       (if (not tp)
  21.         (setq tp 0.0)
  22.       )
  23.       (setvar (quote dimtp) tp)
  24.       (setvar (quote dimtdec) 2)
  25.       (setvar (quote dimtzin) 0)
  26.       (initget "Yes No")
  27.       (setq chh (cond ( (getkword "nDo you want text frame or not [Yes/No] <Yes> : ") ) ("Yes")))
  28.       (if (= chh "Yes")
  29.         (setvar (quote dimgap) (cond ( (> (getvar (quote dimgap)) 0) (- 0 (getvar (quote dimgap))) ) ( t (getvar (quote dimgap)))))
  30.         (setvar (quote dimgap) (cond ( (< (getvar (quote dimgap)) 0) (abs (getvar (quote dimgap))) ) ( t (getvar (quote dimgap)))))
  31.       )
  32.     )
  33.     (progn
  34.       (setvar (quote dimtol) 0)
  35.       (initget "Yes No")
  36.       (setq chh (cond ( (getkword "nDo you want text frame or not [Yes/No] <Yes> : ") ) ("Yes")))
  37.       (if (= chh "Yes")
  38.         (setvar (quote dimgap) (cond ( (> (getvar (quote dimgap)) 0) (- 0 (getvar (quote dimgap))) ) ( t (getvar (quote dimgap)))))
  39.         (setvar (quote dimgap) (cond ( (< (getvar (quote dimgap)) 0) (abs (getvar (quote dimgap))) ) ( t (getvar (quote dimgap)))))
  40.       )
  41.     )
  42.   )
  43.   (prompt "\nSelect DIMENSION entities...")
  44.   (setq s (ssget "_:L" (list (cons 0 "DIMENSION"))))
  45.   (repeat (setq i (sslength s))
  46.     (setq e (ssname s (setq i (1- i))))
  47.     (vl-cmdf "_.-dimstyle" "_a" e "")
  48.     (entupd e)
  49.   )
  50.   (*error* nil)
  51. )
  52.  

M.R.
100
AutoLISP (Vanilla / Visual) / Re: BricsCAD Bundle and Plugins Path
« Last post by It's Alive! on April 09, 2024, 08:07:50 AM »
I have this issue too, I just changed my Python project to install all the goodies into
AppData\Local\Programs\...

Then I created loader modules the go into Roaming\Autodesk\ApplicationPlugins for autoloading
Seems to be working good, having separate loader modules actually gives me some flexibility.

The downside is BricsCAD uses have to manually navigate and add it to their startup suite.
I don’t want to write to the registry.

Pages: 1 ... 8 9 [10]