CAD/CAM discussion forum > CAD > Block Attributes does not update

Block Attributes does not update

Rank: 1

Ariel B. Serrano

Newbie

posts: 0

Registered: 2010-7-17

Message 1 of 2

 Block Attributes does not update
13-07-2010 08:42 . am | View his/her posts only
Hi Guys im new here & need your help i am in need.


What went wrong:

i made vb6 application and it is running fine with autocad, but when i modify it for zwcad & run it, then zwcad ask me to pick the block with attributes, when i select the block with attributes, then press the enter key, nothigs happen to my blockattributes. In autocad it will update everything in my block attributes.

Please Help me, Here is my code


Private Sub Command1_Click()


Dim varUserInput As Variant




Dim objZCAD As ZwcadApplication




Dim objDOC As ZwcadDocument




Dim objNEWSS As ZwcadSelectionSet




Dim varPT1 As Variant




Dim intGroupCode(0 To 4) As Integer




Dim varGroupValue(0 To 4) As Variant




Dim entTypeConstant As String




Dim I As Integer




Dim attribs As Variant




intGroupCode(0) = -4




varGroupValue(0) = "



intGroupCode(1) = 0




varGroupValue(1) = "insert"




intGroupCode(2) = 0




varGroupValue(2) = "text"




intGroupCode(3) = 0




varGroupValue(3) = "mtext"




intGroupCode(4) = "-4"




varGroupValue(4) = "OR>"









Set objZCAD = GetObject(, "Zwcad.Application")




Set objDOC = objZCAD.ActiveDocument




On Error Resume Next




objDOC.SelectionSets.Item("OWITBL").Delete




Err.Clear




Set objNEWSS = objDOC.SelectionSets.Add("OWITBL")




Form1.Hide




PickOnScreen:




objNEWSS.SelectOnScreen intGroupCode, varGroupValue




For I = 0 To objNEWSS.Count - 1




If entTypeConstant = ZwcadBlockReference Then




attribs = objNEWSS.Item(I).GetAttributes




attribs(0).TextString = Combo1.Text
attribs(1).TextString = Combo2.Text
attribs(2).TextString = Combo3.Text
attribs(3).TextString = Combo4.Text
attribs(4).TextString = Combo5.Text
attribs(5).TextString = Combo6.Text
attribs(6).TextString = Combo7.Text
attribs(7).TextString = Combo8.Text
attribs(8).TextString = Combo9.Text
attribs(9).TextString = Combo10.Text
attribs(10).TextString = Combo11.Text
attribs(11).TextString = Combo12.Text
attribs(12).TextString = Combo13.Text
attribs(13).TextString = Combo14.Text
attribs(14).TextString = Combo15.Text
attribs(15).TextString = Text15.Text
attribs(16).TextString = Text14.Text
attribs(17).TextString = Text13.Text
attribs(18).TextString = Text12.Text
attribs(19).TextString = Text11.Text
attribs(20).TextString = Text10.Text
attribs(21).TextString = Text9.Text
attribs(22).TextString = Text8.Text
attribs(23).TextString = Text7.Text
attribs(24).TextString = Text6.Text
attribs(25).TextString = Text5.Text
attribs(26).TextString = Text4.Text
attribs(27).TextString = Text3.Text
attribs(28).TextString = Text2.Text
attribs(29).TextString = Text1.Text
attribs(30).TextString = Text47.Text
attribs(31).TextString = Text46.Text
attribs(32).TextString = Text45.Text
attribs(33).TextString = Text44.Text
attribs(34).TextString = Text43.Text
attribs(35).TextString = Text42.Text
attribs(36).TextString = Text41.Text
attribs(37).TextString = Text40.Text
attribs(38).TextString = Text39.Text
attribs(39).TextString = Text38.Text
attribs(40).TextString = Text37.Text
attribs(41).TextString = Text36.Text
attribs(42).TextString = Text35.Text
attribs(43).TextString = Text34.Text
attribs(44).TextString = Text33.Text
attribs(45).TextString = Text32.Text




attribs(0).Update
attribs(1).Update
attribs(2).Update
attribs(3).Update
attribs(4).Update
attribs(5).Update
attribs(6).Update
attribs(7).Update
attribs(8).Update
attribs(9).Update
attribs(10).Update
attribs(11).Update
attribs(12).Update
attribs(13).Update
attribs(14).Update
attribs(15).Update
attribs(16).Update
attribs(17).Update
attribs(18).Update
attribs(19).Update
attribs(20).Update
attribs(21).Update
attribs(22).Update
attribs(23).Update
attribs(24).Update
attribs(25).Update
attribs(26).Update
attribs(27).Update
attribs(28).Update
attribs(29).Update
attribs(30).Update
attribs(31).Update
attribs(32).Update
attribs(33).Update
attribs(34).Update
attribs(35).Update
attribs(36).Update
attribs(37).Update
attribs(38).Update
attribs(39).Update
attribs(40).Update
attribs(41).Update
attribs(42).Update
attribs(43).Update
attribs(44).Update
attribs(45).Update









End If
Next




If Not objNEWSS Is Nothing Then objNEWSS.Delete




Form1.Show




End Sub

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 2 of 2

12-01-2011 06:30 . am | View his/her posts only

Hello,
Use google to translate into English.
1) What version of ZWCAD are you?
2) I noticed that the upgrade of ZWCAD ZWCAD 2010 and 2011 for the management attributes in VBA there is no difference. ZWCAD between January 2010 and this latter there are differences.
3) Between January 2010 ZWCAD autocad and apart from the difference of the object and the object Acad ZWCAD, I do not change anything.

I also had to change the function because the management is different from the attributes and upgrade/2011 ZWCAD ZWCAD January 2010 (if I remember correctly).
Definitely ZWCAD ZWCAD 2011 and January 2010.

Watch the help of the developers.
See also