AnsweredAssumed Answered

how to move the part

Question asked by Fly Chen on Feb 13, 2019
Latest reply on Feb 17, 2019 by Fly Chen

Dear Sir/Madam,

Hello, I want to use the VBA to make the part to move or rotate in the space. I use the SolidWorks API Help, to search the key word “CreateTransform”, and see the example “Use Presentation Transforms to Move Component Example (VBA)”. The example codes can make the part move, but there are some problems.

Firstly, the code “swAssy.EnablePresentation = False” make the part back to where we started when all moves end. So, how we make the part still in its last moving position? Secondly, when I delete the code “swAssy.EnablePresentation = False”, the part can in its last moving position, but the SolidWorks’ interface cannot be operated.

I shall appreciate hearing from you and thank you for your help sincerely.

Yours Truly,

Chen

Outcomes