PDA

View Full Version : VBA help.



Hickoz_bro
31st May 2008, 03:06 pm
hey guys...


question regarding vba in inventor...

I'm trying to get the co-ordinate points for a leader in inventor, i want the co-ordinates of the leader start point, all nodes, and the finish point.

i'm struggling at the start, i want to get the coodinates of the start point (arrow head) of a leader note. so i tried a whole bunch of things... just an example is below (just an excerpt, not the whole lot).

anyone able to throw me a bone? what should i be doing? i don't expect anyone to give me code, i'd like to learn for myself, but i really don't know where to start....


dim leader1 as leadernotes
Dim l1x As Double

Set l1x = leader1.Item(n).Position.X



Thanks in advance.

Hickoz_bro
2nd Jun 2008, 12:46 pm
okay... i've got the first part done...

i can get the points for leaders and their nodes...

now i just need to know how to acctually create the leader...

so far i have gotten only as far as drawingnotes.drawingleader.add(_______) but i don't know what to put in the brackets... it askes for an object collection, but i have 2 doubles which contain the x and y coordinate for the node...


what am i doing wrong?

hendie
2nd Jun 2008, 01:18 pm
have you checked the help files.
Very few people here have access to inventor, probably even less with VBA experience.
The help files normally have decent examples of things like that

Hickoz_bro
2nd Jun 2008, 03:01 pm
yeah... been searching all i can... but even on the net inventor doesn't appear to be the most covered topic... only a few individuals really do all that much...

Opc 12
2nd Jun 2008, 03:38 pm
Will have a look.

Opc 12
2nd Jun 2008, 03:51 pm
Try this link

http://usa.autodesk.com/adsk/servlet/usearch/results?la=en&nh=10&col=wacjprd&col=usuppprd&siteID=123112&catID=123155&id=2088334&qt=vba&x=0&y=0

Good luck.

Post a pic if you come right.