How would I get started transforming a 3D solidworks model in real-time given a matrix input

Say I am given 3D matrices corresponding to different components in a Solidworks model (e.g. via .txt/excel/labview), is there a way to feed that data in real time to corresponding components in Solidworks?

I understand this is possible with the Solidworks motion add-in however would I be able to achieve something similar with just my Solidworks Professional subscription?

SolidworksGeneral
Answers 3
AT
AT 2018-05-18 Best Answer

You can apply 4x4 transformation matrix (Transformation matrix - Wikipedia) to components via API: 2017 SOLIDWORKS API Help - Transform2 Property (IComponent2)

If you give me some sample matrix I might be able to create an example for you.

JM
JM 2018-05-19

To start with a basic example, say you want to translate a cube from its position with the matrix:
1  0  0  1
0  1  0  2
0  0  0  3
0  0  0  1

So is doing this tangible without Solidworks motion or Solidworks simulation (just using Solidworks professional)
and would I be able to get solidworks to read the file containing the matrix every X units of time (e.g. every 1 second)
to check for any updates in its position

AT
AT 2018-05-21

Hi Jozef,

Please take a look at this example: Load Components Presentation Transforms From CSV File . It reads the CSV file with matrix like this:

And applies this to components as per the file. The components are moved in space with a help of presentation transform (i.e. it will work regardless the mates you have defined)

I will add another example which shows how you can do the real-time animation so you can modify them as per your needs.

Thanks,
Artem

comment imagecomment image