Hello
Already nice improvement of the forum, I see that it's evolving in the right direction here!
I have a request from a colleague who wants me to improve my macro that allows me to insert a component, the ' released ' put an origin/point coincidence and fix it.
Problem in some cases we have repositioning to do, so to make our life easier and gain a few ' clicks ' he asks me to put in state remove the constraint before fixing my part.
I did a lot of research and auto recording of macro but nothing came out. I can't select my constraint, nor put a constraint in a deleted state
'suppression du "Fixe" sur la première pièce boolstatus = swModel.Extension.SelectByID2(CompInsert, "COMPONENT", 0, 0, 0, False, 0, Nothing, 0) swModel.UnfixComponent 'Selection du composant et ajout contrainte coincident origine/origine swModel.ClearSelection2 True boolstatus = swModel.Extension.SelectByID2(FirstSelection, "EXTSKETCHPOINT", 0, 0, 0, False, 1, Nothing, 0) boolstatus = swModel.Extension.SelectByID2(SecondSelection, "COORDSYS", 0, 0, 0, True, 1, Nothing, 0) Set swMate = swModel.AddMate5(20, -1, False, 0, 0.001, 0.001, 0.001, 0.001, 0.5235987755983, 0.5235987755983, 0.5235987755983, False, False, 0, longstatus) 'Remettre la pièce "Fixe" boolstatus = swModel.Extension.SelectByID2(CompInsert, "COMPONENT", 0, 0, 0, False, 0, Nothing, 0) swModel.FixComponent swModel.ClearSelection2 True
While waiting for your answers, I wish you all happy holidays.