fixo 发表于 2022-7-6 23:30:05

我没有这台电脑的工作,但我使用了第1页上的编码

suwan116 发表于 2022-7-6 23:34:16

fixo 发表于 2022-7-6 23:39:06

After his block was inserted you could be to store its handle, say in Textbox field, that is easiest
in the current program

Set myBlock = ThisDrawing.PaperSpace.InsertBlock(blockInsert, dwgName, 1, 1, 1, 0)dim handStr as stringhandStr=myBlock.HandleTextBox1.Text=handStr
Then if you need to insert new one instead
you could be able to rich at old block using
HandleToObject method (see Help)
 
Don't remember exactly maybe something like

Dim oldObj as AcadObject ' or AcadEntity perhapsSet oldObj=Thisdrawing.HandleToObject(Trim(TextBox1.Text))oldObj.DeleteSet oldObj=Nothing
 
~'J'~

suwan116 发表于 2022-7-6 23:39:36

I used this bit of code to auto show layout1
 
With ThisDrawing
.ActiveLayout = .Layouts.Item("Layout1")
.Application.Application.GetAcadState
End With
 
However im struggling with the update code.

haizang 发表于 2022-7-6 23:47:01

I am new to this and have exactly the same application. Can you show your complete work here, starting with creating your combobox to inserting seletion to the drawing.
 
 
Thanks
 

suwan116 发表于 2022-7-6 23:47:21

i dont have the work on this computer, but i used the coding on page 1
页: 1 [2]
查看完整版本: 打开组合框中的dwg文件