Hi everyone,
i'm trying to set the transparency of objects via autolisp. I'm using the following code:
(setq flag (tblsearch "LAYER" "Uklonjeno")) (if (= flag nil) (progn (command "Layer" "M" "Uklonjeno" "c" "red" "" "") (command "_LAYER" "_TR" 80 "Uklonjeno" "") (command "laymch" selnosacea "" "n" "Uklonjeno") ) (progn (command "laymch" selnosacea "" "n" "Uklonjeno") ) )
It creates the new layer and sets its transparency to 80 %. However the blocks thaht are moved to the new layer are not transparent.
Due to compatibility reasons i'm working in 2000 version of dwg.
[Edit] The blocks are saved as 2000 version dwg. The dwg I'm working in is no saved. The default save option is 2000.
Solved! Go to Solution.
Solved by krzysztof.psujek. Go to Solution.
Solved by dbroad. Go to Solution.
...It creates the new layer and sets its transparency to 80 %. However the blocks thaht are moved to the new layer are not transparent.
Hi,
it seems you have problem with blocks.
Check transparency of objects within block definition.
Set it to ByLayer and then should work.
If it's not the reason post your drawing it will be easier to diagnose.
Chris
It's allready set to "ByLayer". Some blocks behave normal and some just wont show transparent. I can't find any difference between them.
Here is the dwg and the AutoCAD Block Reference Interface retrieved by VLAX-DUMP-OBJECT. I tried to compare the block that is showing transparent and the one that is not.
Edit the block definitions and change the internal objects from layer znak to layer 0. Then they will inherit the layer properties of the block.
Hi,
first read this or some similar articles http://www.ellenfinkelstein.com/acadblog/on-which-layers-should-you-create-blocks/.
There are a lot of routines that move object within block to 0 layer, and for sure you could find at least few of them on this forum.
You can also check this LeeMac's great function http://lee-mac.com/applytoblockobjects.html
and look at example usage of it.
Chris
Actually I didn't create the blocks, I got them from other source. And I just found Lee Mac's function and implemented it.
Thanks to all!
Can't find what you're looking for? Ask the community or share your knowledge.