Cocoroboss Posted August 20, 2015 Share Posted August 20, 2015 Hi everyone, I use the insertblock command (via VBA) to insert home-made blocks in a drawing. Cyurrently each pre-defined block is stored in a DWG. The issue is that some of the inserted blocks are not editable : when I double-click on them, I do not get the "edit attributes" window, instead I get the warning message "The object is on a locked layer". One of my inserted blocks is totally editable and I do not see any difference with the other ones. The layer they are inserted on is the same for every of them, so why this one is editable and the others are not ? I looked into the "layer manager" and the layer is "unlocked". A little hint : the DWG I work on already contains blocks (my aim is to add some others from an Excel list), they also are on the same layer as my inserted blocks, and they are editable. Another hint : when I use my insertion procedure in an other DWG it works percetly and every of my inserted blocks are editable. However I need to insert them in the DWG I work on, not a test DWG. I prefered not to post my VBA code because I think it does not come from the code but from the DWG. If you think I am wrong tell me and I will post it. Thanks for your attention, have a nice day ! Quote Link to comment Share on other sites More sharing options...
SLW210 Posted August 20, 2015 Share Posted August 20, 2015 Did you check what layers are the blocks on before inserting them and what layers are in the blocks? Have you Audited and -Purged the drawing? Have you tried using the regular Insert commands to eliminate the VBA? Can the blocks be exploded? Easiest solution may be to WBLOCK the current Drawing and try it. Quote Link to comment Share on other sites More sharing options...
RobDraw Posted August 20, 2015 Share Posted August 20, 2015 It may be due to layers within the block that the objects are on. Quote Link to comment Share on other sites More sharing options...
Cocoroboss Posted August 20, 2015 Author Share Posted August 20, 2015 Did you check what layers are the blocks on before inserting them and what layers are in the blocks? Yes I did : in the DWG that only contains my block there was several different layers. I tried to put every part of the block on the same layer and ... it worked ! Tadaaam \o/ So basically, if you want to use insertBlock, the block to insert must have all of its objects on the same layer to be editable. Even if the layer it will be inserted on is different, it does not matter. Have you Audited and -Purged the drawing? Nope, I even don't know how to do this. Have you tried using the regular Insert commands to eliminate the VBA? Well no I have not, because I must use VBA as I work from an Excel file. Can the blocks be exploded? Yes they can, as if they were in a Michael Bay movie ! It may be due to layers within the block that the objects are on. Yes, you guessed it right ! Thanks a lot ! 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.