Principiante87
Guest
Hello, everyone!
I am continuing my thesis inherent in autocad customization.. great part of the work has already been done, but with expedients that have little to do with autocad.. I have resorted to my most trivial programming capabilities. I am, at this point, asking you a question.
I should add some blocks attributes, in case these are lacking.. The code I wrote for the extrapolation of existing attributes is as follows (and for now it works
:
dim u as acadblockreference
dim p as string
dim myattrref as autocad.acadattributereference
for each u in thisdrawing.blocks(0)
♪
= 0
c = u.name
if u.hasattributes then
x = (u.getattributes())
set myattrref = x(i)
p = p & " & myattrref.textstring
i = i + 1
end if
end with
♪
I should now proceed with the following logic: if u.hasattribute= false, then add an attribute (which is a string) to that block. Can someone help me? Thank you so much in advance to all!
I am continuing my thesis inherent in autocad customization.. great part of the work has already been done, but with expedients that have little to do with autocad.. I have resorted to my most trivial programming capabilities. I am, at this point, asking you a question.
I should add some blocks attributes, in case these are lacking.. The code I wrote for the extrapolation of existing attributes is as follows (and for now it works
dim u as acadblockreference
dim p as string
dim myattrref as autocad.acadattributereference
for each u in thisdrawing.blocks(0)
♪
= 0
c = u.name
if u.hasattributes then
x = (u.getattributes())
set myattrref = x(i)
p = p & " & myattrref.textstring
i = i + 1
end if
end with
♪
I should now proceed with the following logic: if u.hasattribute= false, then add an attribute (which is a string) to that block. Can someone help me? Thank you so much in advance to all!