Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/07/2022 in all areas

  1. As I had replied in your original post, and as the link you gave above clearly states, this is a part of the various sanctions against Russia being applied because of actions in Ukraine. You will find that more than just Autodesk products will stop working for those who live in Russia. Again I'm sorry that you find yourself affected by these sanctions, we know that you have no influence over what is happening in Ukraine.
    3 points
  2. Because what you posted had no basis in reality for starters and might well be deemed slanderous. Plus, it was and still is full of lies. Stop listening to state-run (i.e. - the Putin line) TV. While AutoDesk's heart and thoughts are with the people of Ukraine yours seems to be solely with a government intent on invading/destroying a country (and murdering its citizens) purely based one man's megalomania.
    3 points
  3. This site is not associated with Autodesk, take your grievances to the Autodesk site. It has no place here. Your post was removed because YOU, started into a political diatribe. Also, there is not in any way shape or form going to be "AutoCAD will be disabled worldwide" as you claim.
    2 points
  4. Why not go the next step for me layouts with all different size sheets and orientation one click on a menu and all the pdf's come out correct in one go no user interaction. Done for a client.
    2 points
  5. Of course have. But if the author says that pressing two buttons is a lot of work, then I think that this will not help him.
    2 points
  6. Thanks for support and help me. You are very kind. I will try this lisp codes.
    2 points
  7. Not sure where you are getting that but ... here's an untested start for your model space printing. You will need to fill in the correct print parameters for your setup. (defun c:foo (/ s p1 p2) (if (setq s (ssget '((0 . "INSERT") (2 . "A2_")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (vla-getboundingbox (vlax-ename->vla-object e) 'p1 'p2) (mapcar 'set '(p1 p2) (mapcar 'vlax-safearray->list (list p1 p2))) (command "-plot" "yes" "" "DWG To PDF.pc3" ;Printer Name "11\" x 17\"" ;Paper Size "Millimeters" ;Paper Units "Landscape" ;Orientation "No" ;Plot Upside Down "Window" ;Plot Area p1 p2 "1" ;Plot Scale "Center" ;Plot Offset "Yes" ;Use Plot Style "yourcolortable.ctb" ;Plot Style Name "Yes" ;Plot Lineweights "No" ;Scale Lineweights "No" ;Paper Space First "No" ;Hide Paper Space "No" ;Plot to File "No" ;Save Page Setup "Yes" ;Continue to Plot ) ) ) (princ) ) Definitely look into paperspace and sheet sets .. they are a great tool for printing.
    2 points
  8. Pretty sure in the EULA it states that AutoDesk reserves the right to cancel at ANY time.
    1 point
  9. And I answered all your spurious questions in my reply. Now, do us all a favor, and take your hatred and your blatant lies somewhere else. Good riddance.
    1 point
  10. "AutoCAD being shut down "globally"" isn't happening?
    1 point
  11. https://adsknews.autodesk.com/views/crisis-in-ukraine
    1 point
  12. We in the US have received no such information of AutoCAD being shut down "globally". Nothing on the official AutoDesk forums with this information.
    1 point
  13. That hatch pattern in your screen shot should have the area you're looking for.
    1 point
  14. Is it just 1 closed polyline on Layer-1, and 1 on Layer -2? Can there be overlap, or is 2 nicely within 1? (no overlap would make it easier) Anyway, see if you're happy with this (vl-load-com) (defun drawM-Text (pt str) (entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 pt) (cons 1 str)))) ;; ADC, for Area Deducting Cutout (defun c:adc ( / ss l1 l2 i ent lay area1 area2 area3 txt txtobj) ;; Step-1: After entering command user will select whole drawing in single selection (princ "\nSelect all objects: ") (setq ss (ssget (list (cons 0 "POLYLINE,LWPOLYLINE")))) ;; Step-2: Lisp will select only object in Layer-1 & Layer-2 (Other layers objects will be ignored) (setq i 0) (repeat (sslength ss) (setq ent (ssname ss i)) ;; read layer (setq lay (cdr (assoc 8 (entget ent)))) (princ "\n") (princ lay) ;; Step-3: Lisp will calculated the area of Layer-1 & Layer-2 (if (= "Layer-1" lay) (progn (setq area1 (vla-get-area (vlax-ename->vla-object ent))) (princ " - area: ") (princ area1) ) ) (if (= "Layer-2" lay) (progn (setq area2 (vla-get-area (vlax-ename->vla-object ent))) (princ " - area: ") (princ area2) ) ) (setq i (+ i 1)) ) ;; Step-4: Now it will Subtract the area of Layer-2 from Layer-1 (setq area3 (- area1 area2)) ;; Step-5: and paste it as Text. (setq txt (strcat "Total Area: " (rtos area1 2 2) "\nCutout Area: " (rtos area2 2 2) "\nSubtracted Area: " (rtos area3 2 2) ) ) (drawM-Text (getpoint "\nPick a point to put the MText: ") txt) (princ) )
    1 point
  15. You could try this one, ^C^C^P(load "C:/Users/Utente/Dropbox/Lavoro/backup/AUTOCAD/Lisp/Plot/PlotDWGarr.vlx"))
    1 point
  16. No Jim, try the last comment with the " at the end
    1 point
  17. So that there is a choice of different creation options and methods: Here you need to click 3 buttons to create Layouts - AutoViewport
    1 point
  18. (defun c:pdf( / activelayout ctbname pdgsccpaper pdgsccpapera4 P_plotername P_papername PATH PDFdelay pppscaleonfit pltovrd mmmvorder mmmvhide *error* ent pwgs ss1 ppw1 ppw2 vpw1 vpw2 pwwsel pdgscc1 pdgscc pdgscc4 wlp) (vl-load-com) ;activate vl code (setq pdgsccpaper 514.4016); a3 paper length, if pppscaleonfit is "FIT", this lisp is not use this variable (setq pdgsccpapera4 363.7430); a4 paper length, if pppscaleonfit is "FIT", this lisp is not use this variable (setq activelayout (vla-get-ActiveLayout (vla-get-ActiveDocument (vlax-get-acad-object)))) ;get active layout for get batch plot settings (setq p_plotername (vl-string-translate "_" " " (vla-get-ConfigName activelayout))) ;get plotter name (setq p_papername (vl-string-translate "_" " " (vla-get-CanonicalMediaName activelayout))) ;get paper name (setq ctbname (vla-get-StyleSheet activelayout)) ;get ctb name (setq path (getvar "dwgprefix")) ;get dwg file's folder (setq PDFdelay 3000) ;for make sure spooling pdf. (setq answer (getstring (strcat "\n\n Plotter - " P_plotername " / Paper - " P_papername " / CTB - " ctbname "\n Press Any Key to RUN, For Changing Plot Setting Press ESC then Edit Plot setting in PLOT (CTRL+P) then Save as Batch \n "))) (setq pppscaleonfit "fit"); fit to paper (setq pltovrd 1); set PLOTTRANSPARENCYOVERRIDE for transparent hatch is 2, default is 1 (setq mmmvorder "N"); Layout Tab first is Y, Model Tab first is N (setq mmmvhide "N"); Layout Tab object hiding is Y, or no is N ; error control (defun *error* (msg) (princ "error: ") (princ msg) (setvar "osmode" 0) (princ) ) (setq ent nil) (prompt "\n Select Title Blocks for Prints. (made by block)" ) (setq pwgs (ssget (list (cons 0 "insert")))) ; these 2 modules for modified UCS dwg. ;; Doug C. Broad, Jr. ;; can be used with vla-transformby to ;; transform objects from the UCS to the WCS (defun UCS2WCSMatrix () (vlax-tmatrix (append (mapcar '(lambda (vector origin) (append (trans vector 1 0 t) (list origin)) ); end of lambda (list '(1 0 0) '(0 1 0) '(0 0 1)) (trans '(0 0 0) 0 1) ); end of mapcar (list '(0 0 0 1)) ); end of append ); end of vlax-tmatrix ); end of defun ;; transform objects from the WCS to the UCS (defun WCS2UCSMatrix () (vlax-tmatrix (append (mapcar '(lambda (vector origin) (append (trans vector 0 1 t) (list origin)) ); end of lambda (list '(1 0 0) '(0 1 0) '(0 0 1)) (trans '(0 0 0) 1 0) );end of mapcar (list '(0 0 0 1)) ); end of append ); end of vlax-tmatrix ); end of defun (if pwgs (progn (setq ss1 (SortSelectionSetByYXZ pwgs)) (setq n 0) (repeat (sslength ss1) (setq ent (ssname ss1 n)) ; these 3 lines is for modified UCS dwg. (vla-TransformBy (vlax-ename->vla-object ent) (UCS2WCSMatrix)) (vla-getboundingbox (vlax-ename->vla-object ent) 'MinPt 'MaxPt) (vla-TransformBy (vlax-ename->vla-object ent) (WCS2UCSMatrix)) (setq ppw1 (vlax-safearray->list MinPt)) (setq ppw2 (vlax-safearray->list MaxPt)) (setq vpw1 (list (car ppw2) (cadr ppw1))) ; lower-right point (setq vpw2 (list (car ppw1) (cadr ppw2))) ; upper-left point (setq wx (- (car ppw2) (car ppw1)) ) ; length of width (setq wy (- (cadr ppw2) (cadr ppw1)) ) ; length of height (if (> wx wy) (setq wlp "l") (setq wlp "p")) ; landscape or portrait (setq pwwsel (ssget "W" ppw1 ppw2 )) ; all drawing (setq pdgscc1 (distance ppw1 ppw2)) (setq pdgscc (/ pdgscc1 pdgsccpaper )) ; scaling to a3 drawing (if title block is not exactly a3, have to change this ; for LT Scaling ; (setq pdgscc4 (* pdgscc 4 )) ;ltscale 스케일의4배 ; (setvar "ltscale" pdgscc4) ; 치수스케일 도면축척과 동일 ; set osmode to X, P, S, I, D, C, M, E (setvar "osmode" 4335) ; for scaling, if pppscaleonfit is "fit" no need to use this value (setq PLOTSCALE (STRCAT "1=" (rtos (/ pdgscc1 pdgsccpaper) 2 0))) ; fit = scale to paper, on scale to scale value (if (= pppscaleonfit "fit") (setq PLOTSCALE "fit") (setq PLOTSCALE PLOTSCALE)) (setq fname (getvar "dwgname")) ;get file name (setq fname (substr fname 1 (- (strlen fname) 4))) ;delete ".dwg" (setq sffx (rtos (getvar "cdate") 2 6)) ; make time string for add suffix to file name (setq fname (strcat PATH fname sffx ".pdf")) ;make path+filename+time ; set PLOTTRANSPARENCYOVERRIDE value (command "PLOTTRANSPARENCYOVERRIDE" pltovrd) ; for zoom to what block is now printing ;(command "zoom" P_ppw1 P_ppw2) ; don't use it makes me headaches ; now we printing (command "-PLOT" "Y" "model" P_plotername ; plotter name P_papername ; paper name "M" ; model space wlp ; landscape or portrait "N" "W" ppw2 ppw1 PLOTSCALE "C" "Y" ctbname "Y" ; line weight "A" ; Shaded Plot : all as view (A) / wire frame (W) / hide (H) / view style (V) / render (R) fname ; file name "Y" ; save plot setting "Y" ; execute plot ) (command "delay" ; for artificial spool time for pdf, 10 second is 10000 PDFdelay ) (command "osmode" "4335") (setq n (1+ n)) ); end of repeat ); end of progn ); end of if (command "PLOTTRANSPARENCYOVERRIDE" 1) (princ "\n Printing Complete! Check your dwg's folder") (princ path) (princ) ) ; https://forums.augi.com/showthread.php?137837-Sort-Selectionset-by-X-coord&p=1164232&viewfull=1#post1164232 ; SortSelectionSetByXYZ by peter ; this is edited code for multisort XY, not original code (defun sortListofSublistsbyItemX (lstOfSublists intItem intDirection) (if (> intDirection 0) (vl-sort lstOfSublists '(lambda (X Y) (if (eq (nth intItem X) (nth intItem Y)) (< (nth (- intItem 1) X) (nth (- intItem 1) Y)) (< (vl-prin1-to-string (nth intItem X)) (vl-prin1-to-string (nth intItem Y))) ) ) ) (vl-sort lstOfSublists '(lambda (X Y) (if (eq (nth intItem X) (nth intItem Y)) (> (nth (- intItem 1) X) (nth (- intItem 1) Y)) (> (vl-prin1-to-string (nth intItem X)) (vl-prin1-to-string (nth intItem Y))) ) ) ) ) ) (defun SelectionSetToList (ssSelections / intCount lstReturn) (if (and ssSelections (= (type ssSelections) 'PICKSET) ) (repeat (setq intCount (sslength ssSelections)) (setq intCount (1- intCount) lstReturn (cons (ssname ssSelections intCount) lstReturn) ) ) ) (reverse lstReturn) ) (defun ListToSelectionSet (lstOfEntities / ssReturn) (if lstOfEntities (foreach entItem lstOfEntities (if (= (type entItem) 'ENAME) (if ssReturn (setq ssReturn (ssadd entItem ssReturn)) (setq ssReturn (ssadd entItem)) ) ) ) ) ssReturn ) (defun SortSelectionSetByYXZ (ssSelections / lstOfSelections lstOfSublists lstSelections) (if (and (setq lstSelections (SelectionSetToList ssSelections)) (setq lstOfSublists (mapcar '(lambda (X)(cons X (cdr (assoc 10 (entget X))))) lstSelections)) (setq lstOfSublists (sortlistofsublistsbyitemX lstOfSublists 2 1)) (setq ssSelections (listtoselectionset (mapcar 'car lstOfSublists))) ) ssSelections ) ) I edited it little bit to be simple. - eng translate - set print path to drawing file's - get print setting, you can change this in PLOT command window. push 'apply to layout' (same button we use in publish) - you can adjust PDFdelay variable = delay time 3 seconds (= 3000) to fit your environment. if it makes jam. - pdf sorted by Upper Left to Lower Right
    1 point
  19. https://m.blog.naver.com/iagapeu/221322734578 If you have no problems using the translator, I tested that the lsp file (in zip file) in the following link works First, create a folder named "pdf" on the c drive. (c:\pdf\) If you set the plotter name, ctb, and paper name correctly in lisp code. (example) plotter name : DWG to PDF.pc5 paper name : ISO full bleed A1 (841.00 x 594.00 MM) ctb name : Monochrome.ctb Modify it to suit your environment and set pppscaleonfit variable to "fit". it is possible to print a0, a1 also. The command is pdf, and it is executed when all blocks to be output are selected. This is an lsp file, so you can know how it works. ppp_pdf.lsp
    1 point
  20. Have you used this file before? Might be that in the code as it loads there is a spare open bracket somewhere a "(", and CAD is wanting to complete the code and end with a closed bracket. Just a guess but try hitting ) and see what it does. VLX though, we can't look at it to see what the problem is Ignore that.... (APPLOAD "C:/Users/Utente/Dropbox/Lavoro/backup/AUTOCAD/Lisp/Plot/PlotDWGarr.VLX)... no " before the closing bracket, (APPLOAD "C:/Users/Utente/Dropbox/Lavoro/backup/AUTOCAD/Lisp/Plot/PlotDWGarr.VLX")
    1 point
  21. There is xy to lat long out there but need a world co-ord file to match your location for the formula used.
    1 point
  22. David uses a REALLY old version of Autocad, doesn't he? Like version 12 or something?
    1 point
  23. Here's a couple things you can do. Set Perspective to 1 Set Sunstatus to 1 Beyond that, adding a simple cube under the model, so it has something to sit on and catch shadows, will help to ground the model and add some realism. Here's a quick render, using the low quality preset, with the above settings.
    1 point
  24. ;;----------------------------------------------------------------------------;; ;; Dump all DXF Group Data (defun c:DumpIt (/ e) (if (setq SS (ssget)) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) ;list and steps through all entitys in selection set (mapcar 'print (entget ent '( "*"))) ) ) (textscr) (princ) ) This pulls the entity name of anything you select with the mouse. (setq blk (car (entsel "\nSelect Block"))) sssetfirst highlights selection set but you can just pick one entity (sssetfirst nil (ssget)) or by ssname (sssetfirst nil SS)
    1 point
  25. Thinking a bit more I don't use cloud drives, if each user has the support path set. ; must have support path set, Options Files Support files search path (setq fileexist (findfile "My_routine.lsp")) (if (= fileexist nil) (alert "my_routine.lsp not found on G: H: or S: \nCheck your support path settings") (load "My_routine.lsp") ) The search path set ie "G:\shardrive\CAD_Department\CAD_menu\LISP\ can be H: S: etc then findfile will return either T or nil
    1 point
×
×
  • Create New...