Search found 52 matches

by mihkov
Sun Jan 12, 2025 8:29 am
Forum: How To Questions
Topic: How to control the display of Annotations in the model
Replies: 1
Views: 242

How to control the display of Annotations in the model

When I create and work with the model, I have the Instant2D mode enabled, and if I select a sketch or feature in the design tree, then all the dimensions of this sketch or feature become visible in the graphics window. ! Temporarily ! until I click in an empty field or select an operation. After tha...
by mihkov
Fri Jan 10, 2025 10:48 am
Forum: How To Questions
Topic: Scaling body through equations
Replies: 15
Views: 840

Re: Scaling body through equations

Simple answer: Yes. Set the scaling up as global variables and then have a feature at the end of your design tree for scaling. Access via dimension does not work. "Scale1" = 1.22 "D1@Scale1"=1.22 sc3.png Access via configuration parameters does not work. sc4.png Access via desig...
by mihkov
Thu Jan 09, 2025 1:35 pm
Forum: How To Questions
Topic: Scaling body through equations
Replies: 15
Views: 840

Re: Scaling body through equations

I have figured out a work around though, the following two videos cover it. A few improvements to the gristle variant (I think) 1. Create an auxiliary model for each profile that we want to use. 2. In the model, create a boss by sections: From the original profile with a chord of 1000 mm to one red...
by mihkov
Thu Jan 09, 2025 12:27 pm
Forum: How To Questions
Topic: Scaling body through equations
Replies: 15
Views: 840

Re: Scaling body through equations

Dwight wrote: Tue Jan 07, 2025 2:49 pm For convenience, you can create the model with that dimension equal to 1.
I don't understand you. Could you explain it a little more fully using the wing profile as an example?
by mihkov
Thu Jan 09, 2025 12:25 pm
Forum: How To Questions
Topic: Scaling body through equations
Replies: 15
Views: 840

Re: Scaling body through equations

I've recently been through that exercise. I was modelling a rowing outrigger and the client supplied an aero section to use. I ended up having to manually rescale the sections when tweaking the chord lengths of the outrigger. I have figured out a work around though, the following two videos cover i...
by mihkov
Thu Jan 09, 2025 12:16 pm
Forum: How To Questions
Topic: Scaling body through equations
Replies: 15
Views: 840

Re: Scaling body through equations

Petertha wrote: Thu Jan 09, 2025 10:51 am Specific to airfoils, I went through some of these issues in a different life, at that time using Rhino. Of note
This is an interesting experiment, but not on topic. The airfoils is given only as an example.
by mihkov
Tue Jan 07, 2025 10:47 am
Forum: How To Questions
Topic: Scaling body through equations
Replies: 15
Views: 840

Re: Scaling body through equations

So my answer is only with a design table (see below) (as of SW 2022 SP4) Thank you for not suggesting to write a macro))) A specific example. Let's get gears, or even better a wing profile - a wing profile is just such a poorly parameterized surface. It is easier for an engineer to take points and ...
by mihkov
Tue Jan 07, 2025 10:09 am
Forum: How To Questions
Topic: Scaling body through equations
Replies: 15
Views: 840

Scaling body through equations

Most likely the question has already been asked, but I couldn't find it. Is it possible to scale a body or surface without entering the scaling factor manually, but by calculating it with an equation?
Well, the same question about Blocks in sketches.
scale.jpg
scale.jpg (9.31 KiB) Viewed 840 times
by mihkov
Wed Oct 02, 2024 5:41 am
Forum: API
Topic: DXF tester for CNC cutting. Direct interaction with DXF without libraries (VBA)
Replies: 0
Views: 555

DXF tester for CNC cutting. Direct interaction with DXF without libraries (VBA)

The task was to make a simple tester of DXF files after Solidworks for laser cutting. It is necessary to check obvious errors: Intersection of contours, overlapping of contours, free end of contour (openness). The macro was not originally intended as a separate one, it was intended as a set of modul...
by mihkov
Wed Oct 02, 2024 2:16 am
Forum: API
Topic: Google Drive and SWP files
Replies: 1
Views: 633

Re: Google Drive and SWP files

Yes, even if you manage to upload the SWP file to Google Drive. It will not sync later, this is due to the fact that it "happily" coincided that this extension is used for some Google service files. I don't remember exactly what it was about, but I found a thread with such a question on th...
by mihkov
Thu Jun 27, 2024 5:12 am
Forum: API
Topic: How do I know that you are FLAT-PATTERN?
Replies: 23
Views: 9049

Re: How do I know that you are FLAT-PATTERN?

One more question about sheet metal and VBA API deployments. What is the best way to programmatically get the dependent configuration with the FLAT-PATTERN state of the sheet metal part. I have a method that works, but it is very crude, based on passing incorrect parameters to an old function that t...
by mihkov
Mon Jun 10, 2024 11:23 am
Forum: API
Topic: Get Template Anchor Points
Replies: 2
Views: 1053

Re: Get Template Anchor Points

TableAnchor Property (ISheet) (https://help.solidworks.com/2024/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.ISheet~TableAnchor.html) -> Position Property (ITableAnchor) (https://help.solidworks.com/2024/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWor...
by mihkov
Sun Jun 09, 2024 4:16 am
Forum: API
Topic: Get Template Anchor Points
Replies: 2
Views: 1053

Get Template Anchor Points

I want to insert a block into a drawing so that the block falls into one of the anchor points for the tables. For example, to the anchor point for "Holes table anchor1". How can I get these pre-arranged points on a drawing template? I thought about inserting the block itself using: MakeSke...
by mihkov
Fri May 24, 2024 3:00 am
Forum: SW General
Topic: Direct connection CutList Property to the Custom Property
Replies: 9
Views: 3537

Re: Direct connection CutList Property to the Custom Property

We are talking around each other. Let's look at it a different way. If you could do what you are asking, how would you use it? In other words, why do you want to be able to do this? If only I could do it. Then for parts with one sheet body, or with one construct body, I would do: I made a direct li...
by mihkov
Wed May 22, 2024 7:18 am
Forum: SW General
Topic: Direct connection CutList Property to the Custom Property
Replies: 9
Views: 3537

Re: Direct connection CutList Property to the Custom Property

The ambiguity is that there is no restriction on the number of bodies in a configuration. If I have a part file with one configuration and two bodies (and therefore two cut list items), and I give each body a different value for a the same user defined cut list property, just what do you expect to ...
by mihkov
Wed May 22, 2024 2:56 am
Forum: API
Topic: Browse Folder
Topic: Browse Folder
Replies: 13
Views: 8127

Re: Browse Folder

Other option might be to use excel API to show the browse folder window which will behave the way you need. Option to select a folder in a convenient window using the Excel API in Solidworks VBA. I'll leave this here. excelLib.jpg Dim xlApp As Excel.Application 'Dim xlWB As Excel.Workbook Dim Folde...
by mihkov
Wed May 22, 2024 1:45 am
Forum: SW General
Topic: Direct connection CutList Property to the Custom Property
Replies: 9
Views: 3537

Re: Direct connection CutList Property to the Custom Property

Edit: Now that I think of it, there could be an expression added to the source code to say that If more then 2 bodies then do not transfer properties to the top level. This is exactly what I implement using the API. I need to decide what the Engineer does: - Makes a regular sheet metal part with on...
by mihkov
Wed May 22, 2024 1:37 am
Forum: SW General
Topic: Direct connection CutList Property to the Custom Property
Replies: 9
Views: 3537

Re: Direct connection CutList Property to the Custom Property

What should SOLIDWORKS do when two cutlist items have the same user defined property? Which one gets to populate the file property? What you are asking for doesn't make sense. Apparently I don't understand something. Because it makes sense to me. In Solidworks there cannot be two bodies with the sa...
by mihkov
Tue May 21, 2024 2:12 pm
Forum: SW General
Topic: Direct connection CutList Property to the Custom Property
Replies: 9
Views: 3537

Direct connection CutList Property to the Custom Property

I ask for a clear answer! As of May 2024, no version of the Solidworks software product can establish a direct relationship between a user property value from a cutlist and a user property? (without add-ons and without API) I have determined that only expressions starting with "SW-" can be...
by mihkov
Tue Feb 06, 2024 8:23 am
Forum: API
Topic: WasResolved from Get6 (CustomPropertyManager)
Replies: 4
Views: 1768

Re: WasResolved from Get6 (CustomPropertyManager)

Stefan Sterk wrote: Tue Jan 30, 2024 4:24 pm I also tried to imitated these conditions, and also got only TRUE values for WasResolved, since the value cleary wasn't as is shown in the attached image below. Using SOLIDWORKS 2023.

Well, what can I say: it was so, it is so, and it will be so forever and ever.
by mihkov
Tue Jan 30, 2024 9:57 am
Forum: API
Topic: WasResolved from Get6 (CustomPropertyManager)
Replies: 4
Views: 1768

Re: WasResolved from Get6 (CustomPropertyManager)

The remarks section on the help page explain the scenarios where the resolved value can return false https://help.solidworks.com/2018/english/api/sldworksapi/solidworks.interop.sldworks~solidworks.interop.sldworks.icustompropertymanager~get6.html I imitated these conditions and got WasResolved=True
by mihkov
Fri Jan 26, 2024 4:32 am
Forum: API
Topic: WasResolved from Get6 (CustomPropertyManager)
Replies: 4
Views: 1768

WasResolved from Get6 (CustomPropertyManager)

How does Solidworks software decide which expression could be evaluated and which could not? We are talking about the function Get6(Get5) of reading user properties through the CustomPropertyManager interface value = instance.Get6(FieldName, UseCached, ValOut, ResolvedValOut, WasResolved, LinkToPro...
by mihkov
Fri Dec 22, 2023 12:27 pm
Forum: API
Topic: How do I know that you are FLAT-PATTERN?
Replies: 23
Views: 9049

Re: How do I know that you are FLAT-PATTERN?

It's not worse. It could be more complexity than necessary for a lot of applications but if it works in your program the way it is then I'd leave it in there the way it is. I did some tests, maybe they are not complete, I could not do other situations except for very trivial ones (when the part is ...
by mihkov
Sun Dec 17, 2023 2:38 am
Forum: API
Topic: how to get 3D coordinates of a sketch segment in the global coordinate system?
Replies: 1
Views: 1527

how to get 3D coordinates of a sketch segment in the global coordinate system?

Initial parameters: There is a test part file PRUG_test_dim_on_SM-FP . It has a sheet metal rectangle located in space not orthogonal to any of the sides - by accident. Why sheet metal? To have a Boundary_Box sketch. Why a rectangle? To make the Boundary_Box sketch coincide with the edge of the rect...
by mihkov
Wed Dec 06, 2023 12:44 pm
Forum: API
Topic: Beautiful dimensions of width and height on Boundary Box Sketch in the drawing view of Flat-pattern
Replies: 1
Views: 1590

Beautiful dimensions of width and height on Boundary Box Sketch in the drawing view of Flat-pattern

Task: There is a part with sheet metal. For it, a drawing is created with one view of Flat-pattern. For this view, the Sketch of the Boundary Box is displayed. Next, we define 2 perpendicular elements among the elements of this sketch (or simply by the names Line1 and Line4, at least that way). and ...
by mihkov
Wed Dec 06, 2023 11:20 am
Forum: API
Topic: How do I know that you are FLAT-PATTERN?
Replies: 23
Views: 9049

Re: How do I know that you are FLAT-PATTERN?

You mentioned that you were running a macro that looked at all parts in an assembly and exported the DXF flat pattern if it was sheet metal, so it doesn't sound unimportant to you. Others were also discussing methods for exporting the DXF flat pattern so I described my method that is independent of...
by mihkov
Wed Dec 06, 2023 10:59 am
Forum: API
Topic: How do I know that you are FLAT-PATTERN?
Replies: 23
Views: 9049

Re: How do I know that you are FLAT-PATTERN?

I guess most of us assumed you are trying to save a dxf of the flat from the model. Is that not what you're trying to do? If you are trying to automate saving dxfs of flats, that has little (possibly nothing) to do with flat configurations. The automatically generated "[parentFormedCofigName]S...
by mihkov
Sat Dec 02, 2023 3:18 pm
Forum: API
Topic: How do I know that you are FLAT-PATTERN?
Replies: 23
Views: 9049

Re: How do I know that you are FLAT-PATTERN?

The way I've done it before is the following with my formed or flat configuration open in SW: - I open a blank drawing template (no border, blocks, etc.) - I use IDrawingDoc::CreateFlatPatternViewFromModelView3() to add my flat pattern view to my drawing. Note that this adds it for the specified co...
by mihkov
Sat Nov 04, 2023 11:33 am
Forum: API
Topic: ListExternalFileReferences and ReplaceReferencedDocument without Opening
Replies: 1
Views: 1255

ListExternalFileReferences and ReplaceReferencedDocument without Opening

Can I get external links of a part without opening it, as the Solidworks application does with: File-Open-Links. I want to replace a substring in the file name of a part that is referenced by the part being opened using the "swApp.ReplaceReferencedDocument" function. It allows you to chang...
by mihkov
Fri Oct 13, 2023 8:46 am
Forum: API
Topic: How do I know that you are FLAT-PATTERN?
Replies: 23
Views: 9049

Re: How do I know that you are FLAT-PATTERN?

If you have the option "Automatically populate view pallet with views" checked, it will create the config for you when you start a drawing of the sheetmetal part. I know about this feature for happy users. When we create a drawing for a sheet metal part, a flat pattern sub-configuration i...
by mihkov
Fri Oct 13, 2023 8:40 am
Forum: API
Topic: How do I know that you are FLAT-PATTERN?
Replies: 23
Views: 9049

Re: How do I know that you are FLAT-PATTERN?

What is it you are trying to do with the automatically generated "SM-FLAT-PATTERN" config? The gist is this: the user runs the macro directly from the Assembly. Next, all components of the parts are searched at all levels, and if the part is made of sheet metal, then the DXF flat pattern ...
by mihkov
Thu Oct 12, 2023 5:58 am
Forum: API
Topic: How do I know that you are FLAT-PATTERN?
Replies: 23
Views: 9049

How do I know that you are FLAT-PATTERN?

SM-FLAT-PATTERN 02_Derived_Configuration.jpg How does the FLAT-PATTERN configuration work? Does it have any identifiers other than the keyword in the name "SM-FLAT-PATTERN"? How can I find out this configuration FLAT-PATTERN, other than a substring in the name? This substring (SM-FLAT-PAT...
by mihkov
Wed Oct 11, 2023 2:37 pm
Forum: API
Topic: What is the image size for the macro button?
Replies: 16
Views: 5758

Re: What is the image size for the macro button?

It would be lovely if you would share some of your icons, they seem really well made and I'm sure a lot of people would be happy to use them and also find them "collected" in a single place such as a thread on a forum. Not all of my icons are 20x20 pixels, some are smaller. They are in th...
by mihkov
Wed Oct 11, 2023 3:27 am
Forum: API
Topic: Multi Export Assembly and Parts with Structure
Replies: 2
Views: 1494

Re: Multi Export Assembly and Parts with Structure

Any Ideas on how to fix that other that rearranging the whole String? A similar Macro would help too if you have seen something like that already. Stefan Sterk option is the best. You'll have to track down duplicates now. There is an alternative option: you can get the component file name from the ...
by mihkov
Wed Oct 11, 2023 3:14 am
Forum: API
Topic: What is the image size for the macro button?
Replies: 16
Views: 5758

Re: What is the image size for the macro button?

Hello Mikhov, can you describe how and with what software you create the icons? It so happens that I use Photoshop. This is too much for making icons - but it is convenient for me. Somewhere on the Internet I found a canvas with most of the Solidworks icons on a white background. And I just take th...
by mihkov
Sat Sep 30, 2023 4:33 am
Forum: SW General
Topic: Flexible fastening element: rivet. How to do it right.
Replies: 6
Views: 1924

Re: Flexible fastening element: rivet. How to do it right.

So here is your enhancement request.. While there are no improvements, keep from me a life hack on how to place hex fasteners in hex holes. (To be honest, the fastener has a cylindrical concentric surface with a hexagon, but if it didn’t exist we would have created an auxiliary axis). 1. In the ass...
by mihkov
Tue Sep 26, 2023 5:32 am
Forum: SW General
Topic: Flexible fastening element: rivet. How to do it right.
Replies: 6
Views: 1924

Re: Flexible fastening element: rivet. How to do it right.

The result and my conclusion on this problem. Is it possible to make the fastener flexible and insert it into the assembly - Yes. Is it convenient - No. What is the problem: Flexible fasteners, such as rivets and all other deformable fasteners, have working ranges. A "flexible" element is ...
by mihkov
Fri Sep 22, 2023 9:28 am
Forum: SW General
Topic: Flexible fastening element: rivet. How to do it right.
Replies: 6
Views: 1924

Re: Flexible fastening element: rivet. How to do it right.

I don't have a problem with the BOM display and don't want to do it as a flexible subassembly. What I want is a flexible part. For the rivet, this is exactly what she needs. Now I have an option with multiple configurations for each thickness - but there is no beauty in this solution. ffd.jpg I made...
by mihkov
Thu Sep 21, 2023 12:55 pm
Forum: SW General
Topic: Flexible fastening element: rivet. How to do it right.
Replies: 6
Views: 1924

Flexible fastening element: rivet. How to do it right.

I often use rivet nuts. Among them there are the most interesting ones, which have a whole bunch of atypical circumstances. I have 2 main questions: *Attention, we are not talking about adding a Toolbox here, all fasteners are made as parts, they are in a special folder and their IsToolBoxPart prope...
by mihkov
Tue Sep 12, 2023 5:39 pm
Forum: API
Topic: Multiple export of ready-made DXF to JPG miniatures
Replies: 1
Views: 1141

Re: Multiple export of ready-made DXF to JPG miniatures

For example, you can organize multiple selection of DXF files from a folder using the Excel library Dim swApp As SldWorks.SldWorks Sub main() Set swApp = Application.SldWorks Dim FileFromSelect As String ' Dim FilesCompNames() As String ' Tools-Reference... Microsoft Excel xx + Microsoft Office xx ...
by mihkov
Tue Sep 12, 2023 5:09 pm
Forum: API
Topic: Multiple export of ready-made DXF to JPG miniatures
Replies: 1
Views: 1141

Multiple export of ready-made DXF to JPG miniatures

The main part of the macro is the SaveJPGfromDXF function, which receives an array of full paths of DXF files and saves them back as JPG images ( with the specified parameters ). It is understood that the file paths could be obtained in different ways. For example, you can organize multiple selectio...
by mihkov
Wed Sep 06, 2023 1:43 am
Forum: API
Topic: OpenDoc6 works correctly only in debug mode
Replies: 14
Views: 5458

Re: OpenDoc6 works correctly only in debug mode

I also not! I managed to somehow get it to work. I do not understand one point: I have the execution of the macro code to pause until the file is opened. And my event listener doesn't make sense - it listens when things happen anyway. I was not able to simulate non-synchronous code operation. You c...
by mihkov
Tue Sep 05, 2023 5:04 am
Forum: API
Topic: OpenDoc6 works correctly only in debug mode
Replies: 14
Views: 5458

Re: OpenDoc6 works correctly only in debug mode

Hansjoerg wrote: Tue Sep 05, 2023 2:49 am i want to test and understodd test this methode, even though i don't actually need them when i read in with the interconnect interface.
https://blog.codestack.net/handling-solidworks-events

Try to look here. You need to create a class to track events. I haven't been able to make it work.
by mihkov
Fri Sep 01, 2023 12:47 pm
Forum: API
Topic: OpenDoc6 works correctly only in debug mode
Replies: 14
Views: 5458

Re: OpenDoc6 works correctly only in debug mode

The sleep function is definitely an option I will try out. If nothing helps I have to send the problem to the API support. Perhaps tracking events will help? I have not used it, but there are such functions. DSldWorksEvents_DocumentLoadNotify2EventHandler - Post-notifies the user program when a SOL...
by mihkov
Fri Sep 01, 2023 2:34 am
Forum: API
Topic: What is the image size for the macro button?
Replies: 16
Views: 5758

Re: What is the image size for the macro button?

These are 256 x 256 and work for me. Just for information, what does your 256x256 icon look like (upper left) and what does the adapted 20x20 look like (upper right). I love beautiful icons. Bottom left, as if I made myself an STL icon. On the right are examples of icons. It is very convenient to t...
by mihkov
Fri Sep 01, 2023 2:06 am
Forum: API
Topic: What is the image size for the macro button?
Replies: 16
Views: 5758

Re: What is the image size for the macro button?

AlexLachance wrote: Thu Aug 31, 2023 12:48 pm I use 22x22 on most but
I think that your size 22x22 was compressed to 20x20, but it coincided that it was not visually noticeable.
by mihkov
Thu Aug 31, 2023 12:24 pm
Forum: API
Topic: What is the image size for the macro button?
Replies: 16
Views: 5758

Re: What is the image size for the macro button?

Hansjoerg wrote: Thu Aug 31, 2023 6:59 am The Austrian reseller Planet Software recommends bitmaps with 22x21. -> https://www.cad.at/wissen/blog/individu ... ks-makros/
We can check such options.
width 22 height 21
height 21 width 22
ico_size2122.jpg
As you can see, it turns out badly.
by mihkov
Thu Aug 31, 2023 1:54 am
Forum: API
Topic: What is the image size for the macro button?
Replies: 16
Views: 5758

What is the image size for the macro button?

There is no normal specification for image size in pixels for the latest versions of SolidWorks. I did a little experiment and present the results. Ideally, the picture should be in .BMP format, white color will be perceived as a transparent background. Image dimensions should be 20x20 pixels or les...
by mihkov
Fri Aug 11, 2023 7:59 am
Forum: API
Topic: Pack and Go Lite macro
Replies: 6
Views: 2516

Re: Pack and Go Lite macro

Why not use the pack and go API to get the drawings as well. You can also add prefix, suffix if needed and also add other files as well. https://help.solidworks.com/2023/english/api/sldworksapi/pack_and_go_an_assembly_example_vb.htm Perfect example. Didn't see that there is one. swPackAndGo.Include...
by mihkov
Thu Aug 10, 2023 10:47 am
Forum: API
Topic: Pack and Go Lite macro
Replies: 6
Views: 2516

Re: Pack and Go Lite macro

Would it be possible to make a version of this that includes the drawings? This would become very useful if so. I don't know of a function that can find out which drawing an assembly or part file refers to without opening that assembly or part file. It can be assumed that the drawing has exactly th...