- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Does anyone how to make a layer or an entity transparant within a viewport?
I figured out the following code found in:
It gives an error at New Autodesk.AutoCAD.Colors.Transparency(127)
Using transactie AsTransaction = DWG.TransactionManager.StartTransaction
Dim Layertable AsLayerTable = DWG.LayerTableId.GetObject(OpenMode.ForRead)
Dim VP AsViewport = transactie.GetObject(Doc.Editor.CurrentViewportObjectId, OpenMode.ForWrite)
Dim LVPO AsLayerViewportProperties
ForEach LayerID In Layertable
Dim LaagTabelRec AsLayerTableRecord = transactie.GetObject(LayerID, OpenMode.ForRead)
LVPO = LaagTabelRec.GetViewportOverrides(VP.Id)
LVPO.Transparency = New Autodesk.AutoCAD.Colors.Transparency(127)
Next
transactie.Commit()
EndUsing
Solved! Go to Solution.