Product : Engine, Version : 4.0.4.1023, ArticleID : 41023271

HowTo : The dot (.) inside blocknames cause trouble

Article41023271
TypeHowTo
ProductEngine
Version4.0.4.1023
Date Added10/13/2003
Submitted byMichael R Kappel
Keywords

Subject

The dot (.) inside blocknames cause trouble

Summary

The dot (.) inside blocknames cause trouble


Dim blk As vdBlock, cur_icon$
    Dim ins As vdInsert
    cur_icon$ = "D:\Documents and Settings\Administrator.MATT\Desktop\c48\test.bmp"
    
    Set blk = VDStd1.ActiveDocument.Blocks.Add("MATT.BMP", Array(0, 0))
    blk.AddImage cur_icon$, Array(0, 0), 1
    blk.Update
    
    Set ins = VDStd1.ActiveDocument.Entities.InsertBlock(Array(10, 10), "MATT.BMP", 20, 20, 0)
    ins.Invalidate
    VDStd1.CommandAction.Zoom "E", 0, 0

Solution

Set the BlockName property again after after InsertBlock method.

   Set ins = VDStd1.ActiveDocument.Entities.InsertBlock(Array(10, 10), "MATT.BMP", 20, 20, 0)

    ins.BlockName = "MATT.BMP" 
    ins.Invalidate
    VDStd1.CommandAction.Zoom "E", 0, 0