Try following codes. Add more hole cases as needed.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swFeat As SldWorks.Feature
Dim HoleFeatData As SldWorks.WizardHoleFeatureData2
Sub Main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc...
I suspect that you have used ChatGPT or similar AI tool to create this macro. And hence is the reason for the errors.
Change
Set swConfig = swConfMgr.GetConfigurationByName(configValue)
to
Set swConfig = swModel.GetConfigurationByName(configValue)
Change...
Here you can find list of learning resources https://tinyurl.com/DeepakGuptaAPI
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
You can activate the add-in yourself, check this post https://www.driveworks.co.uk/blog/how-to-activate-driveworksxpress/
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
You can use DriveWorksXpress (free add-in inside SW) to do the same without the need for the macro. Just create a master model and then set that up with DWX. And when you want to create a new model, enter/pick the desired value and new model will be created. You can have drawing generated as...
You can grab the codes from this macro and use as needed https://www.linkedin.com/posts/gupta9665_solidworks-macro-solidworks-activity-7011944730934566912-xLQg
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
Have you tried changing the decimal place setting in the drawing document properties?
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
There is no direct tool AFAIK. Look into using Assembly visualization tool OR Assembly BOM to get the details of material for each part. And then you can export to excel. Further you can excel tables/formulas to calculate the percentage.
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022...
I understand the situation and issues for not able to share the files. But can you try to make a similar dummy assembly?
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
This looks strange. Will it be possible for your to share the complete assembly to check? OR you can send the issue to your reseller and let their team resolve it.
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
Try toggling the plane creation method and then change back to coincident. And then select the desired entity.
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
PDM will need an additional serial number. SO ask your VAR to provide you the same. And do note that there is no additional cost for it.
You can also get the serial number from customer portal under my products. Though customer portal is under migration to 3DSywm but you can still try.
And...
Tools > Options > External References and select "Allow multiple contexts for parts when editing in assembly"
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
These icons are for touch mode. You can turn them off under View menu.
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
You can check the codes from this post https://eng-tips.com/viewthread.cfm?qid=169890
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
You can use a macro to export the selected dimension to a text/excel file and use from there.
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
Check and make sure you have Instant3d turned off (it is on feature toolbar, a yellow scale with arrow icon)
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
@Hermen, sorry for delayed response. I've checked your files using the codes posted above and result is correct i.e. files are exporting at correct scale. So there seem to be some setting issue in your DXF reader. To check this, open the exported files in edrawings OR back in SW and check the...
@Hermen, in that case either you drawing template scale or units are not correct. Can you share one file and your drawing template to check?
Deepak Gupta
SOLIDWORKS Champion and Expert
SW 2022 SP0.0, 2021 SP5.1 and 2020 SP5.0
Boxer's SOLIDWORKS Blog
Create a new drawing (blank without any sheet format or any tables/notes) and set the scale to 1:1 in that drawing. Now save that drawing as default template undet Tools > Options > Default Template and your parts should export to correct scale.
Deepak Gupta
SOLIDWORKS Champion and Expert
SW...