PostPrivateEvent

PostPrivateEvent

marin_israel
Enthusiast Enthusiast
1,121 Views
6 Replies
Message 1 of 7

PostPrivateEvent

marin_israel
Enthusiast
Enthusiast

Hi all,

 

Where can I found the information I can give to a command in PostPrivateEvent.

 

In my case, I want to set options of "SketchInsertAutoCADFileCmd" but I don't find how.

The goal is to activate "import parametric constraints".

 

How can I do that?

 

Thanks a lot!

 

Israel Marin

 

 

 

 

-------------------------------------
Israël Marin
Programmeur | Programmer
Logiflex
0 Likes
Accepted solutions (1)
1,122 Views
6 Replies
Replies (6)
Message 2 of 7

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

SketchInsertAutoCADFileCmd is the command to import DWG file to a sketch. With Inventor 2013, I used your code in VBA macro and imported a simple DWG. it worls well.  

 

If want you need is another command, you could use the following code to dump the commands name, and search which one is 'import parametric constraints'. 

 

But probably what you meant is the 'constrants' in DWG file? 

 

Sub dumpCommands()

Dim oC As ControlDefinition
Open "c:\command.txt" For Output As #1

For Each oC In ThisApplication.CommandManager.ControlDefinitions
Write #1, "[Display Name]: "; oC.DisplayName & " [Inner Name]: " & oC.InternalName
Next
Close #1
End Sub

0 Likes
Message 3 of 7

marin_israel
Enthusiast
Enthusiast

No, it's not another command, I want to activate the option "import parametric constraints", because if I use my code as is: I receive a sketch without constraint.  I make my DWG in autocad with parametrics constraints.

 

Can I access to option of "SketchInsertAutoCADFileCmd"?

 

Thanks!!

 

Israel Marin

Sherbrooke,Qc,CA

-------------------------------------
Israël Marin
Programmeur | Programmer
Logiflex
0 Likes
Message 4 of 7

xiaodong_liang
Autodesk Support
Autodesk Support
Accepted solution

It is true this looks a problem to me. The constraint is ignored even though the dialog of [Import] has the option checked. In another word, in silent mode, the command does not care the options in the [Import] dialog. I have not an idea at this moment. Sorry.

0 Likes
Message 5 of 7

marin_israel
Enthusiast
Enthusiast

Ok, do you think Autodesk can include this in his future relase (2014)?

 

I'm glad to see that you take time to test my issues.

Thanks

-------------------------------------
Israël Marin
Programmeur | Programmer
Logiflex
0 Likes
Message 6 of 7

xiaodong_liang
Autodesk Support
Autodesk Support

Sorry I have not an information at this moment. In addition, I got that there is no way to use an ini file option here since the workaround (executing SketchInsertAutoCADFileCmd) relies on “SilentOperation” switch and doesn'’t let you modify any default setting.

0 Likes
Message 7 of 7

marin_israel
Enthusiast
Enthusiast

In this case, I will accept the windows to choose the right option.

 

Thanks for the info!

-------------------------------------
Israël Marin
Programmeur | Programmer
Logiflex
0 Likes