Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. hi bro, i am trying and not always the object move inside the pline how can i get it pls ? thanks !
  3. ty BIGAL beauty example for creating a pline ‼‼‼‼‼
  4. That lisp has my name in it, written for a particular situation, I would do slightly different now just get all blocks, make table and ask do you want Excel as well. Table needs cleaning up. Make header row bigger, change columns sizes to reflect values use 2 line text. eg No Of Bars Not sure why there all background mtext box, hard to read. Not sure why I used hit test when insertrows works better. Question where is "No of Bars" coming from ?
  5. Today
  6. BIGAL

    edit lisp by itself

    Been adding a security check to code for years since "Protect" existed like 30 years ago, like others can use "_PKSER" returns Cad serial number, also yes I know it does work stopped an install by some one not wanting to pay. For us oldies using a DOS command ie CMD in windows you can copy a security lisp to every lisp program that you want then run another lisp that makes all of them into FAS, just done for like 30 lisps for a client. Protecting his investment not mine. The DOS command is as next you need a bat file to do it for all the files COPY D:\mylisps\securty.lsp+D:\mylisps\mylisp1.lsp D:\newfolder\mylisp1.lsp repeat for all lisps Compile 2 examples (defun comp ( ) (if (null vlisp-compile) (c:vlide T)) (setq fname (getfiled "Pick lisp to be compiled" "D:\\alan\\lisp" "lsp" 8)) (setq len (strlen fname)) (setq diff (- len (+ 15 3))) (setq fnameout (substr fname 15 diff)) (vlisp-compile 'st fname (strcat "d:\\alan\\compiled\\" fnameout ".fas")) ) (comp) ; part 2 ; must have vlide open to work (vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "Vlide ") (setq loads (list ; make a list of all lsp files. "mylisp1" "mylisp2" )) (setq loc1 "C:\\CAD-TOOLS") ;;change dirs to where ever you want them found (setq loc2 "C:\\CAD-TOOLS\\") ;;change dirs to where ever you want them saved (foreach lisp loads (vlisp-compile 'st (strcat loc1 lisp ".lsp") (strcat loc2 lisp ".fas")) ) For BRICSCAD users just change to BLADE and DES. So as mentioned some security checks Hard disk id Cad serial number Set & Getenv registry check Network card IP address Ping remote server and check in a file User name
  7. "Joining circles via creation order", using ssget can most times do this, try it, but as was posted somewhere else doing a sort on the "Handle ID" of the objects is creation order. I seem to remember must change to a number not hex. Quick and dirty (defun wow ( / ss x) (setq ss (ssget '((0 . "CIRCLE")))) (command "pline") (repeat (setq x (sslength ss)) (command (cdr (assoc 10 (entget (ssname ss (setq x (1- x))))))) ) (command "") ) (wow)
  8. For poly lines you can get angle at a point on a pline. Note Vl object. (defun alg-ang (obj pnt) (angle '(0. 0. 0.) (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj pnt ) ) ) )
  9. Yesterday
  10. in express tools attout will have all the attributes into a text file that then can be opened with excel
  11. Would it be possible to modify this lisp to specify interval and gaps if required? For example desired intervals are at 1m and gaps are 0.5m. Gaps to be removed if required and only 3d polyline segments left. Thank you Example drawing attached test.dwg
  12. Steven P

    edit lisp by itself

    I would struggle with de-compiling the code you send out, without sending out any password protection details, I might be wrong, there are others out there who are better at that than me. The way I'd see this having to work is: They receive the code and run it. The code checks if there is a LISP, lets call it check-pass, if there is no LISP called this then create at and ask for the serial numbers Decompile the compiled code Edit the LISP text file and append to the end of it a new function "check-pass" Compile the file again. Problems might be where the user saves the files, you have no control over that - for example, mine are in files on the one-drive, away from trusted locations (I can log onto any company computer and get my LISPs that way), and also decompile a compiled file without any password being available to view. Might be easier to generate a new text file after a successful check of serial numbers , saved in the AutoCAD directory, or trusted locations so that you know the file paths to save to and edit. You can then compile that a lot easier, and the source code for your main LISP is still protected. Tricky but I don't think LISP was designed with any password protection thoughts
  13. Great !!! i am going to read Thanks bro ‼‼‼
  14. Hello, thanks for the new recommendation, it really looks interesting and it seems that it can do what I want. The only thing left for me is to figure out how to translate that command into Lisp code
  15. mohammadreza

    edit lisp by itself

    actually my way is give some one a lisp code that can show HD Serial number and then he give me back that serial , so i change my code according to the his computer HD Serial and give him main lisp as (fas type). in this way i protect my lisp and its a unique. but i looking for a briefly way ! that customer be independent!. could i explain clearly???
  16. mohammadreza

    edit lisp by itself

    actually my way is give some one a lisp code that can show HD Serial number and then he give me back that serial , so i change my code according to the his computer HD Serial and give him main lisp as (fas type). in this way i protect my lisp and its a unique. but i looking for a briefly way ! that customer be independent!. could i explain clearly???
  17. Just pointing out how complex the code could be when you could simply use snap from the vertex to midpoint between those two endpoints for the direction. AutoCAD - Snap From - https://www.google.com/search?q=autocad+snap+from&rlz=1C1RXQR_enUS986US986&oq=autocad+snap+from&gs_lcrp=EgZjaHJvbWUqBwgAEAAYgAQyBwgAEAAYgAQyCAgBEAAYFhgeMggIAhAAGBYYHjIICAMQABgWGB4yCAgEEAAYFhgeMggIBRAAGBYYHjIICAYQABgWGB4yCAgHEAAYFhgeMggICBAAGBYYHjIICAkQABgWGB7SAQkxMjUxMWowajeoAgCwAgA&sourceid=chrome&ie=UTF-8#fpstate=ive&vld=cid:15476a18,vid:gbWQ8Gh0r9Q,st:0
  18. Steven P

    edit lisp by itself

    Yes, you could do that, append a small LISP to the end of the file to return "Pass OK" or something like that, however if the user then sends the LISP file to someone else then it has all ready got that "Pass OK" routine in it. A different method would be to write to the computers registry the password has been recorded in the registry and not the LISP file - which is a slightly better way to do things. You'll need to compile your code above, gaz, otherwise it is very simple to read the password or even modify the code to take out the password requirement all together. Not sure if that will work with Mac computers though. What are you trying to password protect and who are you protecting it from? that might define what method you use to protect the routine. There are a lot of posts about on the various merits of different protection methods. For my routines, it is another thing to consider and usually not worth it - the routines are for myself of within the company - developed on company time and so open to all other empoyees.
  19. mohammadreza

    edit lisp by itself

    ? i mean for example i have a code like below, i want this program ask user pass code until he enter correct number but after enter the true , dont ask again next times (for next run)! (defun c:gaz () (setq pass (getint "enter password")) (if (= pass 140) (princ "all ok") (progn (alert "Incorrect serial number please contact \" ****** \" for correct number" ) (EXIT) ) ) (princ) )
  20. Dear All, I need to take mto from attributes and parameters in dynamic block attached very fast to save my job. I have tried some lisp (atts2table.lsp attached) to extract the attribute values and paste it table and then it will calculate weight using formula. Still I know some one here will be able to do it very quickly using vba or lisp. Thanks Krish FOOTING-BACKUP.dwg atts2table.lsp
  21. Thank you so much you are still helping people in 2024.
  22. XData is essentially an additional bit of information added to the entity definition, it doesn't change how the entity is shown on the screen. What you want to do can be done, and this link is a good description https://www.afralisp.net/autolisp/tutorials/extended-entity-data-part-1.php
  23. [XDrX-PlugIn(163)] Dynamically display the area ect.. information of rectange (theswamp.org) https://www.theswamp.org/index.php?topic=59531.0 (defun c:xdtb_dynrecarea (/ #mcolor cen data dynpt height lastpnt mArea nums p-1 p2 p-2 pn1 pt1 pt2 pts str txt wid ) (defun _callback (dynpt) (if (not (and (equal pn1 dynpt 1e-3) (equal lastpnt dynpt 1e-3) ) ) (progn (setq lastpnt dynpt pt2 (xdrx-getpropertyvalue (list pn1 p-2) "getclosestpointto" dynpt t ) ) (setq pt1 (xdrx-getpropertyvalue (list pn1 p-1) "getclosestpointto" dynpt t ) wid (distance pt2 dynpt) height (distance pt1 dynpt) pts (list pt2 dynpt pt1 pn1) cen (xdrx-line-midp dynpt pn1) mArea (* wid height) nums (length data) str (xdrx-string-formatex (xdrx-string-multilanguage "宽度= %.1f\r\n高度= %.1f\r\n面积=%.1f" "Width= %.1f\r\nHeight= %.1f\r\nArea=%.1f") wid height mArea ) ) (xd::grdraw:drawtext txt str cen 5 (* (getvar "viewsize") 0.025) 2 (getvar "ucsxdir") nil 8 ) ) ) str ) (xdrx-begin) (xdrx-sysvar-push '("osmode" 8)) (if (setq pn1 (getpoint (xdrx-string-multilanguage "\n矩形起始点<退出>:" "\nRect Start Point<Exit>:"))) (progn (setq #mcolor 1) (setq p-1 (mapcar '+ pn1 '(1 0 0) ) p-2 (mapcar '- pn1 '(0 1 0) ) txt (xdrx-mtext-make) ) (XD::Drag:CallBackSetMouseMove "_callback") (if (setq p2 (xd::doc:getcorner pn1 (xdrx-string-multilanguage "\n对角点<退出>:" "\ndiagonal point<Exit>:") #mcolor '(1 0 0) ) ) (progn (xdrx-polyline-make pts t) (xdrx-setpropertyvalue (entlast) "color" #mcolor) (xdrx-prompt (strcat "\n" str)) ) ) (xdrx-pointmonitor) ) ) (xdrx-end) (princ) ) ===================================== The above code uses XDrx API, download link: https://github.com/xdcad/XDrx-API-zip https://sourceforge.net/projects/xdrx-api-zip/ Dual version link: https://github.com/xdcad
  24. The AutoCAD Blog

    Celebrating the Drafters

    See how Autodesk software like AutoCAD empowers innovators to design and make a limitless galaxy, here and far, far away. In celebration of the new Star Wars original series on Disney+, The Acolyte, we are taking a moment today to recognize drafters and everyone who uses AutoCAD to help design and make the world we live in. Every day, people around the world use AutoCAD to bring their ideas to life. Whether its architects who are the hidden heroes of our urban landscapes that shape the spaces where we live, engineers who solve complex problems and design solutions that improve our quality of life, or educators and their students who explore and innovate: AutoCAD is more than just a piece of software. Today, we’d like to give you an opportunity to create your own innovative design – take a look at these drawings below for some inspiration. Download the DWG file for this project here to make your very own observatory tower in AutoCAD, to help you keep your eyes on the galaxy. Have fun! And don’t forget to check out the official trailer for The Acolyte, premiering on June 4th exclusively on Disney+. Please note that this is intended for entertainment only. These drawings and demonstrations are solely being used for parody. Observatory project DWGDownload DWG The post Celebrating the Drafters appeared first on AutoCAD Blog. View the full article
  25. Hello tombu, thanks for responding ‼‼ Do you think you can help me with a simpler code that can only get the average Azimuth That Routine that you told me does not give the average Azimuth in text, what it does is create lines and it is a level of programming that I still do not know how to understand, or make modifications to it myself, or even understand it, ha ha ha Real apologies friend. And thanks in advance ‼‼‼
  26. Easiest to code would include picking the vertex and the two endpoints. For bisecting using lines and polylines see: http://www.cadtutor.net/forum/showthread.php?100709-Draw-bisector-line&p=684958&viewfull=1#post684958
  27. BIGAL

    Automatic layout setup

    I have 2 version walk along a line or pline repeat as required, then make layouts to suit, the rectangs made are based on a title block and a plot scale. 2nd version makes a rectang and you copy it, rotate or move to suit, again it makes the layouts matching a title block and scale. Draw rectangs.mp4 A very small cost includes customising to suit your title blocks.
  28. Use (princ (strcat "\n" stringa)) will princ on a new line.
  1. Load more activity
×
×
  • Create New...