Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

new to add-in's - inventor API to debugg line by line in dot net

4 REPLIES 4
Reply
Message 1 of 5
Mark_Wigan
860 Views, 4 Replies

new to add-in's - inventor API to debugg line by line in dot net

i am brand new to visual studio and dot net but it looks like fun as i am porting over my years of handy API macros into dot net. it is my goal to make some add-ins for my inventor 2013...

 

i am probably doing something wrong but coming from generating and debugging my code inside inventor, to now working in visual studio i have hit a wall... some quick background:

-i have the 2013 SDK development files installed which allows me to access the latest add-in template for visual studio just fine,

- i can see the add-in (skeleton framework of what i made from the vs inventor add-in template) successfully load into inventor when i deploy the addin and dll as advised by the readme inside the documentation,

- i have began porting over some of my macros, probably about 90% through getting the first macro setup in dot net,

- i am trying to test / debug to see if i am getting closer to making this work, but

- i have not yet made a ribbon button for the add-in

- i am reading brian ekins documentations from mod the machine, and going through 'my first plug in' trying to piece all of this together.

- am reading the programming help accessed from inventor help files

 

but from where i am right now, i see that from inside visual studio i can attach my solution to an inventor process to hopefully allow me to step into /  run / debug, but i cannot see it step into and allow me to proceed one line at a time like i was used to in inventors API window. i loved the ability to step one line at a time as i was learning to make macros.

 

but sadly i cannot really figure it out as i have so many other add-in creation challenges (and related errors) right now learning this stuff.  i am kind of snowed under so i thought i would ask this debug question at least see if i am doing it all wrong or if it can be done once i fix all my other errors?

 

any information is greatly welcomed.

 

ps-   the best thing i can do i think is to try to get someones working example of a simple but complete add-in solution or vb project in dot net and see if i am able to get it to debug or use some of it as a template to then try to make my own add-ins work. sorry if it is rude to ask for this, i am just thinking that i have a long & painful road ahead if i continue to progress at the rate i am currently moving! (i am still trying to do my design work while doing this add-in attempt at the same time)

 

many thanks as always.

best regards,
- Mark

(Kudo or Tag if helpful - in case it also helps others)

PDSU 2020 Windows 10, 64bit.

4 REPLIES 4
Message 2 of 5

Hi Mark,

 

With an AddIn, you need to to set in your project properties/debug the "Start External Program" option and browse to the Inventor.exe, then press debug, it will launch Inventor from VS and by placing breakpoints in your code you will be able to stop the execution and run step by step from there (press F10 or from VS menu).

 

debug.png

 

We have many AddIn project sample that you can refer to, for example below are links from the ADN Manufacturing DevBlog posts that contain sample:

 

http://adndevblog.typepad.com/manufacturing/2012/07/connecting-an-inventor-addin-from-an-external-ap...

 

http://adndevblog.typepad.com/manufacturing/2012/05/customizing-radialmarkingmenu-and-linearmarkingm...

 

Also on the Autodesk Exchange store you can find free plug-ins from ADN that are provided with full source code. The Screenshot plugin is one of them and is written in VB.Net:

 

http://apps.exchange.autodesk.com/INVNTOR/en/Detail/Index?id=autodesk.appstore.exchange.autodesk.com...

 

I hope it helps.

 

Regards,

Philippe.

 

 

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
Mark_Wigan
in reply to: Mark_Wigan

many thanks Philippe!

best regards,
- Mark

(Kudo or Tag if helpful - in case it also helps others)

PDSU 2020 Windows 10, 64bit.

Message 4 of 5

Spoiler
 

Hi Philippe

 

 

Thanks for the information

 

Is this option available in VS 2012 Express - or do you need thefull version

 

 

thanks

 

Wayne

Message 5 of 5

It's possible to run an another exe in debug mode with Express, however you have to somehow hack it around.

 

The following post illustrates how to do this, it's a similar approach with Express 2012:

 

http://through-the-interface.typepad.com/through_the_interface/2006/07/debugging_using.html

 

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report