Is there a way to Get the Xdata from the Viewport using ObjectDBX
Get the layer section position and find out if the layer is already frozen
|
Is there a way to Get the Xdata from the Viewport using ObjectDBX
Get the layer section position and find out if the layer is already frozen
Normal API methods ought to work.
R. Robert Bell
Design Technology Manager
Stantec
Opinions expressed are mine alone and do not reflect the views of Stantec.
Do you have any some example?
Thanks
There is an example on the GetXdata method in the help files.
R. Robert Bell
Design Technology Manager
Stantec
Opinions expressed are mine alone and do not reflect the views of Stantec.
Sorry but i can not find any example in the help files using ObjectDBX
in my program i importing a Layout using ObjectDBX
but i need to know witch layer are freeze in the viewport
(Layout)
There is no difference in the method just because you are using ObjectDBX. The same code will work, once you have your PViewport object. It is immaterial how you get the object.
R. Robert Bell
Design Technology Manager
Stantec
Opinions expressed are mine alone and do not reflect the views of Stantec.
thanks RobertB
Code:Call oDbxViewport.GetXData("Acad", varXdataType, varXdataValue) ' Resize the Xdata Dim oSize As Long oSize = UBound(varXdataType) - LBound(varXdataType) - 1 ReDim Preserve varXdataType(oSize) As Integer ReDim Preserve varXdataValue(oSize) As Variant ' Create new viewport Set oNewViewPort = ThisDrawing.PaperSpace.AddPViewport(oDbxViewport.Center, oDbxViewport.Width, oDbxViewport.Height) Call oNewViewPort.SetXData(varXdataType, varXdataValue)
Last edited by Opie; 2007-09-04 at 02:16 AM. Reason: [code] tags added.