Message 1 of 6
Adding GroundConstraint to more than one entity (simultaneously)

Not applicable
01-29-2009
05:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have a couple of SketchPoints in a Sketch and I all of them shall get the groundConstraint via VBA.
Of course I could use any loop in VBA and assign point by point the groundConstraint. But I want a solution wihtout using a loop.
What I tried to do is save all the points in a sketchPoints-Collection and then using GeometricConstraints.AddGround(PointCollection).
Well, unfortunately this doesn't work. Reading the help-File it seems that "GeometricConstraints.AddGround" can only handle on entity.
But when you are using the UI and select all the points with the mouse and then click on the butoon "GroundConstraint" then all the points get this constraint.
Maybe anyone has an idea how this could be done in VBA adn could help me.
Thanks in advance
Greetings Dennis
I have a couple of SketchPoints in a Sketch and I all of them shall get the groundConstraint via VBA.
Of course I could use any loop in VBA and assign point by point the groundConstraint. But I want a solution wihtout using a loop.
What I tried to do is save all the points in a sketchPoints-Collection and then using GeometricConstraints.AddGround(PointCollection).
Well, unfortunately this doesn't work. Reading the help-File it seems that "GeometricConstraints.AddGround" can only handle on entity.
But when you are using the UI and select all the points with the mouse and then click on the butoon "GroundConstraint" then all the points get this constraint.
Maybe anyone has an idea how this could be done in VBA adn could help me.
Thanks in advance
Greetings Dennis