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

macro coordinate points

  • Thread starter Thread starter erf
  • Start date Start date

erf

Guest
Hello, guys.
I'm doing my master thesis and I need an info: Is there a working macro that extracts the coordinates of sketches (3d and not)?
I found some on the internet but, or they don't work, or I can't make them work. . .
I press that if I had time I would do it myself, but the thesis embraces so many topics that learning the visual basic to create this macro is really impossible. . .
Thank you for your help!
 
1) Right-click on a gray area of the sw toolbar and activate the macro toolbar
2) new macro and crown the sub stream of the topic signaled by you
3) select the sketch and start the macro

you must have installed excel.
If you want to save the macro and create a button to call it back whenever you want.
 
I had already done the procedure you said but it didn't work. Can I ask you if the macro I posted works for you?
 
Hi, I'll attach you a macro that returns the coordinates of the points contained in a sketch.
you must a priori before launching the macro select in the tree a sketch and then throw the macro.
returns a video list of the unique id of each point and the coordinates and the name of the selected sketch
works both in the environment and in the environment together.
this macro I use it as a starting base to develop other macros, because with the name of the component+name of the sketch+id of the point, I can associate at that point anything.
I'll give you an example:
long ago I created a macro of assembly that selecting a face of a set of laminated holes, it associated with the selected component the same-measure thread holes (m8 with m8 etc.), binding the points of the lamature sketch with that of the threads.
Now I don't have to worry about having associated the right thread or that it is not bound, with a huge gain of time.
then moving a lamatura the thread goes after him.
the macros contained in the manual bees in themselves do not say anything, but processing data and associating with other modules, you can do fantastic things.
wishes for your thesis
 
I'm sorry to break, but following your instructions, he tells me
"please compile, impossible to find the project or library"
What is this error due to?
 
Unfortunately I always have the same mistake... maybe the problem is my version of solidworks (I have 2010)?
 
returns a video list of the unique id of each point and the coordinates and the name of the selected sketch
Thanks jenuary for this macro, very interesting:finger:
I want to ask you something:
If instead of a sketch on a plane I have a curve in space 3d, 3d sketch or curve inserted by excel, or a curve inserted through free points, I can still get information about the points that compose it (point coordinates) and with what function if possible.
Thank you.
 
Sorry, dragon, but does the macro work for you?
it works with small changes.
do so:
tools-> macro->modification
Selecting the macro
selections the sketch in sw
go to microsoft visual basic
run macro or f5
at this point does it return to you what error?

Let me know.

greetings
 
Unfortunately, I always have the same mistake by doing your procedure:
"unable compilation error to find the project or library"
 
I have a situation similar to that of the first photo, in which there are rumours with written "manca etc etc" but how do I solve this problem? I mean, they're files I have to download, voices I have to poke. . ?
 

Forum statistics

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

Members online

No members online now.
Back
Top