Jump to content

Leaderboard

Popular Content

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

  1. You can create as many layer states as you need. If you have two viewports in your layout, you can create a layer state for each one to display different layers in each viewport. But, if you go into model space and start freezing layers, as tombu mentioned, that will affect your viewport display when you go back to your layout and those layers that you froze in model space will no longer be visible in your viewports. I believe this is the problem you are describing. Once you create your layer states, it's best to leave model space alone. Just work inside your viewports.
    3 points
  2. This will make a list of the attributes in a block. You can use this list in the Lee-mac code. (setq obj (vlax-ename->vla-object (car (entsel "Pick blk")))) (setq atts (vlax-invoke obj 'Getattributes)) (setq lst '()) (foreach att atts (setq lst (cons (vla-get-textstring att) lst)) )
    2 points
  3. Try my version see what happens there with closing the polylines. I will assume that they are 2d polyline, but what is happening for them not to work? to delete the original objects I would put an: (entdel ent) at the end of my while loop in the line area defun There are 'save as' lisp routines out there you can copy and paste, but the basic code is: (COMMAND "_saveas" "" "~") You might then update my code, change c:cnc to include a getkword Y or N to ask delete original items and the same to ask save as, and to do that code in the linearea lisp. So, so far you might have: (defun PolyLineArea ( MyPolyLineEntName / MyArea) (setq MyPolyLine (vlax-ename->vla-object MyPolyLineEntName)) (setq MyArea (vla-get-Area MyPolyLine) ) MyArea ) ;;;;;;;;;;;;;;;;;;;;;; ;;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-the-largest-number-in-a-list-of-numbers/td-p/816742 (defun maxinlist (x / next highest) (setq next 0) (setq highest (nth 0 x)) ; Assumes that the first item in the list is the highest. Then iterates through every number in the list (while (< next (1- (length x))) (setq highest (max highest (nth (1+ next) x))) (setq next (1+ next)) ) ;end while highest ) https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-offset-many-closed-objects-toward-inside-at-once/td-p/8304010 ;; Function to determine if a polyline is CW or CCW ;; Returns 1 for CCW, or -1 for CW, or nil if not a polyline or only two points (defun @CCW? (Pline / Param Sum End P1 P2 P3) (cond ((= (type Pline) 'VLA-OBJECT)) ((= (type Pline) 'ENAME)(setq Pline (vlax-ename->vla-object Pline))) (1 (setq Pline nil)) ) (and Pline (setq Param 0.5 Sum 0.0 End (vlax-curve-getendparam Pline) P1 (vlax-curve-getstartpoint Pline) PType (vlax-get Pline 'ObjectName) ) (or (while (not (setq P2 (vlax-curve-getpointatparam Pline Param))) (setq Param (+ Param 0.5)) ) 1 ) (while (and (> End 2)(< Param End)) (setq Param (+ Param 0.5)) (while (not (setq P3 (vlax-curve-getpointatparam Pline Param))) (setq Param (+ Param 0.5)) ) (setq Sum (+ Sum (@delta (angle P1 P2)(angle P2 P3))) P1 P2 P2 P3 ) ) ) (cond ((not Sum) nil) ((zerop Sum) nil) ((> Sum 0) 1) ;; meaning it's CCW ((< Sum 0) -1) ;; meaning it's CW ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun @delta (a1 a2) (cond ((> a1 (+ a2 pi)) (- (+ a2 pi pi) a1) ) ((> a2 (+ a1 pi)) (- a2 (+ a1 pi pi)) ) (1 (- a2 a1)) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;; (defun c:CNC ( / offsetdist deleteoriginal Saveasmodified) (setq offsetdist (getreal "Offset?")) (initget "Y N y n") (setq deleteoriginal (strcase (getkword "Delete Original Lines? [Y/N]"))) (initget "Y N y n") (setq Saveasmodified (strcase (getkword "Save as new drawing? [Y/N]"))) (linearea offsetdist deleteoriginal Saveasmodified) (princ) ) ;;;;;;;;;;;;;;;;;;;;; (defun LineArea ( offsetdist deleteoriginal Saveasmodified / MyPolyLineEntName Acount AreaList) (vl-load-com) ;;Load VL (setq AreaList (list)) ;;Blank List (setq ss (ssget "_A")) ;;select set, all visible objects, change A to X for all objects (command "_pedit" "m" ss "" "c" "") ;Close polylines (setq Acount 0) ;; Set a counter to 0 (while (< acount (sslength ss)) ;;Loop through selection Set, ss (setq MyPolyLineEntName (ssname ss Acount)) ;;nth entity in ss name (setq AreaList (append AreaList (list (PolyLineArea MyPolyLineEntName)) )) ;;get object area from PolyLineArea function above (setq Acount (+ Acount 1)) ;;increase counter ) (setq largestentpos (- (vl-position (maxinlist AreaList) AreaList) 0 )) (setq acount 0) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (setq Distance (* -1 (@CCW? ent) offsetdist)) (if (= acount largestentpos) (setq Distance (* (@CCW? ent) offsetdist)) ) (setq acount (+ acount 1)) (setq obj (vlax-ename->vla-object ent)) (vla-offset obj Distance) (command "._CHANGE" (entlast) "" "Properties" "Color" "1" "") (if (= deleteoriginal "Y") (entdel ent)) ) ;end for each (if (= Saveasmodified "Y")(COMMAND "_saveas" "" "~")) ) With the above if you modify the saveas part you could run this as a batch or script - open drawing - run linearea adding in the offset, delete original and a [modified lisp input] filename / filepath - close drawing - open next drawing,,,,,
    1 point
  4. To delete the original objects and leave the offset objects?
    1 point
  5. Try putting this (command "_pedit" "m" ss "" "c" "") after exceeds (setq ss (ssget....) line
    1 point
  6. They're called Viewport Overrides because they only work on viewports. While in a viewport you can use Viewport Overrides to modify layers using commands like LAYFRZ (Command) which by default will Vpfreeze just in that viewport but can be set to actually freeze the layer as well. While in a viewport look at the Layer Properties Manager and it displays layer properties you can modify anywhere but has these extra viewport override properties which are only visible in a viewport: VP Freeze (available only from a layout tab) Freezes selected layers only in the current layout viewport. If a layer is already frozen or turned off in the drawing, you can't thaw the layer in the current layout viewport. VP Color (available only from a layout tab) Sets an override for the color associated with the selected layer for the current layout viewport. VP Linetype (available only from a layout tab) Sets an override for the linetype associated with the selected layer for the current layout viewport. VP Lineweight (available only from a layout tab) Sets an override for the lineweight associated with the selected layer for the current layout viewport. VP Transparency (available only from a layout tab) Sets an override for transparency associated with the selected layer for the current layout viewport. VP Plot Style (available only from a layout tab) Sets an override for the plot style associated with the selected layer for the current layout viewport. Override settings are not visible in the viewport or plotted when the visual style in the drawing is set to Conceptual or Realistic. For color-dependent plot styles (the PSTYLEPOLICY system variable is set to 1), you cannot set a plot style override. You can apply a Layer State that changes the Layer States for the entire drawing or just for a viewport both of which I use often. But remember the difference between frozen in a viewport which only affects that viewport and actually freezing a layer like on the Model tab which freezes it everywhere including every viewport in the drawing.
    1 point
  7. There are no viewport overrides on the Model tab! Any layer you freeze on the Model tab is frozen everywhere. That's how it's supposed to work. If you freeze (Not VPfreeze) a layer in a viewport it would be frozen everywhere in the drawing as well.
    1 point
  8. ; CNC - 2022.05.31 exceed ; https://www.cadtutor.net/forum/topic/75276-an-offset-marco-for-cnc-plasma-cutting-process/ ; ; Works on closed polylines, circles. ; Objects with the largest area are offset outward, others are offset inward. ; ; Command List ; CNC - do offset ; @Q - Save and close all opened drawings. Dialogs do not appear individually when closing each drawing. Appears only once for confirmation. ; ; The color is designated as number 3 (green). The layer does not change. ; ; When you add this Lisp to your starter set, it will work automatically every time you open a drawing. ; Open multiple drawings and save and close them all with the @Q command. ; If you want to manually, add ; in front of (c:CNC) to make ;(c:CNC), ; it will work when manually entering CNC ; ; Note ; If you reopen a drawing that has already been executed and saved, it will be created again. ; In this part, it seems to be necessary to add a statement that does not execute if there is a green object in the drawing. ; Your green looks different than mine, so I didn't add this code. (vl-load-com) (defun c:CNC ( / offsetvalue ss ssl index arealist obj objarea objlist outerloopobj outeroffset otherloop otherlooplen index2 otherloopobj inneroffset ) ;(setq offsetvalue 10) (setq offsetvalue (getreal "\n Input offset value : ")) (if (= offsetvalue nil) (progn (princ "\n you cancel CNC offset command") (exit)) ) (setvar 'cmdecho 0) (command "_Join" "all" "") (setvar 'cmdecho 1) (setq ss (ssget "X" '((0 . "LWPOLYLINE,CIRCLE")))) (setq ssl (sslength ss)) (setq index 0) (setq arealist '()) (repeat ssl (setq obj (vlax-ename->vla-object (ssname ss index))) (setq objarea (vla-get-area obj)) (setq objlist (list obj objarea)) (setq arealist (cons objlist arealist)) (setq index (+ index 1)) ) (setq arealist (vl-sort arealist (function (lambda (x1 x2) (> (cadr x1) (cadr x2)) ) ))) (setq outerloopobj (car (car arealist))) (setq outeroffset (ex:offsetout outerloopobj offsetvalue)) (vlax-put-property outeroffset 'color 3) (setq otherloop (cdr arealist)) (setq otherlooplen (length otherloop)) (setq index2 0) (repeat otherlooplen (setq otherloopobj (car (nth index2 otherloop))) (setq inneroffset (ex:offsetin otherloopobj offsetvalue)) (vlax-put-property inneroffset 'color 3) (setq index2 (+ index2 1)) ) (princ) ) (defun ex:offsetin ( obj offdis / subloop1 subloop2 subloop1type subloop2type subloop1length subloop2length objloop) (vla-offset obj (* offdis 1)) (setq subloop1 (vlax-ename->vla-object (entlast))) (vla-offset obj (* offdis -1)) (setq subloop2 (vlax-ename->vla-object (entlast))) (setq subloop1type (vlax-get-property subloop1 'entityname)) (setq subloop2type (vlax-get-property subloop2 'entityname)) (cond ((= subloop1type "AcDbPolyline") (setq subloop1length (vlax-get-property subloop1 'length)) ) ((= subloop1type "AcDbCircle") (setq subloop1length (vlax-get-property subloop1 'Circumference)) ) ((= subloop1type "AcDbArc") (setq subloop1length (vlax-get-property subloop1 'Radius)) ) );end of cond (cond ((= subloop2type "AcDbPolyline") (setq subloop2length (vlax-get-property subloop2 'length)) ) ((= subloop2type "AcDbCircle") (setq subloop2length (vlax-get-property subloop2 'Circumference)) ) ((= subloop2type "AcDbArc") (setq subloop2length (vlax-get-property subloop2 'Radius)) ) );end of cond (cond ((> subloop1length subloop2length) (progn (vla-delete subloop1) (setq looplength subloop2length) (setq objloop subloop2))) ((< subloop1length subloop2length) (progn (vla-delete subloop2) (setq looplength subloop1length) (setq objloop subloop1))) ((= subloop1length subloop2length) (progn (vla-delete subloop2) (setq looplength subloop1length) (setq objloop subloop1))) ) objloop ) (defun ex:offsetout ( obj offdis / subloop1 subloop2 subloop1type subloop2type subloop1length subloop2length objloop) (vla-offset obj (* offdis 1)) (setq subloop1 (vlax-ename->vla-object (entlast))) (vla-offset obj (* offdis -1)) (setq subloop2 (vlax-ename->vla-object (entlast))) (setq subloop1type (vlax-get-property subloop1 'entityname)) (setq subloop2type (vlax-get-property subloop2 'entityname)) (cond ((= subloop1type "AcDbPolyline") (setq subloop1length (vlax-get-property subloop1 'length)) ) ((= subloop1type "AcDbCircle") (setq subloop1length (vlax-get-property subloop1 'Circumference)) ) ((= subloop1type "AcDbArc") (setq subloop1length (vlax-get-property subloop1 'Radius)) ) );end of cond (cond ((= subloop2type "AcDbPolyline") (setq subloop2length (vlax-get-property subloop2 'length)) ) ((= subloop2type "AcDbCircle") (setq subloop2length (vlax-get-property subloop2 'Circumference)) ) ((= subloop2type "AcDbArc") (setq subloop2length (vlax-get-property subloop2 'Radius)) ) );end of cond (cond ((< subloop1length subloop2length) (progn (vla-delete subloop1) (setq looplength subloop2length) (setq objloop subloop2))) ((> subloop1length subloop2length) (progn (vla-delete subloop2) (setq looplength subloop1length) (setq objloop subloop1))) ((= subloop1length subloop2length) (progn (vla-delete subloop2) (setq looplength subloop1length) (setq objloop subloop1))) ) objloop ) ; close all by Middleton, Cliff ; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/early-christmas/m-p/777308/highlight/true#M2966 (defun C:@Q nil (cond ((= 6 (LM:popup "Close All with Save" "You want close all with save?" 36)) (@CloseWithSave) (command "_close" "n") ) (t (princ "\nCanceled")) ) (princ) ) (defun @CloseWithSave ( / cnt) (setq cnt (@CloseAllButActive :vlax-True)) (if (> cnt 0) (princ (strcat "\n[ " (itoa cnt) " ] " (if (> cnt 1) "s" "") "are saved and closed")) (princ "\nThere's no dwg for closing.") ) (princ) ) (defun @CloseAllButActive (TrueOrFalse / cnt) (setq cnt 0) (vlax-for Item (vla-get-Documents (vlax-get-acad-object)) (if (= (vla-get-Active Item) :vlax-False) (progn (vla-close Item TrueOrFalse) (setq cnt (1+ cnt)) ) ) ) cnt ) ;; Popup - Lee Mac ;; A wrapper for the WSH popup method to display a message box prompting the user. ;; ttl - [str] Text to be displayed in the pop-up title bar ;; msg - [str] Text content of the message box ;; bit - [int] Bit-coded integer indicating icon & button appearance ;; Returns: [int] Integer indicating the button pressed to exit (defun LM:popup ( ttl msg bit / wsh rtn ) (if (setq wsh (vlax-create-object "wscript.shell")) (progn (setq rtn (vl-catch-all-apply 'vlax-invoke-method (list wsh 'popup msg 0 ttl bit))) (vlax-release-object wsh) (if (not (vl-catch-all-error-p rtn)) rtn) ) ) ) (c:CNC) if you want use basic command in lisp (setvar 'cmdecho 0) (command "_Join" "all" "") (setvar 'cmdecho 1) like this way. (setvar 'cmdecho 0) is mute. (setvar 'cmdecho 1) is unmute.
    1 point
  9. ; CNC - 2022.05.31 exceed ; https://www.cadtutor.net/forum/topic/75276-an-offset-marco-for-cnc-plasma-cutting-process/ ; ; Works on closed polylines, circles. ; Objects with the largest area are offset outward, others are offset inward. ; ; Command List ; CNC - do offset ; @Q - Save and close all opened drawings. Dialogs do not appear individually when closing each drawing. Appears only once for confirmation. ; ; The color is designated as number 3 (green). The layer does not change. ; ; Edit 10 in (setq offsetvalue 10) to adjust the offset length ; ; When you add this Lisp to your starter set, it will work automatically every time you open a drawing. ; Open multiple drawings and save and close them all with the @Q command. ; If you want to manually, add ; in front of (c:CNC) to make ;(c:CNC), ; it will work when manually entering CNC ; ; Note ; If you reopen a drawing that has already been executed and saved, it will be created again. ; In this part, it seems to be necessary to add a statement that does not execute if there is a green object in the drawing. ; Your green looks different than mine, so I didn't add this code. (vl-load-com) (defun c:CNC ( / offsetvalue ss ssl index arealist obj objarea objlist outerloopobj outeroffset otherloop otherlooplen index2 otherloopobj inneroffset ) (setq offsetvalue 10) (setq ss (ssget "X" '((0 . "LWPOLYLINE,CIRCLE")))) (setq ssl (sslength ss)) (setq index 0) (setq arealist '()) (repeat ssl (setq obj (vlax-ename->vla-object (ssname ss index))) (setq objarea (vla-get-area obj)) (setq objlist (list obj objarea)) (setq arealist (cons objlist arealist)) (setq index (+ index 1)) ) (setq arealist (vl-sort arealist (function (lambda (x1 x2) (> (cadr x1) (cadr x2)) ) ))) (setq outerloopobj (car (car arealist))) (setq outeroffset (ex:offsetout outerloopobj offsetvalue)) (vlax-put-property outeroffset 'color 3) (setq otherloop (cdr arealist)) (setq otherlooplen (length otherloop)) (setq index2 0) (repeat otherlooplen (setq otherloopobj (car (nth index2 otherloop))) (setq inneroffset (ex:offsetin otherloopobj offsetvalue)) (vlax-put-property inneroffset 'color 3) (setq index2 (+ index2 1)) ) (princ) ) (defun ex:offsetin ( obj offdis / subloop1 subloop2 subloop1type subloop2type subloop1length subloop2length objloop) (vla-offset obj (* offdis 1)) (setq subloop1 (vlax-ename->vla-object (entlast))) (vla-offset obj (* offdis -1)) (setq subloop2 (vlax-ename->vla-object (entlast))) (setq subloop1type (vlax-get-property subloop1 'entityname)) (setq subloop2type (vlax-get-property subloop2 'entityname)) (cond ((= subloop1type "AcDbPolyline") (setq subloop1length (vlax-get-property subloop1 'length)) ) ((= subloop1type "AcDbCircle") (setq subloop1length (vlax-get-property subloop1 'Circumference)) ) ((= subloop1type "AcDbArc") (setq subloop1length (vlax-get-property subloop1 'Radius)) ) );end of cond (cond ((= subloop2type "AcDbPolyline") (setq subloop2length (vlax-get-property subloop2 'length)) ) ((= subloop2type "AcDbCircle") (setq subloop2length (vlax-get-property subloop2 'Circumference)) ) ((= subloop2type "AcDbArc") (setq subloop2length (vlax-get-property subloop2 'Radius)) ) );end of cond (cond ((> subloop1length subloop2length) (progn (vla-delete subloop1) (setq looplength subloop2length) (setq objloop subloop2))) ((< subloop1length subloop2length) (progn (vla-delete subloop2) (setq looplength subloop1length) (setq objloop subloop1))) ((= subloop1length subloop2length) (progn (vla-delete subloop2) (setq looplength subloop1length) (setq objloop subloop1))) ) objloop ) (defun ex:offsetout ( obj offdis / subloop1 subloop2 subloop1type subloop2type subloop1length subloop2length objloop) (vla-offset obj (* offdis 1)) (setq subloop1 (vlax-ename->vla-object (entlast))) (vla-offset obj (* offdis -1)) (setq subloop2 (vlax-ename->vla-object (entlast))) (setq subloop1type (vlax-get-property subloop1 'entityname)) (setq subloop2type (vlax-get-property subloop2 'entityname)) (cond ((= subloop1type "AcDbPolyline") (setq subloop1length (vlax-get-property subloop1 'length)) ) ((= subloop1type "AcDbCircle") (setq subloop1length (vlax-get-property subloop1 'Circumference)) ) ((= subloop1type "AcDbArc") (setq subloop1length (vlax-get-property subloop1 'Radius)) ) );end of cond (cond ((= subloop2type "AcDbPolyline") (setq subloop2length (vlax-get-property subloop2 'length)) ) ((= subloop2type "AcDbCircle") (setq subloop2length (vlax-get-property subloop2 'Circumference)) ) ((= subloop2type "AcDbArc") (setq subloop2length (vlax-get-property subloop2 'Radius)) ) );end of cond (cond ((< subloop1length subloop2length) (progn (vla-delete subloop1) (setq looplength subloop2length) (setq objloop subloop2))) ((> subloop1length subloop2length) (progn (vla-delete subloop2) (setq looplength subloop1length) (setq objloop subloop1))) ((= subloop1length subloop2length) (progn (vla-delete subloop2) (setq looplength subloop1length) (setq objloop subloop1))) ) objloop ) ; close all by Middleton, Cliff ; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/early-christmas/m-p/777308/highlight/true#M2966 (defun C:@Q nil (cond ((= 6 (LM:popup "Close All with Save" "You want close all with save?" 36)) (@CloseWithSave) (command "_close" "n") ) (t (princ "\nCanceled")) ) (princ) ) (defun @CloseWithSave ( / cnt) (setq cnt (@CloseAllButActive :vlax-True)) (if (> cnt 0) (princ (strcat "\n[ " (itoa cnt) " ] " (if (> cnt 1) "s" "") "are saved and closed")) (princ "\nThere's no dwg for closing.") ) (princ) ) (defun @CloseAllButActive (TrueOrFalse / cnt) (setq cnt 0) (vlax-for Item (vla-get-Documents (vlax-get-acad-object)) (if (= (vla-get-Active Item) :vlax-False) (progn (vla-close Item TrueOrFalse) (setq cnt (1+ cnt)) ) ) ) cnt ) ;; Popup - Lee Mac ;; A wrapper for the WSH popup method to display a message box prompting the user. ;; ttl - [str] Text to be displayed in the pop-up title bar ;; msg - [str] Text content of the message box ;; bit - [int] Bit-coded integer indicating icon & button appearance ;; Returns: [int] Integer indicating the button pressed to exit (defun LM:popup ( ttl msg bit / wsh rtn ) (if (setq wsh (vlax-create-object "wscript.shell")) (progn (setq rtn (vl-catch-all-apply 'vlax-invoke-method (list wsh 'popup msg 0 ttl bit))) (vlax-release-object wsh) (if (not (vl-catch-all-error-p rtn)) rtn) ) ) ) (c:CNC)
    1 point
  10. Just to get you going a bit, this should return the entity name of the largest area polyline in your drawing. Command LineArea (defun PolyLineArea ( MyPolyLineEntName / MyArea) (setq MyPolyLine (vlax-ename->vla-object MyPolyLineEntName)) (setq MyArea (vla-get-Area MyPolyLine) ) MyArea ) ;;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-the-largest-number-in-a-list-of-numbers/td-p/816742 (defun maxinlist (x / next highest) (setq next 0) (setq highest (nth 0 x)) ; Assumes that the first item in the list is the highest. Then iterates through every number in the list (while (< next (1- (length x))) (setq highest (max highest (nth (1+ next) x))) (setq next (1+ next)) ) highest ) ) (defun c:LineArea ( / MyPolyLineEntName Acount AreaList) (vl-load-com) ;;Load VL (setq AreaList (list)) ;;Blank List (setq Acount 0) ;; Set a counter to 0 (setq ss (ssget "_A")) ;;select set, all visible objexts, change A to X for all objects (while (< acount (sslength ss)) ;;Loop through selection Set, ss (setq MyPolyLineEntName (ssname ss Acount)) ;;nth entity in ss name (setq AreaList (append AreaList (list (PolyLineArea MyPolyLineEntName)) )) ;;get object area from PolyLineArea function above (setq Acount (+ Acount 1)) ;;increase counter ) (setq largestEntity (ssname ss (vl-position (maxinlist AreaList) AreaList) )) ;; the perimeter entity name using maxinlist function above ) and I reckon if you look to MHUPPs above that will let you offset the perimeter and remove that from the selection set list, , then you can offset all that is left in the other direction, add something to save and close the file and job done? Will come back to look at this tomorrow
    1 point
  11. To tell the machine what you want to do, have to think more step by step. You may have questions such as: Q1. Does 1 dwg contain only 1 part? Q2. Doesn't one dwg contain objects that are not parts and have nothing to do with parts? If you YES these 2 questions, you can add all polylines to the selection set with (ssget "X" '((0 . "LWPOLYLINE"))) and then mark the polyline with the largest area as the outside. Q3. Are there any isolated objects like donuts in your parts? this case make some headache.. If you don't have donuts, you just have to offset them all to the small side. But with donuts, a problem arises. It may be better to auto-assign the isolate using a hatch. This is just example, I recently used command HATCH to group objects into a selection set. (BMP3) https://www.cadtutor.net/forum/topic/75162-bmp-file-to-polyline-mosaic/ And when offsetting a closed polyline, you need to know whether the polyline is drawn clockwise or counterclockwise to determine the direction of the outer or inner offset. This is the correct way. but I think below is more understandable, 1. create inside & outside both polylines 2. determine the outside if the length is long & the inside if the length is short 3. and delete what you don't need. This Link is example I wrote this way. Lisp that repeatedly offsets the inside of a shape until it is impossible to offset it. https://www.cadtutor.net/forum/topic/74957-inside-offset-multiple/ This allows you to use the offset in any direction without considering the order of the nodes. It's not a good way because to create something you don't need and then delete it. But for a beginner like me, this was more intuitive. And, It is generally impossible to use Lisp in multiple drawings, so i recommend using it with a script. However, if you have difficulties with the script, there is a simple way to register Lisp in the startup set, make Lisp run automatically when opened, then open all DWGs manually, then save and close at once. with CLOSEALL command
    1 point
×
×
  • Create New...