Macro Swood Extension of the Crude

Hello
I am looking to create or recover a macro that can retrieve all the parts of an assembly considered as panels by SWOOD. The goal is then to apply a material extension to them (which can be modified manually in the edit panel command).
If this is possible or someone can put me on a track, it would help me greatly!
Kind regards

@cfao_4

Happy to welcome you to the forum. :grinning:

I hope that we can help you solve some problems, but also that we can benefit from your knowledge and experience.

For your problem, you should know that Swood is an Ad-On of solidworks.

So doing macros, we have very strong colleagues who can help you.

The problem is that very little to say no one uses Swood on the forum and therefore we don't know well the links between SW and Swood.

The risk is that a macro made under SW does not work paired with Swood.

Let's wait a little while for our macro kings to tell you more!

Kind regards

PS: are you under maintenance for SWOOD

Can you post a piece of file (use File ==> pack and go all in a ZIP file) so that our colleagues can see what they can do

2 Likes

Hello
Thank you for your answer!
CaissonBasSansClamex.zip (10.4 MB)
Yes we have SWOOD CAM maintenance but the Visiativ support we can claim is only for " technical problems" we were told, that's why I'm posting my question here even if I know that swood is not yet very widespread here.

Kind regards

By the way, the hot line could at least respond if the macro is to be created in SW or in Swood.

One of our "forum macro specialists" should tell you the specific questions to ask Visiativ support.

It would make you a lot of progress!

Kind regards

1 Like

For me, attachment future version so impossible to open and understand the need.
How does SWOOD differentiate the panel from another element (different property?)
If this is the case, you just have to go through (browse) the elements of an assembly to check if panel or not with this function:
https://help.solidworks.com/2021/english/api/sldworksapi/traverse_assembly_at_component_level_example_vb.htm
To add the material extension, either it's an Sw coast that is editable from the APIs (which I think).
Or it's a function specific to SWOOD and in this case does SWOOD have APIs?
Beginning of answer:

2 Likes

Hello
Thank you for your time! Differentiation, whether panel or not, does not seem to be the most complicated to implement with these new answers.
But what bothers me is that I don't know well about solidworks APIs, and even less about swood, so to verify your hypothesis I still have to find the right API.
But as far as the learning macro is concerned, I've already tried but without results.
Kind regards

For me, everything is doable by the Solidworks APIs, you just have to find the modifications made by SWOOD when you check applied a material extension (additional function or configuration of the part and one or more dimensions.) And then we may be able to guide you.
And if it's too complicated for you, maybe ask Efficad the developer for a possible improvement for later or ask them for the shot of this development, or to Visiativ he melts dev but not for free.

1 Like

Hello, I just had the hotline on the phone and they don't know what this changing parameter is called given I quote "that the length and width on swood depend on the grain of the material, whether it is vertical or horizontal." The macro is therefore likely to be very heavy so they only refer me to the salespeople, which is understandable.
But I don't admit defeat!
How do you make the parameters of a panel appear to compare the before and after? Innocently I started with an analysis of the custom properties of swood but changing them here doesn't change the part...
Kind regards

Make your part without the additional parameters, you make a backup of this part that you modify with the different possibilities and you look at the difference in the properties and in the tree of Solidworks as well as in the functions.

If you can see the additions that SWOOD realizes maybe it's playable, otherwise it's a bit of a waste of time unfortunately.

To see the parameters of a program such as SWOOD you have to do reverse engineering I think and that's another job.
If the SWOOD program is compiled, it is impossible to know the code behind each function, hence the only possibility is to analyze the changes made to the part.

1 Like

Hello @cfao_4 ,

Looking at the build tree of the SWOOD components, three characteristics appear:

  • A set of 9 blueprints framing the origin of SolidWorks.
    It is impossible to rely on this structure to identify a panel: their names are not systematic, and a function sometimes slips into the list.

  • Functions that cannot be edited in the construction tree (" MacroFeature "), which correspond to machining specific to furniture hardware: hinges, trunnions, etc.
    Unfortunately, a shelf or a furniture bottom has no machining, so no specific " MacroFeature " function for these panels...
    image

  • A group of custom properties relating to panel dimensions, materials, and finishes. The name of these properties has a prefix " SWOODCP ", whose ending " CP " seems to be specific to the panels: point to be validated.
    image

The joined macro explores the build tree of the active assembly, identifies each part, and the name of its custom properties. If the string " SWOODCP " appears, the part is assumed to be a SWOOD panel, it is added to the output list.
Detailed output of properties possible, on the screen or as a text file in Excel CSV format, with separator " ;  ".

Kind regards.

IdentificationPanels.swp (112 KB)

2 Likes

Hello

Remarkable analysis! And proposal for a solution

Kind regards

Hello
Thank you for this detailed answer, indeed a panel is identified by its specific custom properties, the efficad dev do so via the one that defines the material of the part: SWOODCP_CoreStockMaterial (the other parts being edited differently by solidworks directly). The custom properties that define the extension of the stock are as follows:
SWOODCP_CoreStockOffsetLeft (or Right/Front/Back)
But by modifying them in their table, it does not change anything in the panel and the value returns to the way it was before when it is reopened. So they are driven but by where?
Kind regards

Hello
I don't have SWOOD, nor its documentation and I'm stuck on a riddle:
What do the SWOODCP_CoreStockOffsetLeft and following parameters represent?.. If it is a question of length reserves for machining, what you call the extension of the workpiece, they have no reason to change the finished shape of the panel.
If my interpretation is correct, it is a "Raw Panel" configuration of the part that could use these values by representing its state before machining.

On the other hand, I observe that the changes I make to these properties of a panel are well taken into account and saved, whether interactively in the table or programmatically.

2 Likes

Hello
These parameters define the extension of the material, i.e. the raw form of the panel, so the finished shape is not affected but the raw shape should.

I admit that I didn't do the extended report test since when I change these settings in the custom properties they don't change anything in the edit panel function. (attached is a screenshot when I set them back to 0)

Edit. After attempting, it doesn't change anything about the machining either

This function of representing the stock seems to be specific to SWOOD, which I do not have.
Sorry I can't do more...
Kind regards

1 Like

Thank you all for taking the time to answer me!
Kind regards