AnsweredAssumed Answered

Insert a block to correct location on a sheet

Question asked by Xing Chen on Nov 11, 2019
Latest reply on Nov 11, 2019 by Xing Chen

I used mathutility to create a mathpoint. Then I use this mathpoint to insert a block onto a sheet. If I selected the sheet by clicking an empty area on a sheet, then the macro runs fine. The block will show in correct location. However, if I click any view before running the macro,  the block will be inserted into the view, the mathpoint is created into the view.

 

I tried to use  following code to select the sheet first, but it didn’t work.

    Set swDraw = swApp.ActiveDoc

    Set swSheet = swDraw.GetCurrentSheet

boolstatus = swModel.Extension.SelectByID2(swSheet.GetName, "SHEET", 0, 0, 0, False, 0, Nothing, 0)

 

Any suggestion?

Outcomes