Message 1 of 3
Get and set layerstate to viewport
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear everybody.
What I want is user to select a viewport, then get that viewports layer-settings (vpfreeze, vpcolor, vplineweight), and set it to all viewports in the drawing with width smaller 250.
this is the code i got:
ThisDrawing.Utility.GetEntity VP, a, "Select source-viewport:"
''''NEED TO GET LAYERSTATE HERE
For Each aLayout In ThisDrawing.Layouts
If aLayout.Name <> "Model" Then
For Each aEntity In aLayout.Block
If TypeOf aEntity Is AcadPViewport Then
aEntity.GetBoundingBox minpunt, maxpunt
If maxpunt(0) - minpunt(0) < 250 Then
''''NEED TO SET LAYERSTATE HERE
End If
enidf
Next
End If
Next
Anyone who can get me going with getting and setting the layerstate? Cause I can't figure out how to do this or where to start.
Any help would be appreciated.