Jump to content

Search the Community

Showing results for tags 'vlisp'.



More search options

  • 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 20 results

  1. Hi all, I installed AutoCAD 2021 three days ago. I am very excited of new features,. When issuing vlide command to enter "Visual LISP Editor", I selected installing AutoCAD AutoLISP Extension. Of course this is a very good method of programming to study and use, but now I am not be able to open traditional "Visual LISP Editor", and I am so confuded searching a way to write my own simple AutoLISP macros. Is it possible to find a way to recover the old and lovely vlisp editor? Any help will be appreciated.
  2. Dear all, I'm looking for a simple lisp (probably vlisp) routine that can select all leaders of the same type (e.g dot). In other words, i only want to select the dot leaders of all my leaders in the drawing file. Should look something like this: (ssget "x" ("leader")) and ('leadertype 3) Thanks
  3. I was trying to change the shade plot of a view port by lisp but I didn't see any way to do that through the change properties or through the dxf codes. (progn (setq ss1 (ssget "x" '((0 . "VIEWPORT")))) (command "change" ss1 "" "p") )
  4. OK, so i have a "master" drawing with 78 separate layers that represent different options. on these layers i have objects with attributes that represent specific parts. i want to write an lisp that will extract 3 specific attributes from all of the blocks currently thawed and print them to a text file. i have tried using the data-extraction command but it seems to want to select all the block in the drawing unless i select them by hand (something i would like to avoid if possible). any ideas on how to approach this? thanks.
  5. cawokah17

    Need x and y values

    Is there a quick and practical way to get X & Y values on a polyline other than by way of "LIST". because I need the X & Y value just like the 2nd image. Thank you Master. img 1 : https://drive.google.com/open?id=0B1KbDu2x_byvU2F6NlpvNWJrU0k img 2 : https://drive.google.com/open?id=0B1KbDu2x_byvVE9qdmpBLWcxWHM
  6. I’m in the process of updating nearly 400 blocks. I have to change the layer and override the color of one attribute. My test on the first block failed. It's just been a while and I can't remember what I'm missing. My attempt for changing the first one: (progn (setq e (car (entsel )) d (entget e) n_e (entnext e) n_d (entget n_e))) un_d (subst (cons 8 "SYM") (assoc 8 n_d) n_d) un_d (append un_d (list un_d (cons 62 141))) ) (entmod un_d) (entupd (cdr (assoc 330 un_d))) ) I've also tried: (command "_.attsync" "_select" n_e "" )"_Yes") note: as I step through the block entities I will be testing to insure I've got the right block with: (and (= (cdr (assoc 0 n_d)) "ATTRIB") (= (cdr (assoc 2 n_d)) "SIZE") (/= (cdr (assoc 8 n_d)) "SYM") )
  7. When i run a lisp om my computer it gives me an error. the first problem was a missing font ic-romand (i renamed another font to continue). I included the files as attatchment. The path to files should be:C:\Program Files (x86)\ProgeCAD\progeCAD 2014 Professional ENG\Program. With appload i load the file \misc\DK_Load. When i run dk (found in dk_main.lisp) it trows me an error : argument type: stringp nil. It should open a dialog box to enter data Can anyone please help me i have to get this running before monday. Some help would be really apreciated!!!!! PROBLEM SOLVED
  8. I have a series of blocks that I am replacing via lisp routine. But the new blocks are wider than the old ones. So I wrote the routine below to trim the lines that extend into a block. It works intermittently when the block is horizontal. I haven’t added the code to trim the lines if it’s vertical yet because I can’t figure out why the code doesn’t consistently work. The code is below and the attached drawing files has the blocks I’m using as an example. (defun trimblocklines ( ent / e d ins ero bw bh pt1 pt2 ss1 cnt sslen ) (setvar "cmdecho" 0) (setq e ent d (entget e) ins (cdr (assoc 10 d)) ero (* (dxf 50 d) (/ 180 pi)) bw 0.25 bh 0.125 pt1 (list (- (nth 0 ins) (/ bw 2)) (- (nth 1 ins) (/ bh 2)) (nth 2 ins)) pt2 (list (+ (nth 0 ins) (/ bw 2)) (+ (nth 1 ins) (/ bh 2)) (nth 2 ins)) ss1 (ssget "_C" pt1 pt2 '((0 . "line"))) cnt 0 sslen (sslength ss1) ln_ents (list ) ) (command "circle" ins (list (+ (nth 0 ins) (/ bw 2)) (nth 1 ins))) (setq cent (entlast)) (while (< cnt sslen) (setq ln_ents (append ln_ents (list (ssname ss1 cnt))) cnt (1+ cnt) ) ) (command "trim" cent ss1 "" (list (- (nth 0 ins) (- (/ bw 2) 0.01)) (nth 1 ins) 0.0) "") (command "trim" cent ss1 "" (list (+ (nth 0 ins) (- (/ bw 2) 0.01)) (nth 1 ins) 0.0) "") (entdel cent) (setvar "cmdecho" 0) (princ) ) trimlines.dwg Thank you
  9. In Feb fixo helped me to write aSQLCon function. I used the function tooquery SQL databases. I have tried towrite one enabling me to query an access database in the same way. But I am at a total loss. (defun SQLControl ( query_statement / adocmd ADOConn adorst data field fields n sqlQuery tmp data1 data2) ;; Fixo ;; http://www.cadtutor.net/forum/showthread.php?84548-LISP-to-query-MS-SQL-Server-Database-return-results-as-list-of-strings (defun tostring (received / temp ) ; Function Syntax: (tostring received) ; received: Variable to be converted to a string (cond ((= (type received) 'STR) received) ((= (type received) 'INT) (itoa received)) ((= (type received) 'REAL) (rtos received)) ((= (type received) 'LIST) (progn (setq temp "") (foreach listitem received (setq temp (strcat temp " " (datatostring listitem) ) ) ) (setq temp (substr temp 2)) (setq received temp) ) ) ) ) (setq SqlCon "Provider=sqloledb;Data Source=SQL\\DESIGNSQL;Initial Catalog=engineering;user id=DraftingDesign;Password=12345" ADOConn(vlax-create-object "ADODB.Connection") ADORst (vlax-create-object "ADODB.Recordset") data1 (list ) data2 (list ) ) (vlax-invoke-method ADOConn 'Open SqlCon nil "" -1) (setq sqlQuery query_statement ADOcmd (vlax-create-object "ADODB.command") ) (vlax-put-property ADOcmd "ActiveConnection" ADOConn) ; optional ; (vlax-put-property cmd2 "CommandTimeout" 30) (vlax-put-property ADOcmd "CommandText" sqlQuery) (vlax-put-property ADOcmd "CommandType" 1) (setq ADORst(vl-catch-all-apply 'vlax-invoke-method (list ADOcmd 'Execute nil 2 1)));OK (setq fields (vlax-get-property ADORst 'Fields)) (vl-catch-all-apply 'vlax-invoke-method (list ADORst 'movefirst)) (while (not (equal :vlax-true (vlax-get-property ADORst 'eof))) (setq tmp nil n 0) (while (not (vl-catch-all-error-p (vl-catch-all-apply 'vlax-get-property (list fields 'item n)))) (setq field (vlax-variant-value (vlax-get-property (vlax-get-property fields 'item n) 'value))) (setq tmp (cons field tmp)) (setq n (1+ n)) ) (setq data (append data (list (reverse tmp)))) (vl-catch-all-apply 'vlax-invoke-method (list ADORst 'movenext))) ; use garbage cleaner before of the closing connection: (gc) (vlax-invoke-method ADOConn 'Close) (vlax-release-object ADORst) (vlax-release-object ADOcmd) (vlax-release-object ADOConn) ; (alert (vl-princ-to-string data)); must use (vl-string-trim " " strvalue) for string values within the data list (foreach line data (foreach item line (setq data1 (append data1 (list (cond ((= item nil)"") ((= (type item) 'SYM)(substr (vl-symbol-name item) 7)) ((/=(type item) 'STR)(tostring item)) (T item) ) ) ) ) ) (setq data2 (append data2 (list data1)) data1 (list ) ) ) data2 )
  10. Hi all, I don't know if this is the appropriate forum, but I was running the VLIDE ide yesterday (ironically whilst on this board looking at some lisp programs), and had to leave my computer for a few hours. When I came back my VLIDE interface won't come up. You can see it on the task bar, but I can't enter anything, and when you use "alt" + "tab" to cycle through the programs, it can't come up. I wonder if there is a setting I may have hit accidentally? Anyways, thanks
  11. (vl-directory-files "C:\\Users\\wpe\\Documents" "*.dwg") Returns a list of DWGs in a folder, but is there to have it return a list of DWGs in the folder and sub-folders?
  12. LISP to query MS SQL Server Database return results as list of strings. (defun getMySqlData ( Name / ) (setq pm Name SQLCon "Server=OurServer;Database=engineering;Trusted_Connection=True" SQLStatement1 "USE enginering SELECT ID FROM Projects WHERE ProjectName = pm" SQLStatement2 "USE enginering SELECT * FROM LineList WHERE ProjectID = ResultsID" ) ; I'm trying to use SQLStatement1 to get the project ID. ; So that I can use it to run this SQLStatement2 ; Then return the results of the above as a list of strings. )
  13. This code: (command "new" "S:\\CADCore\\Titleblocks\\Facilities A Model.dwt") Gives me this error: Unknown command "DWT". Press F1 for help. Please help
  14. I wrote a sub-routine to update drawing borders. There is a command in CADWorx called IGO which creates isometric drawings. I wanted have this command call my function which updates the borders. But my code doesn't work. (defun c:igo ( / ) (setvar "cmdecho" 0) (command "igo") (setvar "cmdecho" 1) (runisoborderupdate) (princ) )
  15. I found this code that compiles the files directly, without those annoying errors from VLISP. (defun c:FAS (/ name lispname outfilename findfas rewritefas) (setvar "cmdecho" 0) (setq name (strcase (getstring "Enter Lisp Name: "))) (setq lispname (strcat "C:\\LISP_Directory\\" name ".LSP" ) ;_end strcat ) ;_end setq (setq outfilename (strcat "C:\\FAS_Directory\\" name ".FAS" ) ;_end strcat ) ;_end setq (setq findfas (findfile outfilename)) (if (not findfas) (vlisp-compile 'st lispname outfilename) (progn (initget "Y N") (setq rewritefas (getkword "Save Over Existing FAS? [Yes or No]: ") ) ;_end setq (if (= rewritefas "Y") (vlisp-compile 'st lispname outfilename) (alert "FAS Compiling Aborted") ) ;_end if ) ;_end progn ) ;_end if (setvar "cmdecho" 1) (princ) ) ;_end defun Best regards.
  16. Greetings my friends. I want to test the compiling in vlisp. I have a lisp file that works, but during the compilation appears the message: "; error: An error has occurred inside the *error* functionAutoCAD variable setting rejected: "cmdecho" nil". Whats the cause of this? Thanks for your help.
  17. I need to create a "pline arc"(Arc option in PLine) and connect a set of blocks. So i m developing a lisp to do it. 1. I get the objects from user using "ssget" 2. I am using COMMAND command to draw PLine arc option to draw pline between the blocks's POSITION property 3. but the COMMAND command has to be closed using [ '') ] 4. But i need to give the next argument iteratively using for loop 5. How to iteratively give the next arguments in COMMAND command THANKS in ADVANCE
  18. Hi everybody, should anyone help me converting this vb code to vlisp? Public Declare Function LoadKeyboardLayout Lib "user32" Alias "LoadKeyboardLayoutA" (ByVal pwszKLID As String, ByVal Flags As Long) As Long LoadKeyboardLayout "00000409", 1 End Function any help is greatly appreciated
  19. Ok before I start I want to give you a bit of insight. I am currently working for a company that I would like to make Vlisps for to make my job quicker and easier. With that being said I would like to protect my vlisp and also make it so if they somehow managed to snatch a copy of my vlisp I could turn off the further use of it (Remote Turnoff). I have read some pretty dated forum post on .FAS .VLX and .NET compiled vlisps and their security(One of the newest being in 2009). And, would love to hear what you guys think about it or if you can provide other more secure compilers. As for the Remote Turnoff I was going to use a Serial Number with a date and loginname verification, but shortly thereafter I found out you could roll back the date, and didn’t think about it at the time but you could easily change the loginname. Then I got thinking what if I could verify the user was connected to the internet then load an internet source and read its code. I looked into this and tried some codes but couldn’t manage to get them to work the way I wanted. Any help you guys could provide would be a great help. Thank you in advance, CadWarrior
  20. Hello everyone: I'm updating some old code of mine and I want to get ride of using the shell command, you know why. I need to create a folder, this is what's written now to create the folder num_br: (setq commd (strcat "md " "
×
×
  • Create New...