lamensterms Posted November 18, 2011 Posted November 18, 2011 (edited) Hey guys, Ive got this routine ive been working on - to draw a squiggly boundary around enlarged details... but im having trouble getting the block to insert and explode with the polyline being left as a result. Im sure im overlooking something pretty simple... any help and advice would be greatly appreciated. (defun C:sdb (/ PT1 PT2 Xdist Ydist) (setvar "cmdecho" 0) (setq PT1 (GETPOINT "\nPick Insertion Point (bottom left corner of detail)... ")) (setvar "orthomode" 0) (setq PT2 (GETPOINT PT1 "\nPick point on opposite side of detail (top right corner of detail)... ")) (setvar "osmode" 0) (setq Xdist (abs (- (car Pt1) (car Pt2)))) (setq Ydist (abs (- (cadr Pt1) (cadr Pt2)))) (COMMAND "INSERT" "sdb" PT1 Xdist Ydist "" "explode" "L") (terpri) ) is the code... the block DWG is attached. What im finding is that when i insert the block (which contains a simple polyline) - it will be inserted as a BLOCK REFERENCE. If i explode this BLOCK REFERENCE (after the insert command) im left with a bunch of lines (not a joined, closed polyline). It seems there are 2 explodes being executed. If i try to explode the block during the insert routine (ie "-insert" "*SDB")... then the scale factor is applied uniformly and the routine will not be executed correctly. Hopefully there is a simple fix for this. cheers. SDB.DWG Edited November 18, 2011 by lamensterms Quote
eldon Posted November 18, 2011 Posted November 18, 2011 I think that you are being banjaxed by AutoCAD. If you insert and explode a block with equal scaling, then a polyline stays a polyline. If you insert a block with unequal scaling, then the polyline does NOT stay a polyline. You will have to add a bit to reconstitute your polyline. Quote
lamensterms Posted November 21, 2011 Author Posted November 21, 2011 hi eldon, thanks a lot for your reply. so this is on of the rules of polyline/block inserting built into AutoCAD? Thanks for the info - i shall pursue another avenue to achieve this. Cheers. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.