Macro solidworks?

Good evening everyone, 

I would like to know what a macro is, and what it is for

I downloaded macros from the lynkoa site but I insert them and I don't understand the window that opens to edit them

Which parameter should be entered?

Sincerely, Nicolas

2 Likes

Wow! A vast subject! Could you elaborate? Which macro did you recover?

1 Like

Good luck lol

Lucas seems to touch well in macros and in addition he has made some tutorials on lynkoa that can be used.

 

2 Likes

So I downloaded the 2 (attachment), as well as "activate all configuration" in formatl .html

So it's .swp files but an error message that no program can read it appears

However, once opened in solidworks with macro tool

A window appears and I would like to have information about these features

 


sans_titre_1.jpg

This window appears (see attachment)


sans_titre_2.jpg

It's very simple, open a room and press Tools/Macro/run. In the box that opens, you may need to change the type of files to be opened to select swb or swp.

 

Note that this type of file can also be sent to you for 3D instead of STEP or IGES. Festo offers this for its cylinders, for example. As a result, you don't have dead bodies but real construction trees.

 

Edit: Of course, you must first have saved the .swp or .swb file on your computer.

2 Likes

But what's the point?

It is used in particular to do repetitive operations automatically, to save time, or even operations that cannot be done manually.

 

The macro you are talking about seems, as its name suggests, to activate all configurations. Without them, you have to activate them one by one. If you have a hundred of them on a heavy assembly, by hand you spend a day on it, with this macro, you launch it in the evening when you leave work and the next morning it's done.

1 Like

For Feature Masse, it is the MyCADServices ancestor of the SW center of gravity that can be found today as a base. Before SW13, this feature did not exist. So I think @jmsavoyat is at the origin of this macro. You make a 3D sketch with just 1 point. You launch the macro and select this point. You validate and the macro will reposition the point at the center of gravity. The action that must have been done is that the macro took the coordinates of the center of gravity and filled them in on the point of your 3D sketch! This is very useful when you are drawing a rudder pedal for example.

1 Like

@ benoit

and in case I want to create one, (see attachment)

What can I enter as a parameter?

What are important?

 


sans_titre_1.jpg

Here, the question is much too vague! The pros will certainly tell you (@Lucas and @jfaradon) before throwing yourself headlong into the code, you must already know what you want to do. It's also about design: you don't start drawing in 3D without having scribbled a crobard on a piece of paper. Macros are the same.

 

So what do you want to do with this macro?

 

There are some tutorials there: http://www.lynkoa.com/search/Macro?type[0]=tutorial you can take a look.

3 Likes

First of all, know what it's for (and you told me thank you)

then have information to be able to use it if necessary

That's all

So in my opinion, this question is closed. If you have a macro "project", it's better to redo a question describing it for more readability and to avoid it going in all directions.

 

Now, be careful not to try to do everything with macros. SolidWorks is sufficient in many cases without resorting to that.

 

So to sum up, look at the tutorials if there is one that talks about the basics of macros. And if you have a particular need, write it down first. From there, we will be able to see which solution to move towards.

1 Like

to my tutorials!!

I don't understand. I thought I had answered your question?

2 Likes

Duplicate

1 Like

@ Nicolas 

+1 for the question

-1 for your answer that doesn't mean anything

 

Edit I thought that benoit had given the answers 

2 Likes

Hello Nicolas,

The correct answer should usually be taken from the answers given by the contributors. I do think that @Benoit has largely contributed to guiding you in your research. It would have been normal to assign him the correct answer. That's the principle! Think about it next time!

Kind regards

4 Likes

sorry for @benoit

it's true that these answers have guided me, but I still can't use or create my macro, 

So I downloaded others and I rated and commented on them (which also gives points)

So I'll ask a more specific question next time

Regards nicolas

1 Like

@nicolas it's not time the points it's the recognition of the help. Moreover, the best answer is at the top of the list so imagine that those who are looking for the same subject as you when they consult your question can miss the relevant answers which, as you say, are we directing 

Make an edit of your answer and make at least one plagiarism of Benoit's answer as a quote 

For this time he won't blame you I'm sure. Laughing out loud

4 Likes