FastFiber
Menu

Toon bijdragen

Deze sectie stelt je in staat om alle bijdragen van dit lid te bekijken. Je kunt alleen de bijdragen zien waar je op dit moment toegang toe hebt.

Toon bijdragen Menu

Berichten - jeans

#1
VBA / Re: vba probleem
zo 05 03 2006, 21:53:25
Gebruik je een userform?
zo ja: userform1.hide

de onderstaande code werkt (bij mij...)

Private Sub CommandButton1_Click()
Dim returnPnt As Variant
   Dim insertionPnt(0 To 2) As Double
   Dim blockRefObj As AcadBlockReference
   Dim textobj As AcadText
   ThisDrawing.Utility.Prompt "Plaats Insertionpoint"
   UserForm1.Hide
   returnPnt = ThisDrawing.Utility.GetPoint
   insertionPnt(0) = returnPnt(0): insertionPnt(1) = returnPnt(1): insertionPnt(2) = returnPnt(2)
   insertionPnt(1) = insertionPnt(1) - 7.5
   
   
   Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, "DUMMY.dwg", 1#, 1#, 1#, 0)
   blockRefObj.Layer = "0"
End Sub
#2
VBA / Re: vba probleem
za 04 03 2006, 19:48:55
Andre

doe het volgende:

Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt,  "DUMMY", 1#, 1#, 1#, 0)

dus "DUMMY" i.p.v. DUMMY.dwg

zorg wel dat de block te vinden is in het path....

Succes