Hatch with transparency

Hatch with transparency

Anonymous
Not applicable
1,355 Views
4 Replies
Message 1 of 5

Hatch with transparency

Anonymous
Not applicable
Hello

Maybe someone can help me.

Is posible to add on drawing hatch (one color) with
transparency?

I want to fill some entities with transparent color.

I am sending attachment with example (selection rectangle in autocad).

Best regards,
Danijel Ivankovic
0 Likes
1,356 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Sto ti zelis tocno napravit?

0 Likes
Message 3 of 5

Anonymous
Not applicable

You can use the entities transparency property

 

 

  [CommandMethod("TestTransparencyHatch", CommandFlags.Modal)]
        public void TransparencyHatch() 
        {
            Database db = HostApplicationServices.WorkingDatabase;                   
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;               
                BlockTableRecord btr = bt[BlockTableRecord.ModelSpace].GetObject(OpenMode.ForRead) as BlockTableRecord;
                    foreach (ObjectId btrObjId in btr)
                    {
                        Entity ent = btrObjId.GetObject(OpenMode.ForRead) as Entity;
                        if (ent is Hatch)
                        {
                            ent.UpgradeOpen();
                            Autodesk.AutoCAD.Colors.Transparency trpy = new Autodesk.AutoCAD.Colors.Transparency(40);
                            ent.Transparency = trpy;                    
                        }         
                }
                tr.Commit();
            }           
        }

 

 

0 Likes
Message 4 of 5

Anonymous
Not applicable
0 Likes
Message 5 of 5

Anonymous
Not applicable

 

Pozdrav!

 

Lijepo je vidjeti da postoji na ovom forumu neko i sa "naših" prostora :-)!

 

Htio sam dodati na model terena koji se sastoji od SubDMesh objekta

transparentnost.

 

Ta mogućnost postoji tek od verzije AutoCAD 2011.

0 Likes