Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Yesterday
  3. PGia

    Find&open files

    It works Thank you so much
  4. Objects in a drawing share several general properties that determine their appearance. These include color, linetype, linetype scale, lineweight, and more. Properties, such as color and linetype, can be changed per individual object or across many objects with the use of layers. In our next installment of the AutoCAD Foundation blog series, we have a quick tip on how to change AutoCAD object properties. For the full tutorial on changing object properties and using layers, you can check out the AutoCAD Foundations article. How to Change AutoCAD Object Properties All objects that you create have properties. Object properties control the appearance and geometric characteristics of an object. The general properties that are common to most objects are as follows: Color Linetype scale Hyperlink Layer Plot style Lineweight Linetype Thickness All other properties are object type specific. When objects are selected, you can use the Properties palette to verify and change property values. If you select an object in your drawing, here is what you might see in the Properties palette. Notice that the current properties for the selected object are displayed in the Properties palette. You can change any of these properties by clicking it and changing the value. A property that is set to “ByLayer” inherits its value from its assigned layer. In the previous example, the line object’s color of magenta is inherited from its assigned layer of 20 ELECTRICAL. If you select several objects, only their common properties are listed in the Properties palette. If you change one of these properties, all selected objects are changed in one operation. When the Properties palette is displayed and no objects are selected, the current property values are of those to be assigned to newly created objects. Property values listed as ByLayer, indicate properties that inherit their values from the layer to which the object is assigned. For example, changing the Color property value from ByLayer to Red causes all subsequent objects to be assigned the Red color which overrides the value of the assigned layer. The Properties palette takes up a lot of space. For quick access to the most common properties, you can use the Properties panel on the ribbon. As you can see in this example, the listed properties will all be determined by the current layer. Keep Going There’s much more to learn about object properties and layers. Check it out in Change Object Properties and Organize Objects with Layers: AutoCAD Foundations. The post AutoCAD Object Properties: AutoCAD Foundations appeared first on AutoCAD Blog. View the full article
  5. GLAVCVS

    Find&open files

    Mmm I forgot something very important: the convention When typing any file name, you must replace the . with @ For example: if you want to open "acad.lsp," you would type "acad@lsp"
  6. Steven P

    Find in Notepad

    Also think just modifying the open command to the filepath for notepad works: (vlax-invoke obj 'Run (strcat "c:/windows/notepad.exe \"" fnm "\"")) or (vlax-invoke obj 'Run (strcat "c:/windows/system32/notepad.exe \"" fnm "\""))
  7. GLAVCVS

    Find&open files

    (defun c:**r** nil (if averigua (progn (vlr-remove **a**) (setq **a** nil averigua nil) (princ "Open-file Command-line DEACTIVATED");"SensiCMD DESACTIVADO") ) (progn (setq **a** (vlr-command-reactor "***" '((:vlr-unknowncommand . averigua)))) (defun averigua (a b / c) (if (setq c (findfile (vl-string-subst "." "@" (car b)))) ;;; (decodifica c) (LM:open c) ) ) (princ "Open-file Command-line ACTIVATED");"SensiCMD ACTIVADO") ) ) (princ) ) Here you go. Copy this code into the acad*.lsp file where you save your custom lisps. Once loaded, you can enable or disable the included code by typing the **r** command. I assume you've downloaded Lee Mac's code (LM:open). It's perfect for what you need, so I've included a call to "LM:open," but you'll have to add the code for this function yourself. As for the **r** command, when the included code is enabled, anything you type on the command line that matches the name of a file found in any of AutoCAD's "SupportPaths," "LM:open" will open it with the default Windows application. This will happen without any command being executed To disable the code, just run **r** again. PS: When typing any file name, you must replace the . with @ Example: to "acad.lsp" type "acad@lsp" I hope it's useful
  8. if you want to copy a non-block object, it can be done by ncopy command. Using VLISP, can call nentsel and pick a nest object, you can directly get the nest object and transform matrix as Lee mentioned, then rebuild the nest object and apply the matrix to it to "extract" the nest object out.
  9. issammesk

    text field

    dear all these my problem every time i when modify station text must go for all text in red color and modified same station text so i think if i make afield for one to all text when modify in one text automatic change in all thanks again i applodt file for one of these dwg1FIELD-TEXT.dwg1FIELD-TEXT.dwg
  10. Steven P

    Find in Notepad

    Thanks Jerry and BigAl, The main use I have for this one is when I want to edit a LISP file - pop up dialogue to select the routine, open the file in notepad, 'Find' which usually takes me to the LISP name in the file. The find dialogue all happens without me needing to press any buttons. BIgAl - handy but in this case I know the file name and location to go straight to it - handy later in life if I don't know what file I want though, thanks MHUPP - going to look into that this morning, saving the answer into my "make windows work right" file Undoing the alias as in the link was the trick (Start Menu - settings - Apps - Advanced App Settings - Alias), pinned the proper notepad to the task bar (not the new one, located in c:\windows\notepad.exe or c:\windows\system32\notepad32.exe), now to set the proper notepad as the default as it should be.
  11. PGia

    Find&open files

    Hello again, GLAVCVS. I don't want to sound impatient , but it seems like no one knows about the option you're talking about. Could you share it? Thanks in advance.
  12. BIGAL

    Find in Notepad

    Maybe have a look at the windows command findstr it will search a directory for a key word, I guess could open one at a time. findstr d2 d:/mylisps/*.lsp may be useful how I find old posts
  13. mhupp

    Find in Notepad

    in windows 11 they have two notepads now. think you will have to remove the app one to go back to the classic one. https://www.dedoimedo.com/computers/windows-11-notepad-classic.html
  14. Last week
  15. Nice, I was thinking AcFdFieldReactor because it has all those plus REGEN, but it’s not available to lisp. You might add REGEN to the list, so the user can see the updated values without needing to save or plot.
  16. JerryFiedler

    Find in Notepad

    @Steven P Your function seems to work for me although I am not sure what you expect. I am using Windows 11 and BricsCAD Pro V25. When I run my test program which calls your routine: NotePad++ is opened with the test data file, the specified text is highlighted and the text is in the "find" dialog box. ( I had to click the binocular icon as the find dialog did not open on its own.) Are you expecting the "find" dialog box to open automatically? testdata.txt testNF.lsp
  17. Here's a proof-of-concept example for consideration - (defun update-attributes ( / bln idx ins map obj sel tag val ) (setq ;; List of ;; ((lower-left point) (upper-right point) "attribute value") map '( (( 0.0 0.0) (10.0 10.0) "abc") ((20.0 20.0) (30.0 30.0) "def") ) ;; Block name bln "YourBlock" tag "YourTag" ) (setq bln (strcase bln) tag (strcase tag) ) (if (setq sel (ssget "_X" (list '(0 . "INSERT") '(66 . 1) (cons 2 (strcat "`*U*," bln))))) (repeat (setq idx (sslength sel)) (setq idx (1- idx) obj (vlax-ename->vla-object (ssname sel idx)) ) (cond ( (/= bln (strcase (vlax-get-property obj (if (vlax-property-available-p obj 'effectivename) 'effectivename 'name))))) ( (setq ins (vlax-get obj 'insertionpoint) val (vl-some '(lambda ( itm ) (if (vl-every '<= (car itm) ins (cadr itm)) (caddr itm))) map) ) (vl-some '(lambda ( att ) (if (= tag (strcase (vla-get-tagstring att))) (progn (if (vlax-write-enabled-p att) (vla-put-textstring att val) ) t ) ) ) (vlax-invoke obj 'getattributes) ) ) ) ) ) ) (defun block-position-callback ( rtr arg ) (if (and arg (wcmatch (strcase (car arg) t) "qsave,save,saveas,plot,publish")) (update-attributes) ) (princ) ) ( (lambda ( key ) (vl-load-com) (foreach rtr (cdar (vlr-reactors :vlr-command-reactor)) (if (= key (vlr-data rtr)) (vlr-remove rtr) ) ) (vlr-set-notification (vlr-command-reactor key '( (:vlr-commandwillstart . block-position-callback) ) ) 'active-document-only ) (update-attributes) (princ) ) "block-position-reactor" ) There is no command to run the program: simply amend the block name, tag name, and map at the top of the code to suit your setup, and then load the program - the attributes will be automatically updated when the drawing is saved or plotted.
  18. Probably a better idea. I have been looking into the object reactors and it was seeming like it was going to bog down the drawing immensely, since we will have dozens of these blocks in a single file. Thanks!
  19. I would suggest using a single command reactor to automatically update all blocks on save or plot - this is far simpler than using an object reactor to track modifications to each individual block reference.
  20. The issue is CAD literacy within the office. One of my engineers would be fine to use it, but the rest are fairly CAD illiterate. I try to keep things as simple as possible (I know running a lisp command is simple to begin with)
  21. Steven P

    Find in Notepad

    Good Morning, I have been using this to search for text in a text file, now I have been upgraded to windows 11 it doesn't work, and I can't work out what change to make. Looking for some guidance again, thanks! fnm: File name (including filepath) str: Text String delay: a delay, say 1000 mS Will open notepad and should perform a 'find' to jump to the text. It gets as far as 'find' to open the dialogue box but won't populate it or hit 'enter' to do the find, using sendkeys - which has always worked before. thanks for any help ;;To find text within a text file. ;;http://www.cadtutor.net/forum/showthread.php?102326-Open-text-file-and-jumping-to-a-line&p=694572#post694572 ; example command to call it (NotepadFind "C:\\Downloads\\test 123.txt" "findtext" 300) (defun NotepadFind (fnm str delay / obj) (vl-catch-all-apply (function (lambda () (setq obj (vlax-get-or-create-object "WScript.Shell")) (vlax-invoke obj 'Run (strcat "Notepad.exe \"" fnm "\"")) ;; or notepad++ if that is used. (setvar 'cmdecho 0) (command "_.delay" delay) ; Milliseconds. For BricsCAD users: (sleep delay) does not work. (setvar 'cmdecho 1) (vlax-invoke obj 'AppActivate "Notepad++") ; Title bar name of application. ++ for notepad++ but still works? (vlax-invoke obj 'SendKeys (strcat "^f" str "{ENTER}{ESC}")) ) ) ) (if obj (vlax-release-object obj)) )
  22. Camera command does 90% what your asking idk if it says layer states tho.
  23. Hello Is it possible to create a camera view in a drawing that captures what is currently visible, using a LISP command instantly? For example, when I rotate a 3D object and want to take a "screenshot" of that specific view. The proposed idea is to create permanent camera icons (or similar markers) in the drawing, allowing me to click on them to instantly switch to the saved viewing position as it was captured to review area. Thank you!
  24. Start with the profiles on the vertical back plane (XZ world) then extrude. Add consruction lines to define regions. Extrude regions, substract cylinders and union it all together.
  25. Hi Bigal, Curious if had any questions.. if my description was clear. Thanks for looking into this.
  26. @cmc1212 did you ever get help I know I’m here like 9 months after your post it I’m stuck and getting desperate
  27. Reading this one, what is the objection to the engineers running a LISP? You could add it as a button, in the ribbon, or as a command to suit their preferences, and if you make it easier for them they'll use it. For example a single command to draw the rectangle and insert the block instead of 3 or 4 commands makes things quicker and easier, the engineers should jump on that (every speed improvement is after all another few seconds to go and make another coffee!)
  28. Properties 4,5,6 I can’t seem to get the right sizes or anything I saw your 2012 forum and thanks that helped me get to this point but I’m stuck now
  1. Load more activity
×
×
  • Create New...