I would like to have help with a project. And it is possible to have a window that pops up when I open my assembly. Inside she asks me for information (e.g. length, width, ep, height etc...), which directly modifies my equations of the same name. I don't know anything about macro or VBA writing. Tell me if this is possible in the real world.
I find that the macro brings a lot of heaviness for a problem that can be managed simply via the custom settings of the part.
Of course there is no pop-up ... but I should be curious enough to know its use. Once a room is defined, you don't try to redefine all the parameters every time you open it. If?
Hello And thank you for this information. This project is part of an optimization of my resource in my company. More concretely, has created identical bins but differ in form and at the same time be faster.
I have a hard time grasping the context here. a lot of data is missing... and the logic behind the ones you provide escapes me.
If I understand correctly (or rather what I think I'm guessing roughly), a bin is an assembly (containing + wheels + handles + ...), whose dimensions, positions, and others are driven by equations, and you want to create different sizes each time this same assembly is opened, and save it as a separate document for each size? (??)
If there is a recurrence of bin sizes, it is better to create a typical room of your bin, then launch a macro that displays a settings popup and adds a new configuration with the values entered by the user?
A single file with multiple configurations.
PS:
The optimization between an automatic launch and a manual launch is exactly 1 click; It's clearly not worth the risk of problematizing the opening of a document. Do you create 1 new different bin every 5 seconds?
So let's go all out; If you want independent parts of different sizes, a macro that dissects the formatted name of the document to automatically adjust the editable values, and you would just need to open the file to create it! It would be enough to make a copy of it and rename it with the target values.
Not clear?
Suppose a document named " BAC_L500W300D300 ". When it is opened, the macro retrieves this name to extract the length 500, the width 300, and the depth 300, then assigns these values to the equations/dimensions, reconstructs, saves the document and maybe even closes it. All this with just a rename and a single double-click to open it.
You can do better: prompt on Windows (with DOS or the new thing that came out with W10) to enter the dimensions, copy the file by renaming it and start opening the said file in SW.
Sorry to answer you so late. To answer your questions. The file already exists but you see, to modify a dimension I have to go to the Equations. The problem is that I don't want anyone (in my company) to go and modify the equations (from the file to Pack and Go) for fear of damaging the file. It's a time saver because it's not me who performs the action and not just a click story.
So, if it's " just " a matter of not getting into the equations, I come back to the custom settings that allow you not to bring out the big artillery of macros!
The user fills in the custom parameters (->custom parameter file) and your equations will draw from them the data necessary to make them. In addition, it's very practical, because you can recall these values on your drawing in notes/tables/etc in an " automatic " way if necessary.
you can also manage them for all your configurations or for specific configurations, with differentiated values... while always calling the same property in your formulas
I saw this video on YouTube, which allows you to edit an assembly file via an Excel. But I wanted to know if it is possible to modify an equation with this process.
@Salomon_Lutete ; With this type of process (replacement of values via a macro and Excel), you might as well let Excel manage the equations itself... it does it much easier than Solidworks... and only push the results into 3D.