|
error 91 in swdim.fullname
hi!
i have created an assembly and i want to have in c the name of the dimension mark. i have these equations in the equation manager:
"d3@matrizl 7140070" = 256
"d1@matrizl 7140070" = 300
"d3@matrizl6117008" = 180
"d1@matrizl6117008" = 203
but in the 4st equation, when b="d1@matrizl6117008" i have an error 91 in line c = swdim.fullname because swdim=nothing. why i have an error only in this dimension mark?
thank you very much!
my code:
sub mates(model as sldworks.modeldoc2)
dim sweqnmgr as sldworks.equationmgr
dim swdim as sldworks.dimension
set sweqnmgr = model.getequationmgr
dim ncount as integer, i as integer, ipos as integer
dim a as string, b as string, c as string
ncount = sweqnmgr.getcount
for i = 0 to ncount - 1
a = sweqnmgr.equation(i)
ipos = instr(1, a, "=")
b = left(a, ipos - 2)
set swdim = model.parameter(b)
' when b="<A href="mailto:d1@matrizl6117008"-->swdim">d1@matrizl6117008"-->swdim =nothing-->error 91
c = swdim.fullname'error 91
next i
end sub
quick |
|