Jump to content

Search the Community

Showing results for tags 'lsp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. Dear Friends , Please Help Me out With This rcc beam LSP file IT is Not Working, Some thing is missing in this, i am attaching my lsp file for ur refrence.... its asking output file. i dont have that file beams (2).LSP
  2. Dear Friends , Please Help Me out With This LSP file IT is Not Working, Some thing is missing in this, i am attacheing my lsp file for ur refrence.... its asking output file. i dont have that file
  3. Hi everyone, I have this script that will not work when a try to batch run it through Autoscript, however if I paste it dirctly into the command line it works no problem. Obviously I dont want to open each drawing up and paste as I have more than 2500 dwg. Any help please? Thanks in advance, Tom SELECT (ssget "x" '((2 . "AMAZON-LOCKER-08,AMAZON-LOCKER-10,AMAZON-LOCKER-11,AMAZON-LOCKER-13,AMAZON-LOCKER-14,BALER-1800HD,BALER-360,CC-CAT105,CC-HPZ2100-24,CC-HPZ2100-44,CC-HSB,CC-HSC,CC-KM4850,CC-LFB,CC-LFC,CC-SSB,CC-SSC,CC-SSF,CC-WF-LAMINATOR,CC-X4595-HCF-SF,CC-X4595-STD,CC-X4595-STD-F,CC-X4595-STD-HCF,CC-X5655,CC-X6204,CC-X7435,CC-X7655,CC-XDC252,CC-XDoc12-XDoc252,CC-XDOC252,CC-XDOC252-SM,CC-XER4595,CC-XWCP-90,CHAIR-FURN-SELECTOR-STATION,ENDLESS-AILSE-STATION-1,ENDLESS-AILSE-STATION-2,HOT-BUY,OMNI-BEACON-KIOSK,OMNI-CHAIR-KIOSK,OMNI-HUB-TABLE,OMNI-INK-FINDER-KIOSK,OMNI-SATELLITE-KIOSK,P@SS,ROLL-HOLDER-RACK-SPINNER,2PLUG,3PLUG,4PLUG"))) _.chprop layer laydel qsave
  4. To anyone out there, I'm working on a project and I need to get a block count of a select number of blocks within model space broken down to the various visibility states . I've used some of the Lee-Mac.com .lsp's, which work awesome but what i'm looking for is a combination of the three .lsp files. To put it simply how can I add a breakdown of visibility states to the COUNT.LSP that can be found on Lee-Mac.com. Thanks in advance. cadtutor.net newbie
  5. I have attached an AutoCAD 2010 file as an example of what i am about to try and explain. Please bare with me. I can export the x/y information in itself using the ptExport.lsp routine. I haven't found a way of exporting the entity information because i can't seem to get that one working. (both lsp files attached) What i actually require is being able to extract the polygon x,y, information along with the corresponding text within the polygon itself i.e ITRD 33651 37, and ideally the entity handle itself. If you understood that, firstly thanks. If you know how to help then i would forever in your debt. Thanks in advance for looking Note i have to do this for somewhere in excess of 5000 polygons!! GULP! Basket.dwg PtExport.lsp gethandle.lsp
  6. I have been getting back into lisp, after I had a class that scratched the surface of lisp, I never looked back on it until now. This is my first lisp command written without copying it from a book! (defun c:ibeamp() (setq pw (getdist "\nEnter Beam Width: ")) (setq ih (getdist "\nEnter Inner Height: ")) (setq pt (getdist "\nEnter Plate Thickness: ")) (setq po (getdist "\nEnter Overhang Distance: ")) (setq ip (getpoint "\nInsertion point: ")) (setq p2 (polar ip (dtr 180.0) (/ pw 2))) (setq p3 (polar p2 (dtr 270.0) pt)) (setq p4 (polar p3 (dtr 0.0) po)) (setq p5 (polar p4 (dtr 270.0) ih)) (setq p6 (polar p5 (dtr 180.0) po)) (setq p7 (polar p6 (dtr 270.0) pt)) (setq p8 (polar p7 (dtr 0.0) pw)) (setq p9 (polar p8 (dtr 90.0) pt)) (setq p10 (polar p9 (dtr 180.0) po)) (setq p11 (polar p10 (dtr 90.0) ih)) (setq p12 (polar p11 (dtr 0.0) po)) (setq p13 (polar p12 (dtr 90.0) pt)) (command "line" ip p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 "c" ) (princ) ) (defun dtr (x) (* pi (/ x 180.0)) ) (princ) this draws a very general I-beam. Any feedback is appreciated, constructive more so
  7. Bill_Myron

    Convert Ellipse to Arc

    I have been trying to figure this out for a couple of days now. The only thing I could find is this LISP that takes the Ellipse properties and uses them to creat an arc. When I use this, the start and end angles are not correct in the drawing. Ellipses must have been drawn in a different UCS). I have tried to get the LISP to use the start and end points of the ellipse along with the radius and center point. For the life of me I cannot figure it out. If anyone knows how to do this please let me know. *NOTE* Elllipses that I am trying to convert have the same minor and major radii. Thanks in advance!! (defun c:e2a (/ acaddoc acadms acadobj center endangle obj radius ss ssn startangle) (vl-load-com) (if (setq ss (ssget '((0 . "ellipse")))) (progn (setq acadobj (vlax-get-acad-object)) (setq acaddoc (vla-get-activeDocument acadobj)) (setq acadms (vla-get-modelspace acaddoc)) (setq ssn (ssname ss 0)) (setq obj (vlax-ename->vla-object ssn)) (if obj ;(equal (vla-get-RadiusRatio obj) 1 0.0001) (progn (setq radius (vla-get-MajorRadius obj)) (setq Startangle (vla-get-Startangle obj)) (setq Endangle (vla-get-Endangle obj)) (setq Center (vlax-get obj 'center)) (entdel ssn) (vla-addarc acadms (vlax-3d-point Center) radius Startangle Endangle) ) ; progn (alert "> Ellipse objects failed to be converted") ) ; if ) ; progn ) ; if (princ) ) ; defun
  8. I have been trying to figure this out for a couple of days now. The only thing I could find is this LISP that takes the Ellipse properties and uses them to creat an arc. When I use this, the start and end angles are not correct in the drawing. Ellipses must have been drawn in a different UCS). I have tried to get the LISP to use the start and end points of the ellipse along with the radius and center point. For the life of me I cannot figure it out. If anyone knows how to do this please let me know. *NOTE* Elllipses that I am trying to convert have the same minor and major radii. Thanks in advance!! (defun c:e2a (/ acaddoc acadms acadobj center endangle obj radius ss ssn startangle) (vl-load-com) (if (setq ss (ssget '((0 . "ellipse")))) (progn (setq acadobj (vlax-get-acad-object)) (setq acaddoc (vla-get-activeDocument acadobj)) (setq acadms (vla-get-modelspace acaddoc)) (setq ssn (ssname ss 0)) (setq obj (vlax-ename->vla-object ssn)) (if obj ;(equal (vla-get-RadiusRatio obj) 1 0.0001) (progn (setq radius (vla-get-MajorRadius obj)) (setq Startangle (vla-get-Startangle obj)) (setq Endangle (vla-get-Endangle obj)) (setq Center (vlax-get obj 'center)) (entdel ssn) (vla-addarc acadms (vlax-3d-point Center) radius Startangle Endangle) ) ; progn (alert "> Ellipse objects failed to be converted") ) ; if ) ; progn ) ; if (princ) ) ; defun [/Code]
  9. Movieangel

    Help with Stud.LSP

    So I have tried to modify a batt insulation lsp originally created by David Sides to draw studs. You would think this would be easy because all I need are 45 degree lines, but I am having some trouble. I have gotten it to work for Horizontal walls and it is ok for vertical walls a bit glitchy but not horrible. Walls at an angle on the otherhand are horrible. Any advice? ;; STUD.LSP ;; ;;========================================================== (setq xos (getvar "osmode")) (setvar "osmode" 0) (defun SSV (savelist) (mapcar '(lambda (sysvar) (list sysvar (getvar sysvar)) ) savelist) ) (setq lista '("aunits" "auprec" "blipmode" "cmdecho" "orthomode")) ;;========================================================= (defun RSV (savelist) (mapcar '(lambda (sysvar) (setvar (car sysvar)(cadr sysvar)) (car sysvar) ) savelist) ) ;;========================================================== (defun HI () (setq olderr *error*) (defun *error* (errstr) (print errstr)(princ) (setq lista (RSV lista)) (setq *error* olderr) (princ) ) (setq lista (SSV lista)) (setvar "aunits" 3) (setvar "auprec" (setvar "blipmode" 0) (setvar "cmdecho" 0) (setvar "orthomode" 0) (prompt "\nArchitectural studs. ") (prompt "\nBy Alison Baillargeon. July 12, 2011. ") (princ) ) ;;============================================================ (defun BYE () (setq lista (RSV lista)) (setq *error* olderr)(princ) (princ "\nProcessing complete. ") (princ) ) ;;============================================================ (defun c:STUD (/ A ANG1 ANG2 ANG3 LEN1 LEN2 PT1 PT2 PT3 PT4 PT5 THK1 THK2 THK3 THK4) (HI) (setq PT1 (getpoint "\nEnter start point... ") PT2 (getpoint PT1 "\nEnter end point. ") THK1(getreal "\nEnter wall thickness. ") THK2(* THK1 THK1) THK3(+ THK2 THK2) THK4(sqrt THK3) LEN1(distance PT1 PT2) LEN2(/ LEN1 THK1) ANG1(angle PT1 PT2) ANG2(+ ANG1 0.7854) ANG3(+ ANG1 5.4977) a 0 ) (while (< a LEN2) (if (= a 0) (progn (setq PT3 (polar PT1 ANG2 THK4) PT4 (polar PT3 ANG3 THK4) PT5 (polar PT4 ANG2 THK4) A 0.5 ) (command ".pline" PT1 "w" 0.0 0.0 PT3 PT4) ) (progn (setq PT3 PT5 PT4 (polar PT3 ANG3 THK4) PT5 (polar PT4 ANG2 THK4)) (command PT3 PT4) (setq a (+ a 2)) ) ) ) (command "") (command ".break" "l" PT4 (polar PT4 ANG1 THK4)) (BYE) (setvar "osmode" xos) (princ) )
  10. Hello everyone, I'm new to the forum. At work here, we're creating thousands of parcels based on information from a county. For each city block, we have to enter a consecutive block number, and then each parcel has its own number. I was wondering if anyone knows of a lisp file that would work for this, where you could click in the box or something and it would number it starting with #1, then #2, etc.. on the current layer and text? Currently, I have to copy the text, move it over, double click, type 2, and repeat about 50,000 times.
  11. Hi I have created some cuix files that i want to load automatically when a user boots autocad. for this i have created a acad.lsp file in one of my search/support directories with the following code and therefore when i start cad it loads the menu file. ^C^C^P(command "menuunload" "CUSTOMMENU" "_.menuload" "CUSTOMMENU.cuix") Great apart from it doesnt appear. The command line reads: "Customization file loaded successfully. Customization Group: CUSTOMMENU" so its loaded and if i go to either cuiload or QUICKCUI i can see it and edit /unload it. The only ways i can get it to appear are by unloading it and reloading it using cuiload in which case it works fine until i reboot autocad as my script unloads it. or by changing my workspace to 2d and them back to classic and it appears. My perfect solution would be that my script runs everytime autocad launches so that any updates made to the cuix file automatically update in autocad without having to lunload and load. Thanks in advance for any help here and happy new year to all! Ben
  12. I'm printing CAD to PDF using LSP. Here is the code for a full file name path: (setq pdf_name (getfiled "Specify file name to plot *.pdf" (getvar "SAVENAME") "pdf" 5)) i.e. - i:\cadd\project\Plan.pdf What would be the code to capture the folder path only, in other words, how can I subtract a file name from this expression, and get only a folder name? i.e. - i:\cadd\project\ Thank you!
  13. Lee Mac

    Clock.lsp

    Let me state from the outset that I realise that there isn't too much practicality in this application, and hence I consider it more of a novelty app for your amusement and enjoyment. I have seen a few similar programs that will create a clock interface and proceed to animate the interface using a while loop or similar coupled with a small increment. These programs are cool in themselves, but take priority over all other user actions and also tend to lock up the average PC with all the entity regeneration. However, the engine that powers my application utilises a reactor to update it's display, and hence it may function in the background without hindering the actions of the user; moreover, it may be used as a functional timepiece whilst working. I have coded the program as a 'toggle', hence to initiate the clock, type 'clock' at the command-line, and similarly to disable the clock, type 'clock' again at the command-line. I hope you like it! Lee Clock.lsp DigitalClock.lsp
  14. When I came on to my current company a few months ago, CAD management was completely absent and when I informed my manager I thought we should have some type of CAD policy users can look to for guidance, he promptly made me the de facto CAD Manager As such, I'm trying to research the best way to manage the various projects we currently have in development. Specifically we have two specific contracts with completely different drawing requirements (i.e. different Layers, Title Blocks, etc.) and one of those contracts has different requirements depending on the type of drawing (electrical, piping, structure, etc). I have setup read-only drawing templates for each specific discipline of each project and currently the designer will just open the relevant drawing and save it with a new name. There are several drawbacks to this, the first being that for one project, the zone numbers on each sheet of the format are continuous (i.e. Sheet 01 has zones 1 thru 8, Sheet 2 has zones 9 thru 16, etc.). I've manually created 10 sheets thinking none of the drawings currently being worked would have more than that. Our electrical lead just informed me he has a wiring table drawing that he anticipates will have upwards of 50 sheets. I know there is a better way to create the necessary sheets and I do have some experience with lsp files but not enough to figure out what I should do. I have created a lsp routine and associated dcl that displays the various projects we are working on. The user selects the project and clicks the 'OK' button which in turn loads the lsp file linked to the selection. That lsp file starts a new drawing and loads the correct layers. I'd like to add a sheet function that either asks the user how many sheets they want to create or load just the first two sheets. If it only loads the first two sheets, I'd like to create an add/subtract sheet routine that when ran will detect how many sheets are currently in the drawing, then add or subtract sheets based on what is needed. I'd appreciate some opinions on how I could go about doing all or some of this. Thanks in advance. Lonnie
×
×
  • Create New...