Hopeless Turtle Posted March 1, 2023 Share Posted March 1, 2023 I've made a program to redefine a block between 2 forms. They are fairly basic blocks with a polyline and circles. The problem is the block still behaves like the original in regards to selection. Clicking the new block doesn't work. It's like there's a ghost of the original block that you have to use to interact with it. Is there some regen or similar function that would fix this? Here's the code for reference. (defun c:standardbaseplates () (entmake (list (cons 0 "BLOCK") (cons 2 "_BASEPLATE_") (cons 10 '(0.0 0.0 0.0)) (cons 70 0) )) (entmake (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 90 8) (cons 70 0) (cons 62 256) (cons 8 "0") (cons 10 (list -0.875 -4.75)) (cons 10 (list -3.5 -4.75)) (cons 10 (list -3.5 -1.0)) (cons 10 (list -2.25 0.25)) (cons 10 (list 2.25 0.25)) (cons 10 (list 3.5 -1.0)) (cons 10 (list 3.5 -4.75)) (cons 10 (list 0.875 -4.75)) )) (entmake (list (cons 0 "CIRCLE") (cons 10 (list 2.5 -3.75)) (cons 40 0.3125) (cons 62 256) (cons 8 "0") )) (entmake (list (cons 0 "CIRCLE") (cons 10 (list -2.5 -3.75)) (cons 40 0.3125) (cons 62 256) (cons 8 "0") )) (entmake (list (cons 0 "ENDBLK") (cons 8 "0") )) (vla-regen (vla-get-activedocument(vlax-get-acad-object)) acAllViewports) ) (defun c:seismicbaseplates () (entmake (list (cons 0 "BLOCK") (cons 2 "_BASEPLATE_") (cons 10 '(0.0 0.0 0.0)) (cons 70 0) )) (entmake (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 90 6) (cons 70 0) (cons 62 256) (cons 8 "0") (cons 10 (list -0.875 -6.0)) (cons 10 (list -4.0 -6.0)) (cons 10 (list -4.0 2.0)) (cons 10 (list 4.0 2.0)) (cons 10 (list 4.0 -6.0)) (cons 10 (list 0.875 -6.0)) )) (entmake (list (cons 0 "CIRCLE") (cons 10 (list -3.0 -5.0)) (cons 40 0.3125) (cons 62 256) (cons 8 "0") )) (entmake (list (cons 0 "CIRCLE") (cons 10 (list -3.0 1.0)) (cons 40 0.3125) (cons 62 256) (cons 8 "0") )) (entmake (list (cons 0 "CIRCLE") (cons 10 (list 3.0 -5.0)) (cons 40 0.3125) (cons 62 256) (cons 8 "0") )) (entmake (list (cons 0 "CIRCLE") (cons 10 (list 3.0 1.0)) (cons 40 0.3125) (cons 62 256) (cons 8 "0") )) (entmake (list (cons 0 "ENDBLK") (cons 8 "0") )) (vla-regen (vla-get-activedocument(vlax-get-acad-object)) acAllViewports) ) Quote Link to comment Share on other sites More sharing options...
devitg Posted March 1, 2023 Share Posted March 1, 2023 @Hopeless Turtle, As far as I know you can not give the same name to both blocks Quote Link to comment Share on other sites More sharing options...
devitg Posted March 1, 2023 Share Posted March 1, 2023 @Hopeless Turtle, find attached lisp an dwg baseplates.dwg baseplates.lsp Quote Link to comment Share on other sites More sharing options...
Hopeless Turtle Posted March 1, 2023 Author Share Posted March 1, 2023 The intention is to redefine BASEPLATE. Not create 2 different blocks of the same name Quote Link to comment Share on other sites More sharing options...
devitg Posted March 1, 2023 Share Posted March 1, 2023 Ok. Quote Link to comment Share on other sites More sharing options...
Hopeless Turtle Posted March 1, 2023 Author Share Posted March 1, 2023 The problem is, after it's redefined you can't click on the new geometry. It only selects it from where the old geometry used to be. As if it's not fully redefined. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 1, 2023 Share Posted March 1, 2023 For me look at a dynamic block you can enter parameters and the object will change size to suit. Len & Ht, Rad, offset X & Y Or a lisp that draws the plate to the size you want then can make a block of the new baseplate "Base300x200" the name from the values entered. Something like make a selection set of what was just created then use "-block" follow the prompts to see how you would do in a (command "-block" Quote Link to comment Share on other sites More sharing options...
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.