Jump to content

Search the Community

Showing results for tags 'visual lisp'.

  • 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...

Found 21 results

  1. Hi guys I'm not sure that this is possible but hey you guys know a hell of a lot and surprise me often. Is it possible in lisp to look inside a text file and remove some text from between 2 keywords? For example The text filename would be the same as the cad file, but it's on another network location. I can create a variable that concatenates the file name and location. This I know I can do lol. Then I want the lisp to open the file find Keyword1 and keyword2 (always the same and only ever 1 of each in the file, also there would always be text before and after the keywords which should be kept intact). Then remove any text that lies between them. And finally resave the file. I've done some searches but I keep getting results for editing text inside of cad, which isn't what I'm after, or recommending using other programming language, but I've no idea how to do that. Which is why I'm pinning my hopes on this.
  2. Hii all...I found a multiline polyline lisp from online, its gonna ask how many line and their offset distance...but its assigning layer automatically, can anyone do the changes so it will ask which layer I want to choose for my each line and it should automatically take the linetype as by layer...if I am choosing even no. of line, then the path I am drawing its automatically think that as center line and offset the distance, can anyone makes changes so it will make one line in my drawn path and ask me in which side I want to allocate how many line... multi line.lsp
  3. hello i want help for creating lisp for me please ... the lisp will do these functions 1- as the attached image (1a) if i have block with yellow at right and some green blocks 2- i want when i launch the lisp to ask me to draw poly line that i want as in image 2a 3- after that when i draw this path with polyline and press enter the lisp ask me to choose blocks that i want to connect to this polyline and i will choose one by one or multiple blocks then after choosing the blocks and press enter ... the lisp will offset the main polyline that i draw and connect every polyline with the basepoint of the blocks that i choose sequentially as appear in this image 5a (attached DWG) can anyone help me please sample.dwg
  4. Hi everybody, I need help. I cant figure out how to get the ent name form a block in a layout. Each layout has a titleblock ("SAL-TEKENBLAD_TITELBLOK" is the EffectiveName) and i want to make a list of all the layouts with the ent names. THX, GW61 (vlax-for LYT (vla-get-layouts (vla-get-activedocument (vlax-get-acad-object))) (setq ENT (vlax-vla-object->ename (vla-item (vla-get-blocks LYT) "SAL-TEKENBLAD_TITELBLOK"))) (setq NAM (vla-get-name lyt)) (setq LST (cons (list NAM ENT) LST)) );end vlax-for
  5. Hello! I have been getting suggestions and help from this forum for some time now, but have reached a point where I am currently at a loss. I am still relatively new to the topic of lisp and co, but I am trying to improve constantly. For my current problem, I am trying to select a block and insert a point into it. I have simplified my current lisp file into the function below so as not to go over the top. My problem is that I get back an empty selection set and thus can't execute the function from Lee Mac correctly. (defun TestFunction ( / ) (while (= ss NIL) (if (setq ss (ssget "_+.:S:E:L" '((0 . "INSERT")))) (progn (setq ent (ssname ss 0)) (setq Block (vla-item (vla-get-blocks (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))) (cdr (assoc 2 (entget (ssname ss 0)))))) (Insert_Point) ) ) ) ) (defun Insert_Point ( / ) ;; Block Einfügepunkt ermitteln (setq Message (strcat "\nEinfügepunkt wählen:")) (setq Pnt (getpoint Message)) (setq sel (ssadd)) (setq Point (vla-addpoint Block (vlax-3d-point Pnt))) (ssAdd (vlax-vla-object->ename Point) sel) ;; sel stays empty so the following line cant be executed properly (UpdateBlock doc ent sel) ) Many thanks for your help! Best regards Florian
  6. Hi all, I want to select specific block by knowing its name lets say block name "cadtutor block 1" by using (vl-catch-all-apply) method Thanks
  7. Good Day, I want the attached code to run as QDIM in Autocad , My issue in my code that I choose the location of the dimension line after that the dimension appears. I want to see all the dimensions afterwards choose the location like in QDIM command. Thanks (vl-load-com) (defun C:FH ( / *error* doc oVAR ss i pts ptsx ptsy d d0 filter ) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break")) (princ (strcat "\nError: " errmsg))) (foreach e oVAR (setvar (car e) (cdr e))) (vla-endundomark doc) (princ)) ;------------------------------------------------------------------------------------------------------ (vla-startundomark (setq doc (vla-get-activedocument (vlax-get-acad-object)))) (foreach e '(CMDECHO ORTHOMODE) (setq oVAR (cons (cons e (getvar e)) oVAR))) (setvar 'CMDECHO 0) (setvar 'ORTHOMODE 0) (if (and (princ "\nNeed blocks, ") (setq ss (ssget (list '(0 . "INSERT")))) (< 1 (setq i (sslength ss))) (while (not (minusp (setq i (1- i)))) (setq pts (cons (cdr (assoc 10 (entget (ssname ss i)))) pts))) (setq ptsx (vl-sort pts '(lambda (p q) (< (car p) (car q))))) (setq ptsy (vl-sort pts '(lambda (p q) (< (cadr p) (cadr q))))) (setq d (abs (/ (- (car (last ptsx)) (caar ptsx)) ;xmax-xmin (if (zerop (setq d0 (- (cadr (last ptsy)) (cadar ptsy)))) ;ymax-ymin 0.001 d0)))) (setq pt (getpoint "\nSpecify dimension line location: ")) (or *DimTypeBDA (setq *DimTypeBDA "Aligned")) (not (initget "Horizontal Vertical Aligned")) (setq *DimTypeBDA (cond ((getkword (strcat "\nType of dimension [" (cond ((> d 1000.) (if (= *DimTypeBDA "Vertical") (setq *DimTypeBDA "Horizontal")) "Horizontal") ((< d 0.001) (if (= *DimTypeBDA "Horizontal") (setq *DimTypeBDA "Vertical")) "Vertical") ("Horizontal/Vertical")) "/Aligned] <" *DimTypeBDA ">: "))) (*DimTypeBDA))) (setq pts (if (or (= *DimTypeBDA "Horizontal") (and (= *DimTypeBDA "Aligned") (> (- (car (last ptsx)) (caar ptsx)) (- (cadr (last ptsy)) (cadar ptsy))))) ptsx ptsy)) (setq i 0) ) (repeat (1- (length pts)) (cond ((= *DimTypeBDA "Horizontal") (command "_.DIMLINEAR" "_none" (nth i pts) "_none" (nth (1+ i) pts) "_H" "_none" pt)) ((= *DimTypeBDA "Vertical") (command "_.DIMLINEAR" "_none" (nth i pts) "_none" (nth (1+ i) pts) "_V" "_none" pt)) (T ;Aligned (command "_.DIMALIGNED" "_none" (nth i pts) "_none" (nth (1+ i) pts) "_none" pt))) (setq i (1+ i))) (princ (strcat "\nError: Wrong selection of at least 2 BLOCKS."))) (foreach e oVAR (setvar (car e) (cdr e))) (vla-endundomark doc) (princ) ) FH Final.LSP
  8. I can convert my raw AutoLISP (.lsp) codes into Visual Lisp (.VLX) and .FAS application using AutoCAD VLISP IDE. I was looking into Autodesk App Store and downloaded some of the free applications. It was .msi. That means it will install directly on Windows and link-up with installed AutoCAD. I am very new in the App Store. Could you please help me to understand to convert my .lsp or .vlx or .fas into .msi? Thanks.
  9. Dear all, I have lisp dcl and data files working together to draw steel sections. I have done all the sections modified to indian standards originally it was written for british standards and it is free of copy rights. Since the author has changed to catia 3 dacades before. Please find attached images of error, dialog box and lisp files,data files and dcl files. This may looks like a big job. If any lisp expert available he can do it seconds. As I have done whole lot of things with minimum lisp knowledge. Thanks Krish stl_ipn.dat stl_rsj.dat stl_deflt.dat STL.LSP stl_rtee.dat stl_ub.dat stl_rhs.dat stl_shs.dat stl_uc.dat stl_ursa.dat stl_ersa.dat stl_chs.dat stl_rsc.dat stl_pfc.dat stl_ipe.dat rec.dwg stl_passwd.dat stl_pipe.dat stl_steeub.dat stl_steeuc.dat stl_u.dat stl_ubp.dat stl_upn.dat stl_wash.dat README.TXT stl.dcl stl.slb stl_cap.dat stl_csk.dat stl_cub.dat stl_cuc.dat stl_hd.dat stl_he.dat stl_hex.dat stl_hl.dat stl_hp.dat stl_hx.dat
  10. How does everybody store their functions they use over and over? I'd like to start building a library of typical functions but am not sure how to build the document to store them for easy retrieval as needed. J. Logan
  11. Hello, guys! I have a little question... Is there some way to open / edit a drawing with autolisp without display that drawing? For example... When we are working with VBA, we can use the code ActiveWindow.Visible = False to not show the active window. Can we do something like it in autolisp?
  12. Hi all, today, when I tried to compile my visual lisp project into a single VLX file, visual lisp opened an alert box (with 'STOP' in the title of it) showing me: Making Error occured Assertion failed: Invalid PDB position then in the visual lisp console printed the follwing: . . . ... l÷óæÝzî{è÷Ý y™zñæÝkñ}ðõÛnsêgê’ªàxñá¢ysâmûà·sæ`ê÷Çk™gûæÝvípñå´~÷q“Œ£|ƒBÒÓÊ3J×éÛ‰'PÔgÊÓ“&î`„á¢ô}ðö¨l÷uê÷Ê}{ìw„û©vçqžÿ³ylæ`„å®{ìcíæ¦zŽ úý¤yvà{ðû½î`„åµ kæîà¨zñ`÷÷´cr÷ù÷³yoñ{î÷µvæg„ü¦zƒsíÿ£yxæ`„âµoæfêëÝ~ïaûŽÊvð`“Œ« l÷óæÝmê`ûˆ« qæ€ñ´yêxû’ªôf÷æ¢yoñ{î÷µvæg„þ¦zñgžÿ³yhñ}ê÷Ýmìdûà³ zðê÷¿l÷mò÷´cr÷éà®z™dìý·m÷}ûáÝvíqêë·lƒyꈰv÷q„âµoæfêû¢áxññ¬î`„õ¢ô}ðˆ·pçaýæ©ræóæÝz÷ì÷ {çfûá´ysìwÿþª|ë}ð÷Ývízꈤmñqðæ±mð}ñüÎxè«”7½; ; error: Assertion failed: Invalid PDB position ; Make aborted and aborted compilng... Any one knows what is the matter?
  13. CADTutorians, Does anyone know whether it is possible to open a password protected drawing via Visual LISP, and for positive answer how?
  14. A company in Iran employs people with Visual Lisp (Auto Lisp) programming knowledge and abilities. The advantages of this job depends on employee qualifications. Qualified persons please reply to this thread to receive more information. Thanks. Mohammad
  15. Hey All, Okay so I have s dynamic block (green in my example) that is built in the x-y plane. I can change its length, width, extend it and rotate it about the base point. Yada yada yada. Bunch of feature that the company I work for needs. When we insert it into a 3D model we position it such that the Y axis becomes the Z axis and the the X axis can be anywhere within the the X-Y plane. I am trying to create a lisp that will move it relative to a second block (red in my example). Does any know a way to get the rotational information for the dynamic blocks. I can't use the "Rotation" from the misc section since it operate in the blocks x-y plane instead of the models x-y plane. I created an image below with Axis. To hopefully clarify. These aren't the actual blocks just example shapes. Hopefully someone can help. I have tried a few things without success.
  16. I am trying to update menses, tools, and LISP routines from autoCAD 2000 to 2011. I was able to load and update most of them except 4 LISP routines. When I open the routine in VisualLISP all I get is a bunch of characters. It does not matter if I use autoCAD 2000 or 2011 to open the routines, it would not show its content. Does anyone know what might be the issue? How to fix it? Thanks
  17. My Visual LISP's 2 last menu lables changed to "st error" and "request error" while I was researching on (getpropertyvalue) function.
  18. Hello friends, how is it possible to get all blocks in a drawing and use them entirely in current session, without opening it. I mean something like ADCenter via VisualLISP.
  19. Trying to run any visual lisp code in AutoCAD 2007, but end up in getting an error. ; error: ActiveX Server returned an error: Error loading type library/DLL Is it a virus which is causing problem ? Becuase on other PC with same AutoCAD 2007 I don't get above error.
  20. Hi everyone, how is it possible to find out any drawing is read only due to being opened by other one, without opening it?
  21. Hi All, is it a way to use vba code directly from within Visual LISP? Assume that we use this visual lisp code: (vla-addcustominfo (vla-get-summaryinfo (vla-get-activedocument (Vlax-get-acad-object)) ) "Key" "Value" ) Is it possible to use: ActiveDocument.SummaryInfo.AddCustomInfo "Key" "Value" inside visual lisp program?
×
×
  • Create New...