Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
.NET
»
Topic:
How to Set Paperspace Viewport Styles?
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: How to Set Paperspace Viewport Styles? (Read 1455 times)
0 Members and 1 Guest are viewing this topic.
nobody
Swamp Rat
Posts: 861
.net stuff
How to Set Paperspace Viewport Styles?
«
on:
January 24, 2017, 04:21:13 PM »
I'm trying to change all my paperspace viewports to 2dwireframe, and am not certain why this isn't working. Anyone know?
Code - C#:
[Select]
Database database
=
HostApplicationServices
.
WorkingDatabase
;
using
(
Transaction transaction
=
database
.
TransactionManager
.
StartTransaction
(
)
)
{
ObjectIdCollection vports
=
database
.
GetViewports
(
true
)
;
foreach
(
ObjectId id
in
vports
)
{
DBDictionary dict
=
(
DBDictionary
)
transaction
.
GetObject
(
database
.
VisualStyleDictionaryId
, OpenMode
.
ForRead
)
;
Viewport myvp
=
(
Viewport
)
id
.
GetObject
(
OpenMode
.
ForWrite
)
;
myvp
.
VisualStyleId
=
dict
.
GetAt
(
"2dwireframe"
)
;
}
transaction
.
Commit
(
)
;
}
Logged
nobody
Swamp Rat
Posts: 861
.net stuff
Re: How to Set Paperspace Viewport Styles?
«
Reply #1 on:
January 24, 2017, 04:32:46 PM »
Nevermind. It is changing the style but the ucs icon remains in 3d (graphically at least).
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
.NET
»
Topic:
How to Set Paperspace Viewport Styles?