Jump to content

Search the Community

Showing results for tags 'lisp lsp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

  1. I Have lisp for placing slope and arrow with polyline and i want enhance this to what i need mention in my drawing file..so i have attached lisp & sample drawing file . and also want to enhance lisp for select all polyline at once, currently lisp select on object at once. thanks. Slope.lsp SLOPE SAMPLE.dwg
  2. MCOLLAR.LSPMCOLLAR.DCL Collar Drawing.dwg Hey Guys yet with another question: I created this DCL that has 5 user input and I would like it to draw this complicated collar for me. Basically, the size of the mast (monopole diameter) is given together with the thickness of the collar plate (which is the same thickness for the ring plate), then there are some fixed values that can be assumed to draw this. Hopefully 1/3 can be drawn and then array at 120 deg. DWG I posted would be a better representative. The number of bolts (5 rows shown on this picture) is only the best fit for the
  3. Sambuddy


    I had a problem in the past whereby the first page appeared blank and I pulled out my hair to fix it - now that this problem is over I am back to yet give it another try to see if I can make this routine successful. Upon entering "PUB" command I would have three options (1st one uses autopub) (second is the one with the problem) (3rd only sets the correct page setup). I tried to use ghostscript but with no success - I then jupmed in to use another application as shell command (PDFTK builder) but that did not panout either. I would like basically the "PDF-SELECTION" option to select page s
  4. (robocopy sourcepath destinpath "*.*" "/MIR") (if (newer-p flstxt1 flstxt2) (progn (c:robocopy-T2C) (prompt "******<<< Files are being updated >>>******") (princ) );end_progn if true (progn (prompt "---* No action taken. Files are already up to date! *---") (princ) );end_progn or else );end_if Posted above are a few line from the code I combined that checks to see if a specific txt file is been updated, then executes robocopy to copy/ mirror files from T drive on server to C drive on local PC. The code above is a standalone lisp file that lo
  5. I am trying to include every dwg extenstion in a list, only then to use for each to set them to read-only. (defun Read_only ( file / fso f ) (setq fso (vlax-create-object "Scripting.FileSystemObject")) (if (not (zerop (vlax-invoke fso 'FileExists file))) (progn (setq f (vlax-invoke fso 'GetFile file)) (vlax-put-property f 'Attributes (boole 7 1 (vlax-get f 'Attributes))) (vlax-release-object f) ) ;END PROGN ) ;END IF (vlax-release-object fso) ) (setq drwnClist (vl-directory-files "C:\\TX Cad Config\\Block\\" "*.dwg" 1)) how do I use a foreach statement to include all files to undergo
  6. @Lee Mac hopefully you can answer me in your earliest convenience as almost everyone is moving from offices to homes, I am trying to find a way to update PCs. Basically, the overwrite function does not seem to work for me - if I make an update, I am trying to have to so that it updates the files and folders but it does not seem to be happening. I have been twitching this routine but still having the same problem. It does work when I do not have the initial folder but when it exists, it just does not overwrite it. Could you please help! Thanks, As you can see, I am tr
  7. Hey guys, I wrote a routine that automatically change the setting or copy files from server onto C drive. What I am looking for is an idea to invoke these changes each time I make any changes on the source folder. I do not want to search for changes, but rather I was thinking let's say acaddoc evaluate something or through a lisp I tell it to < Update is available. Do you want to update? > for directories on anyone's C Drive if I make any changes on the source directory. I am looking for an idea... I have about 10-15 folders and sub-folders with all bunch of extensions on the s
  8. Hey Guys, I am trying to write a lisp that has 4 or 5 list boxes. "LS1" would be the main list that appears on the first pane. When you click on "General" then second list box then would contain "LS2" as a sub category on the second pane. Then, if for example "LDF" from the second list/ pane is selected, "LS3" would show up on third list box and hopefully upon double clicking, it would insert a block from "LS3" list. Hopefully someone can follow my logic here and provide some help as to how to go about it. Thanks guys. The original lisp in done by Lee Mac in 2015
  9. hey guys, I am hoping someone can tell me what is wrong with my cad. I have been fiddling around with the autopublish to generate PDF and it seems somehow a variable or something was made incorrect. As a result, each time I publish say PDF or hard copy, first page/ tab of any project appears blank. This seems to be consistant no matter if I change my page setup under publish to any predefined setting. (1st. page is always either blank or extremely small that appears as though it is blank). Any suggestions? Does anyone know what is wrong? Thanks
  10. The lisp below is lee macs Parsing numerical values from a text. I am wondering how to use this to change the colour within the selected Mtext only for real numbers that accompany "m", for example: 112.35m etc... <number> <dot> <number><m> sometimes there is one space between the real number and "m", so if I could first remove the space for every real number within the text for each, then change the colour for each. I gave it try and I seem not to be successful with this task. Thanks ;; Parse Numbers - Lee Mac ;; Parses a list of n
  11. hey Guys, I am hoping someone can let me know what is incorrect about my approach here. I have created 2 routines: IMP-CUI: which renames the old "acad.cuix" and bring in my updated one (do not ask why I did not use "vl-file-copy" method as the result was not satisfactory for me anyways). 2016N: which import the profile from a server location and renames the "...(US Metric)" first to then replace it with an updated one with the same name. The result is quite random when I try it on different computers with the same version. Although I can see that the profile is impo
  12. Does anyone know where the file is saved each time you load the "LIST" that you saved on this amazing LISP? http://www.lee-mac.com/bfind.html The reason I am asking is because I would like to transfer my list onto another computer but I cannot find where the file is located when you save your list to then "Load search items list"! Thanks
  13. Would anyone help me find and change certain setting I would like to change under Options or preferences: 1) I would like to load and unload a buck of CUIX files - but as always the menu will not show up - I have to then manually do CUILOAD and unload and reload the menus to appear on menu bar. 2) This is taken from BIGAL: (vlax-dump-object (vla-get-files (vla-get-preferences (vlax-get-Acad-object))) T) which helped me a lot in finding many of the settings but I still need to change many more. 3) Anyone please help to find: ; SET OPEN AND SAVE TAB/FILE SAVE/SAVE
  14. Below is BIGAL`s wonder from 2011. All of which are amazing and never knew could be done! Imagine a 2020 BIGAL!!! Basically what I was trying to accomplish was to setup or configure my computer to then save the setting for any other but some tasks are proven impossible or not done efficiently. I did use to import workspace and get some of the task done but if there is a way to combine all the features with a lisp, I would be more satisfied. That is to be able to change a certain controls within "Options" settings as well as adding search path for lisp, trusted path, pri
  15. Could someone let me know how to use put-string to arrange text by colour so that example: all content in colour #2 remain but contents in colour # 0 and #4 are removed without changing any of the text format or style? I looked up Wmatch but it seems I cannot get anywhere with that. (setq txt(vla-get-TextString(vlax-ename->vla-object (car (entsel))))) (vla-put-textstring obj ...) not quite sure how to deal with : "\\pxse1.01;{\\C2;TEXT1\\PTEST2\\PTEST3}\\P{\\C4;TEST4\\PTEST5\\PTEST6}" to separate specific colours and merge them. I am also thinking if I coul
  16. I am trying to retrieve the current dimension style on an open cad file to execute some of my other lisps instead of (Alert blah...), but am not successful. Could someone take a quick look at this and let me know where I am getting it wrong? i had a quick look at tblnext and tblsearch and I think it is right! but maybe VLA could do this more efficiently - I have not gotten too deep into LISP though. I also have two standards ( "STANDARD" and "Standard") depending on which one is the current dim style my code changes. is there a way to make it Case sensitive? ; condition ba
  17. I am not even sure how to pose this question - so here she goes: I am not quite sure if you can select content with different colours within a text (see attachment). The code below only finds text colour selected by the layer. Is there a way? My whole intention is to sort them so that say if I pick BELL (colour 150) or RORGERS (colour 22) then the white text strings and colour 150 remains and the rest be removed - sorting by colour and merging the text condition the selection and colour!!! Possible? (setq ss (ssget "X" '((0 . "*TEXT")(62 . 1)))) if yes...how?
  18. I am trying to make this work but sometimes it works and sometimes does not. Please bare in mind that I just learned POLAR function and it may not the efficient way. The radius through fillet I am choosing sometimes works but sometimes comes up with an error that radius is too big. Is there another way to deal with drawing this or could there be a way to add arc without fillet? could someone also please explain the ssget function and how I can select any object i create and store under a variable? say, in this case I want to select all my lines: how would I do it?
  19. Hey guys, I am trying to create a label (see attached dwg) using lisp to; upon entering the command: 1) ask for prefix then keep this prefix in memory (in this case BM-SC- let's say) 2) I would just enter the number associated with any block until i change my prefix 3) create a block with the criteria (dwg attached) and attributes so I can edit the text if need be 4) simply insert it on paperspace 5) also to auto adjust the box width so it remain a certain width but if it exceeds blah mm then to fit and center text within the maximum box size instead of exten
  20. Could someone guide me through this challenge: I am trying to create a lisp to have sub commands (I am not even sure what you would call it) - and when I search sub command I get a bunch of none sense. My first list is: [Bolt/U-bolt/Pipe/Angle/Plate/Hss-square] then under "Bolt": [1-2/5-8/3-4] under "U-bolt": [1-2/5-8] under "Pipe": [General/73/89/102/114] under "Angle": only on dynamic block with all sizes under "Plate": only on dynamic block with all sizes under "Hss-square": [Square/Rectangle] I have no idea how to
  21. What I am trying to accomplish would be two selection types: 1) what the default texts would be + a manual option and 2) where on the dimension the override to happen. I seem not to be able to successfully select one of the options under (initget "(Typ.) (TYpe.) (Plus-minus ±) Manual"): the manual is supposed to be for non default text. Can someone let me know what is wrong with this? This was my result before attempting to add the first option (initget "(Typ.) (TYpe.) (Plus-minus ±) Manual"). Please help! (defun c:dimch1 (/ Rtrn txt ss in vl)
  22. how do I get the first part to work? how do I combine the two? How do I have it so first pline is drawn/executed, followed by then (c2 command) measure command to insert specific block and then (c3 command) which is offset on both sides and delete original is executed? as you can see it looks so bad... please help (defun c:c2 (/ d1) (setq d1 (entget (car (entsel)))) (setq d2 (command "_.measure" "d1" "B" "Tx - Dalle béton + tapis" "Y" "1200" "")) ) (vl-load-com) (defun c:c3 ( / *error* of undo doc ss ) (defun *error* ( msg ) (and undo (vla-EndUndomark
  23. Could someone take a look at this lisp and let me know how I can get true north based on the North Symbol attached to remember my last pick so I can enter values as angle once the true north is set - I am thinking something like Offset command that keeps last entry if it is at all possible. Attached is the north symbol I am using on my projects but to orient antenna blocks to say 40 degrees from true north, then I have to go through selection process instead of value entry each time. Thanks (defun c:test (/ ss p1 oan nan rot) (princ "\n Select objects to Rotate: ")(terpri) (setq ss (
  24. I did use STEAL lisp by MAC LEE before but since I am not inserting blocks anymore (Thousands of blocks on master general blocks), also because STEAL mess up the draw order on the hatch in dynamic blocks, is there a way: Upon entering a command to copy a selection coordinates from the source file and let user choose a place to paste them on the destination file; example: Cables <Enter> (go to D:/blocks/general blocks.dwg) and copy from specific coordinates and let me paste them to where I want on my current cad file? Thanks
  25. I have seen so many lisps to change the draw order or send hatch to back, but would there be a way to: My dynamic blocks are on layers 0 and defpoint; 1) upon inserting a dynamic block 2) preserve the block draw order or 3) send wipeout at the very back 4) Defpoint layer lines, plines, arc, circles before wipeout 5) Solid hatch before wipeout 6) Hatch ANSI32 & ANSI33 on top of Solid hatch 7) Text or dimension in Defpoint layer on top of solid hatch 8)All lines,plines, arcs, circles, etc at the very top if someone scrambles som
  • Create New...