.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hatch with transparency

4 REPLIES 4
Reply
Message 1 of 5
danny.boy.1
769 Views, 4 Replies

Hatch with transparency

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
4 REPLIES 4
Message 2 of 5
kob4lt
in reply to: danny.boy.1

Sto ti zelis tocno napravit?

Message 3 of 5
Jeffrey_H
in reply to: kob4lt

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();
            }           
        }

 

 

You can also find your answers @ TheSwamp
Message 4 of 5
Jeffrey_H
in reply to: Jeffrey_H
Message 5 of 5
danny.boy.1
in reply to: kob4lt

 

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost