Article | 60000597 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 8/8/2008 |
Submitted by | Jani Forssell |
Keywords |
Private Sub MakeAllEmbeded()
Dim W_ImgDef As VectorDraw_Professional.vdImageDef
Dim i As Long
For i = 0 To doc.images.Count - 1
Set W_ImgDef = doc.images.Item(i)
If Not (W_ImgDef.IsEmbeded) Then
W_ImgDef.InternalSetBytes W_ImgDef.InternalGetBytes()
End If
Next i
End Sub
Private Sub vDraw_AfterAddEntity(ByVal Entity As VDrawI5.vdPrimary)
'add the VectorDraw.Professional.TLB in the project's references
If Entity.Type = "VDIMAGE" Then
Dim img As VDrawI5.vdImage
Dim ImgDef As VDrawI5.vdImageDef
Dim W_ImgDef As VectorDraw_Professional.vdImageDef
Set img = Entity
Set ImgDef = vDraw.ActiveDocument.images.FindName(img.ImageFileName)
Set W_ImgDef = ImgDef.WrapperObject
If Not (W_ImgDef.IsEmbeded) Then
W_ImgDef.InternalSetBytes W_ImgDef.InternalGetBytes()
End If
End If
End Sub