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: 

Change .OBJ export settings

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
w.poortinga
339 Views, 3 Replies

Change .OBJ export settings

Hi,

 

Im trying to export my .iam to .obj format using iLogic. My goal is to export multiple instances of the .iam to .obj with parameter changes in between (I have 3 parameters with 2 to 3 possible values for each parameter, and I want to export with different combinations of those values).

 

I managed to export using a simple line: 

 

ThisDoc.Document.SaveAs(ThisDoc.PathAndFileName(False) + ".obj", True)

However, the settings are wrong. It exports to millimeters while I need it to export to meters (/1000). 

 

I found the following solution but I can't see to get it to work:  

 

https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/fixing-quot-high-quot-resolution-exp...

 

I'm getting an error on the last line (catastrophic error).

 

My question:

 

Is it possible to change the default .obj export settings somewhere in Inventor? This way I'd be able to simply use that one line to export to .obj. 

If not, can anyone help me getting that other code to work?

3 REPLIES 3
Message 2 of 4

What line are you getting an error exactly? The SaveCopyAs line or the ChangeExtension line?

Contact me for custom app development info@basautomationservices.com. Follow below links to view my Inventor appstore apps.

Free apps: Smart Leader | Part Visibility Utility | Property Editor | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle


Message 3 of 4

The SaveCopyAs line. That is, when I remove it I don't get an error.

I get the following error:

 

wpoortinga_0-1649402982558.png

 

Message 4 of 4
w.poortinga
in reply to: w.poortinga

The user (hero) above fixed my problem (fixed the code) to make this work. See original thread with the code here: https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/fixing-quot-high-quot-resolution-exp...

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

Post to forums  

Autodesk Design & Make Report