• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

create a series of different holes

Damiano81

Guest
Hello, everyone.

I tried to search on the internet and in the forum but found nothing.
I'm sorry if it was my business and maybe I didn't see it well.

My problem is as follows:
I have to create a set of holes each larger than 0.1 from the previous.

the series is about 200 holes... and make them all by hand individually. . I don't even want to think about it.

Now...can you create a table with hole coordinates and dimensions to import then into solidworks? I practically want to do the opposite of what you do with "Table Drilling".
or is there a way to create such a thing?

It seems absurd that there is no such thing about a mechanical cad program.

I hope some of you know a solution to my problem.

Thank you.
 
then...after sleepless nights doing tests with macros and studying them a little... I solved!

place all the trying maybe to help someone who has my own problem.

the macro that came out to me is as follows:
Code:
[I]dim swapp as object
sub main()

set swapp = application.sldworks
set part = swapp.activedoc
swapp.activedoc.activeview.framestate = 1
dim skpoint as object

open "c:\users\dell1\desktop\tutorial\importare punti\cerchi da tabella\dati.txt" for input as #1
part.sketchmanager.insertsketch true
do while not eof(1)
input #1, x, y, r
set skpoint = part.sketchmanager.createcirclebyradius(x / 1000, y / 1000, 0#, r / 2000)
loop
close #1

part.clearselection2 true
part.sketchmanager.insertsketch true

end sub
[/I]
Surely it can be improved but to be my first macro, for now it was enough that it worked.

the macro practically takes the data from a text file instead of a table....but it's fine equal.

In practice I go on an electronic sheet and create all the data using the various formulas to speed up the insertion.
then select everything, copy and take off in a text file.
the result is:

0 1
5
10 1 2
151
20 1 3
....

so doing I can insert in a sketch all the holes I want, the diameter I want for every single hole without too much effort.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top