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: 

iLogic insert ACAD to 3d sketch

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
446 Views, 5 Replies

iLogic insert ACAD to 3d sketch

Anonymous
Not applicable

Does anyone have iLogic code that will insert a AutoCAD drawing file (.dwg) into a 3D sketch? The drawing being imported has wires that extend into 3 dimensions. I was able to bring the drawing in as a 2D sketch using the Translator, but I cannot seem to figure out a way to bring it into the 3D sketch. Thank you!

0 Likes

iLogic insert ACAD to 3d sketch

Does anyone have iLogic code that will insert a AutoCAD drawing file (.dwg) into a 3D sketch? The drawing being imported has wires that extend into 3 dimensions. I was able to bring the drawing in as a 2D sketch using the Translator, but I cannot seem to figure out a way to bring it into the 3D sketch. Thank you!

Labels (5)
5 REPLIES 5
Message 2 of 6
bhavik4244
in reply to: Anonymous

bhavik4244
Collaborator
Collaborator

@Anonymous 

 

you  may try this one, however, you might need to twick it as per your need.

 

https://forums.autodesk.com/t5/inventor-forum/ilogic-rule-to-insert-acad-to-sketch/td-p/6282683

 

 


Bhavik Suthar
0 Likes

@Anonymous 

 

you  may try this one, however, you might need to twick it as per your need.

 

https://forums.autodesk.com/t5/inventor-forum/ilogic-rule-to-insert-acad-to-sketch/td-p/6282683

 

 


Bhavik Suthar
Message 3 of 6
Anonymous
in reply to: bhavik4244

Anonymous
Not applicable

@bhavik4244 wrote:

@Anonymous 

 

you  may try this one, however, you might need to twick it as per your need.

 

https://forums.autodesk.com/t5/inventor-forum/ilogic-rule-to-insert-acad-to-sketch/td-p/6282683

 

 


Hi @bhavik4244 

I’ve looked at that post and tried modifying the planar sketch to Sketch3D and using an add Sketch3D function instead of adding the 2D sketch, however that code results in an error and an import of AutoCAD file as a drawing. Do you have any suggestions? I can paste the code I’ve been running that has that result if it would be helpful.

0 Likes


@bhavik4244 wrote:

@Anonymous 

 

you  may try this one, however, you might need to twick it as per your need.

 

https://forums.autodesk.com/t5/inventor-forum/ilogic-rule-to-insert-acad-to-sketch/td-p/6282683

 

 


Hi @bhavik4244 

I’ve looked at that post and tried modifying the planar sketch to Sketch3D and using an add Sketch3D function instead of adding the 2D sketch, however that code results in an error and an import of AutoCAD file as a drawing. Do you have any suggestions? I can paste the code I’ve been running that has that result if it would be helpful.

Message 4 of 6
bhavik4244
in reply to: Anonymous

bhavik4244
Collaborator
Collaborator

@Anonymous 

 

Can you share the error messege? it would probably gives us an idea where we're lacking.


Bhavik Suthar
0 Likes

@Anonymous 

 

Can you share the error messege? it would probably gives us an idea where we're lacking.


Bhavik Suthar
Message 5 of 6
Anonymous
in reply to: bhavik4244

Anonymous
Not applicable

Hi @bhavik4244,

 

This is the error message I'm receiving:

Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.PartDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{29F0D463-C114-11D2-B77F-0060B0F159EF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

 

And this is the text under the "More Info" tab:

System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.PartDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{29F0D463-C114-11D2-B77F-0060B0F159EF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at ThisRule.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

 

Please let me know your thoughts, thank you again for the help!

0 Likes

Hi @bhavik4244,

 

This is the error message I'm receiving:

Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.PartDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{29F0D463-C114-11D2-B77F-0060B0F159EF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

 

And this is the text under the "More Info" tab:

System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'Inventor.PartDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{29F0D463-C114-11D2-B77F-0060B0F159EF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at ThisRule.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

 

Please let me know your thoughts, thank you again for the help!

Tags (1)
Message 6 of 6
bhavik4244
in reply to: Anonymous

bhavik4244
Collaborator
Collaborator

@Anonymous 

 

@JarFu 

Can you please have a look?


Bhavik Suthar
0 Likes

@Anonymous 

 

@JarFu 

Can you please have a look?


Bhavik Suthar

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

Post to forums  

Autodesk Design & Make Report