Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/15/2020 in all areas

  1. Roy beat me to it but here's another to export to DWG (defun c:exportblocks (/ c n p s) ;; RJP » 2020-05-14 (cond ((and (setq s (ssget '((0 . "insert")))) (or (vl-file-directory-p (setq p (strcat (getvar 'dwgprefix) "_ExportedBlocks\\"))) (vl-mkdir p) ) (setq s (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))) ) (setvar 'filedia 0) (setvar 'cmdecho 0) (foreach x s (cond ((not (member (setq n (vla-get-effectivename (vlax-ename->vla-object x))) c)) (command "._-wblock" (strcat p n) n) (setq c (cons n c)) ) ) ) (setvar 'filedia 1) (setvar 'cmdecho 1) ) ) (princ) ) (vl-load-com)
    1 point
  2. Change the DXF version and accuracy to suit: (defun KGA_Conv_Pickset_To_ObjectList (ss / i ret) (if ss (repeat (setq i (sslength ss)) (setq ret (cons (vlax-ename->vla-object (ssname ss (setq i (1- i)))) ret)) ) ) ) (defun c:Exp2Dxf ( / doneLst fld fnm nme ref spc ss) (if (and (or (= 1 (getvar 'dwgtitled)) (prompt "\nError: DWG must be saved first ") ) (setq ss (ssget '((0 . "INSERT")))) ) (progn (setq fld (getvar 'dwgprefix)) (setq spc (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) (foreach obj (KGA_Conv_Pickset_To_ObjectList ss) (if (not (vl-position (strcase (setq nme (vla-get-effectivename obj))) doneLst)) (progn (setq doneLst (cons (strcase nme) doneLst)) (setq ref (vla-insertblock spc (vlax-3d-point 0.0 0.0 0.0) nme 1.0 1.0 1.0 0.0)) (vla-put-layer ref "0") (command "_.zoom" "_object" (vlax-vla-object->ename ref) "") (setq fnm (strcat fld nme ".dxf")) (vl-file-delete fnm) ; Delete existing file. (command "_.dxfout" fnm ; Full path. "_entities" (vlax-vla-object->ename ref) "" "_version" "2000" ; Valid DXF version. 6 ; Accuracy ) (vla-delete ref) ) ) ) ) ) (princ) )
    1 point
  3. This is probably because the system variable "peditaccept" is different on the two systems. It should be 1. I have altered the posted code in my last post to account for this.
    1 point
  4. Well a drawing of that size isn't going to fit on any piece of paper using a scale of 1:20. The best scale in this case is 1:200 which I added to your drawing. I also took the liberty of scaling your text, dimensions and linetype so they show up in the layout. I just have one question, why have you converted the drawing into a block in model space? LayOut.dwg
    1 point
  5. The most important point at the start, after you make sure your units are set correctly to millimeters, is forget anything about scale, just draw your geometry in model space using the actual sizes. You only think about scale much later on when it comes to deciding what you want to plot/print, for now just concentrate on creating your drawing. Let us know when you have done that and then someone can explain the process for setting up your layout(s) for plotting.
    1 point
  6. Nope, you can change the color of an entire layer, in just a single viewport, but individual object colors are not limited to viewports they are the same everywhere.
    1 point
  7. The units could be Light Years. There is no compunction to be millimetres
    1 point
  8. Manufacturer's websites.
    -1 points
×
×
  • Create New...