Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Great !!! i am going to read Thanks bro ‼‼‼
  3. 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
  4. Today
  5. 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???
  6. 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???
  7. 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
  8. 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.
  9. 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) )
  10. 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
  11. Thank you so much you are still helping people in 2024.
  12. 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
  13. [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
  14. 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
  15. 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 ‼‼‼
  16. 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
  17. 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.
  18. Use (princ (strcat "\n" stringa)) will princ on a new line.
  19. BIGAL

    Entmake Fields

    Like tombu had signature block insert into all layouts etc .Paper copy was signed legal requirement.
  20. Hello again friends ‼‼ I attach an explanatory image. I would like to place a text (a green number 2 in the image) at a certain distance from the vertex of the Poly. If the Azimuth of both lines are known, through a Routine, how do I find out the Average Azimuth of those 2 Lines, to be able to position the green text 2 at a certain distance from the vertex Thanks in advance friends ‼‼‼‼
  21. Thank you fuccaro for comment, as you know some people just keep asking as they can not be bothered to learn and want it all for free, despite the 8 hours of coding required. Thats why in the doc file there are a couple of programs that I have spent hours on getting them to work compared to the like 2-3 seconds for a result. Duke has been in touch with me and happy to provide him with support at no cost as he embarks on the learning curve. Always good to see people wanting to learn. What is interesting is my clients have chased me and they are all over the world, only a couple local.
  22. I will reload it and see what I get with BCAD. Can you post a dwg with correct font and message etc.
  23. Hello friends !! I was wondering about XDATA, What is it for and how does it work within AUTO-LISP Because I don't know exactly if it works for what I'm thinking. Maybe you can create objects, for example: CIRCLES and internally assign each circle an internal data to each one, so that each and every one of the circles has a unique and unrepeatable and totally identifiable "NAME" Example: To join all the circles with a polyline, in a specific order, say from the circle called internally with a number 1 (ONE), to the circle number 5 (FIVE). Or XDATA is not used like that I put that as an example, but if it is used for other things, could you write me a small example code to understand how XDATA works, please Something very simple and small, you can And in advance, thank you very much ‼‼
  24. No dice for that program @mirkopontrelli. 404 File Not Found. https://pontrelli.wordpress.com/wp-content/uploads/2015/04/laydroid-v1-0-1.docx
  25. Yesterday
  26. You could work with a field See example below. And if the polylines simply had an elevation, we could do the same by replacing: ">%).Layer>%" by ">%).Elevation \\f \"%lu2%pr0\">%" (vl-load-com) (defun c:Label_Side_by_Layer ( / js htx AcDoc Space lg_repeat n obj ename pr pt deriv rtx nw_obj) (princ "\nSelect lightweight polylines: ") (setq js (ssget (list '(0 . "LWPOLYLINE") (cons 67 (if (eq (getvar "CVPORT") 1) 1 0)) (cons 410 (if (eq (getvar "CVPORT") 1) (getvar "CTAB") "Model")) ) ) ) (cond (js (initget 6) (setq htx (getdist (getvar "VIEWCTR") (strcat "\nSpecify the text height <" (rtos (getvar "TEXTSIZE")) ">: "))) (if htx (setvar "TEXTSIZE" htx)) (setq AcDoc (vla-get-ActiveDocument (vlax-get-acad-object)) Space (if (= 1 (getvar "CVPORT")) (vla-get-PaperSpace AcDoc) (vla-get-ModelSpace AcDoc) ) ) (cond ((null (tblsearch "LAYER" "Label Elevation")) (vlax-put (vla-add (vla-get-layers AcDoc) "Label Elevation") 'color 96) ) ) (initget 7) (setq lg_repeat (getdist (getvar "VIEWCTR") "\nLabel repeat length?: ")) (repeat (setq n (sslength js)) (setq obj (ssname js (setq n (1- n))) ename (vlax-ename->vla-object obj) pr (vlax-curve-getStartParam ename) ) (while (and (vlax-curve-getParamAtDist ename lg_repeat) (< (setq pr (+ (vlax-curve-getParamAtDist ename lg_repeat) pr)) (vlax-curve-getEndParam ename))) (setq pt (vlax-curve-GetpointAtParam ename pr) deriv (vlax-curve-getFirstDeriv ename pr) rtx (- (atan (cadr deriv) (car deriv)) (angle '(0 0 0) (getvar "UCSXDIR"))) ) (if (or (> rtx (* pi 0.5)) (< rtx (- (* pi 0.5)))) (setq rtx (+ rtx pi))) (setq nw_obj (vla-addMtext Space (vlax-3d-point pt) 0.0 (strcat "{\\fArial|b0|i0|c0|p34;" "%<\\AcObjProp Object(%<\\_ObjId " (itoa (vla-get-ObjectID (vlax-ename->vla-object obj))) ">%).Layer>%" ) ) ) (mapcar '(lambda (pr val) (vlax-put nw_obj pr val) ) (list 'AttachmentPoint 'Height 'DrawingDirection 'InsertionPoint 'StyleName 'Layer 'Rotation 'BackgroundFill) (list 5 (getvar "TEXTSIZE") 5 pt "Standard" "Label Elevation" rtx -1) ) ) ) ) ) (prin1) )
  27. Our engineering department uses Inventor, AutoCAD Mechanical and Vault Basic exclusively (all 2023). We have a new employee that is doing plant layout work in AutoCAD Architecture and we're trying to figure out how to set it up to work out of Vault. Specifically, we're trying to figure out how to get the .apj file checked into Vault so other users can access the drawings. Importantly, the drawings are heavy on xrefs so the file structure linkage must be maintained. Currently everything is setup on a server location that can be openly accessed, we just would prefer all engineering related files be located in Vault for document control reasons.
  28. It would be helpful if you could provide screenshots that are zoomed out a little more. I can't see how your UCS is oriented, but judging by your crosshairs, it looks like you're trying to draw on the Y,Z plane. You can only draw 2D polylines on the X,Y plane, so you will need to rotate your UCS so that the X,Y plane is oriented in the direction that you want to draw.
  1. Load more activity
×
×
  • Create New...