Author Topic: copy layer properties ObjectDBX  (Read 1953 times)

0 Members and 1 Guest are viewing this topic.

Humbertogo

  • Guest
copy layer properties ObjectDBX
« on: August 28, 2007, 02:44:52 AM »
is there a way to copy layer with  properties from one doc Viewport to another using
ObjectDBX
« Last Edit: August 28, 2007, 02:51:07 AM by Humbertogo »

Bryco

  • Water Moccasin
  • Posts: 1883
Re: copy layer properties ObjectDBX
« Reply #1 on: August 28, 2007, 09:59:45 AM »
Humbertogo, I'm not sure about your question.
If you want to freeze layers in a viewport you add xdata tp the viewport. So it's possible.

Humbertogo

  • Guest
Re: copy layer properties ObjectDBX
« Reply #2 on: August 28, 2007, 10:22:00 AM »
in my program i importing a  Layout using ObjectDBX
but i need to know witch layer are freeze in the viewport
(Layout)

Bryco

  • Water Moccasin
  • Posts: 1883
Re: copy layer properties ObjectDBX
« Reply #3 on: August 29, 2007, 11:13:53 AM »
This is trickier than I thougth it would be.
I think your are better making the pviewport then add the xdata that trying to copy the pviewport

Code: [Select]
Sub CopyVpLayerStates(Vp As AcadPViewport, NewVp As AcadPViewport, NewDoc As AcadDocument)

    Dim Doc As AcadDocument
    Dim Xd, Xv
 
    Vp.GetXData "Acad", Xd, Xv
    NewVp.SetXData Xd, Xv
    NewVp.Update
    NewDoc.MSpace = False
    NewVp.Display (False)
    NewVp.Display (True)
    NewDoc.MSpace = True
   
End Sub