Results 1 to 7 of 7

Thread: Get the Xdata from the Viewport using ObjectDBX

  1. #1
    Member
    Join Date
    2015-12
    Posts
    20
    Login to Give a bone
    0

    Default Get the Xdata from the Viewport using ObjectDBX

    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

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Get the Xdata from the Viewport using ObjectDBX

    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.

  3. #3
    Member
    Join Date
    2015-12
    Posts
    20
    Login to Give a bone
    0

    Default Re: Get the Xdata from the Viewport using ObjectDBX

    Do you have any some example?
    Thanks

  4. #4
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Get the Xdata from the Viewport using ObjectDBX

    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.

  5. #5
    Member
    Join Date
    2015-12
    Posts
    20
    Login to Give a bone
    0

    Default Re: Get the Xdata from the Viewport using ObjectDBX

    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)

  6. #6
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Get the Xdata from the Viewport using ObjectDBX

    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.

  7. #7
    Member
    Join Date
    2015-12
    Posts
    20
    Login to Give a bone
    0

    Default Re: Get the Xdata from the Viewport using ObjectDBX

    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.

Similar Threads

  1. OBJECTDBX and VB
    By raj_thapar2003 in forum VBA/COM Interop
    Replies: 4
    Last Post: 2018-02-15, 01:36 PM
  2. Replies: 2
    Last Post: 2017-08-09, 01:04 PM
  3. Replies: 6
    Last Post: 2015-08-31, 04:05 PM
  4. C# and ObjectDBX?
    By KevinBarnett in forum Dot Net API
    Replies: 1
    Last Post: 2006-09-19, 06:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •