Inventor General Discussion

Inventor General Discussion

Reply
Member
m.smith
Posts: 4
Registered: ‎11-25-2012
Message 1 of 6 (303 Views)

Can I return the distance between two snapped points with vba or ilogic?

303 Views, 5 Replies
11-25-2012 01:44 PM

I'm using Inventor 2013 and would like to create a dialog box requesting the parameters for a simple rectangle and be able to snap in an assembly to get the distance for each parameter (width and depth) of the shape. Is this possible with either VBA or iLogic? I just need how to get the value...I can handle the dialog box. Thanks.

*Expert Elite*
Mark_Wigan
Posts: 460
Registered: ‎03-07-2006
Message 2 of 6 (266 Views)

Re: Can I return the distance between two snapped points with vba or ilogic?

11-27-2012 04:46 AM in reply to: m.smith

to obtain better feedback you would be better to post in the inventor customisation forum to get more info on VBA and API topics.

 

not sure what you mean when you say " able to snap in an assembly"...

 

 

best regards,
- Mark

(Kudo or Tag if Solved - it may help others)

PDSU 2015 Windows 8.1, 64bit.

Member
m.smith
Posts: 4
Registered: ‎11-25-2012
Message 3 of 6 (253 Views)

Re: Can I return the distance between two snapped points with vba or ilogic?

11-27-2012 11:36 AM in reply to: m.smith

Mark,

 

Thanks for the suggestion. By snap in assy I mean simply that I could select in the model the vertices I need the distance between for my ipart.

*Expert Elite*
Mark_Wigan
Posts: 460
Registered: ‎03-07-2006
Message 4 of 6 (224 Views)

Re: Can I return the distance between two snapped points with vba or ilogic?

12-01-2012 06:06 AM in reply to: m.smith

i do recall some code i used once... perhaps it is still around, if you search the forum for "the vba measure toolmeasure tool" or something like that.

 

i will see if i still have it and let you know. it was a useful macro before inventor improved its own measuring functionality. i think it had a LOT of coding in it from memory!

 

(around the early years of 2000 i probably saw it).

 

we should probably move this to the inventor customisation part of the forum...ps-

best regards,
- Mark

(Kudo or Tag if Solved - it may help others)

PDSU 2015 Windows 8.1, 64bit.

*Expert Elite*
Mark_Wigan
Posts: 460
Registered: ‎03-07-2006
Message 5 of 6 (215 Views)

Re: Can I return the distance between two snapped points with vba or ilogic?

12-01-2012 06:46 AM in reply to: Mark_Wigan

just did a search and found this... i think it is (was) the one i was referring to.

 

doesn't look like we will find it without further searching in the customer files area noted in the following thread;

 

http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/The-Ruler-file-moved/m-p/754723/highli...

 

 

best regards,
- Mark

(Kudo or Tag if Solved - it may help others)

PDSU 2015 Windows 8.1, 64bit.

Member
m.smith
Posts: 4
Registered: ‎11-25-2012
Message 6 of 6 (178 Views)

Re: Can I return the distance between two snapped points with vba or ilogic?

12-05-2012 03:55 AM in reply to: m.smith

Thanks, Mark! I will pursue your link. I have found a piece of code that allows me to make the snaps and show the value in the measuring tool, just as you manually can. I am beginning to get into iLogic and just need to figure out how to return the measurement value from the tool. If I knew the name of that value when it appears onscreen, I think I could bring it into the code then apply it to the iPart. I guess all I need to do is explore the tool properties more.

 

Just trying to accelerate my learning curve! I'm implementing and adapting Inventor for the US in collaboration with our Belgian partners, so I'm working the candle from both ends and the middle. Fun but tons of stuff of all sorts to do at once!

 

Thanks for the help.

 

BTW, the code that sets up the tool and allows me to click in the model is fairly brief. I can post it if you'd like to see it. I can do that when I get back to the office tomorrow.

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.