dear all,
I want to select a point and a line, and insert a dimension of these two in my drawing. All by macro. the only problem is, when my part changes, the location of the point in the macro (which i recorded) is changed. Now the macro uses SelectByID2, is there a different approach possible to fix this problem?
boolstatus = Part.Extension.SelectByID2("Point1@Sketch10@normal_clip-5@Drawing View5", "EXTSKETCHPOINT", 0.1582319027728, 0, 0, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("Line4@Bend-Lines1@normal_clip-5@Drawing View5", "EXTSKETCHSEGMENT", 0.1033074543237, -0.008726670281275, 0, True, 0, Nothing, 0)
Set myDisplayDim = Part.AddDimension2(0.1206719476083, 0.0319999999998, 0)
the numbers after "EXTSKETCHPOINT" are the location of the point (but they change from time to time)
And use a drawing, which i allready made, isn't a possibility, because the differences are to big for the dimensions, so they won't stick to the relations. And the sheet sizes change. that's the reason why i build up the drawing up from scratch. Everything works out really good, only the dimensions of the flattened view causes a lot of headache
thnx!
SolidworksApi macros