VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ole itemtype how to change it from embedded to static

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
769 Views, 0 Replies

Ole itemtype how to change it from embedded to static

Hi,

 

I have a few drawing that have Excel sheets embeded to it.

I would like to change the type from embedded to static.

I have made this code and I am not getting any error.

the oleitemtype doesn't seem to be readonly.

But the type don't change! What is the trick to do this?

 

 

 

For i = 0 To ThisDrawing.ModelSpace.Count - 1

    Debug.Print ThisDrawing.ModelSpace.Item(i).ObjectName
    If ThisDrawing.ModelSpace.Item(i).ObjectName = "AcDbOle2Frame" Then
            Set oOle = ThisDrawing.ModelSpace.Item(i)
           
            oOle.OleItemType = acOTStatic
            Debug.Print oOle.OleItemType
            Debug.Print oOle.OleSourceApp
            oOle.Update
    End If
Next i

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report