i wanted to change Portrait and Landscape using ilogic in Drawings
i have checked this inventor2012object module
but was'nt able to acess it
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
i have atext parameter in drawing as
Sheet_Configure with MUlti-values
a1,a2,a3,a4 etc....
and i have created This Rule
Format:HTML Format
Version:1.0
StartHTML: 165
EndHTML: 40753
StartFragment: 314
EndFragment: 40721
StartSelection: 314
EndSelection: 314
IfSheet_Configure="A1"Then
ActiveSheet.ChangeSize("A1", MoveBorderItems :=True)
ActiveSheet.Border="A1"
ActiveSheet.SetTitleBlock("2_SERIES_A1", "SCALE", "PART NUMBER","MATERIAL 1", "MATERIAL 2","FINISH 1","FINISH 2")
DimobjSPVoice,colVoices
objSPVoice=CreateObject("SAPI.SpVoice")
objSPVoice.Speak(" Sheet has Changed to Two Series A1")
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
ElseIfSheet_Configure="A2"Then
ActiveSheet.ChangeSize("A2", MoveBorderItems :=True)
ActiveSheet.Border="A2"
ActiveSheet.SetTitleBlock("GENERAL", "SCALE", "PART NUMBER","MATERIAL 1", "MATERIAL 2","FINISH 1","FINISH 2")
DimobjSPVoice,colVoices
objSPVoice=CreateObject("SAPI.SpVoice")
objSPVoice.Speak(" Sheet has Changed to Two Series A2")
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
ElseIfSheet_Configure="A3"Then
ActiveSheet.ChangeSize("A3", MoveBorderItems :=True)
ActiveSheet.Border="A3"
ActiveSheet.SetTitleBlock("GENERAL", "SCALE", "PART NUMBER","MATERIAL 1", "MATERIAL 2","FINISH 1","FINISH 2")
DimobjSPVoice,colVoices
objSPVoice=CreateObject("SAPI.SpVoice")
objSPVoice.Speak(" Sheet has Changed to Two Series A3")
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
ElseIfSheet_Configure="A4"Then
ActiveSheet.ChangeSize("A4", MoveBorderItems :=True)
ActiveSheet.Border="A4"
ActiveSheet.SetTitleBlock("GENERAL", "SCALE", "PART NUMBER","MATERIAL 1", "MATERIAL 2","FINISH 1","FINISH 2")
DimobjSPVoice,colVoices
objSPVoice=CreateObject("SAPI.SpVoice")
objSPVoice.Speak(" Sheet has Changed to Two Series A4")
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
ElseIfSheet_Configure="11S_A1"Then
ActiveSheet.ChangeSize("A1", MoveBorderItems :=True)
ActiveSheet.Border="A1"
ActiveSheet.SetTitleBlock("11_SERIES_A1", "SCALE", "PART NUMBER","MATERIAL 1", "MATERIAL 2","FINISH 1","FINISH 2")
DimobjSPVoice,colVoices
objSPVoice=CreateObject("SAPI.SpVoice")
objSPVoice.Speak(" Sheet has Changed to Eleven Series A1")
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
ElseIfSheet_Configure="11S_A2"Then
ActiveSheet.ChangeSize("A2", MoveBorderItems :=True)
ActiveSheet.Border="A2"
ActiveSheet.SetTitleBlock("11_SERIES", "SCALE", "PART NUMBER","MATERIAL 1", "MATERIAL 2","FINISH 1","FINISH 2")
DimobjSPVoice,colVoices
objSPVoice=CreateObject("SAPI.SpVoice")
objSPVoice.Speak(" Sheet has Changed to Eleven Series A2")
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
ElseIfSheet_Configure="11S_A3"Then
ActiveSheet.ChangeSize("A3", MoveBorderItems :=True)
ActiveSheet.Border="A3"
ActiveSheet.SetTitleBlock("11_SERIES", "SCALE", "PART NUMBER","MATERIAL 1", "MATERIAL 2","FINISH 1","FINISH 2")
DimobjSPVoice,colVoices
objSPVoice=CreateObject("SAPI.SpVoice")
objSPVoice.Speak(" Sheet has Changed to Eleven Series A3")
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
ElseIfSheet_Configure="11S_A4"Then
ActiveSheet.ChangeSize("A4", MoveBorderItems :=True)
ActiveSheet.Border="A4"
ActiveSheet.SetTitleBlock("11_SERIES", "SCALE", "PART NUMBER","MATERIAL 1", "MATERIAL 2","FINISH 1","FINISH 2")
DimobjSPVoice,colVoices
objSPVoice=CreateObject("SAPI.SpVoice")
objSPVoice.Speak(" Sheet has Changed to Eleven Series A4")
iLogicVb.UpdateWhenDone=True
ThisApplication.ActiveView.Fit
EndIf
every thing Works Fine Expect A4
bec i wanted A4 has Portrait
For Which i was not able to Find Code
here is the File
http://www.mediafire.com/?iffbf78e6dm2qz6
Hi ravikmb5,
Here's a link that includes a couple of rules to flip the sheet orientation:
http://inventortrenches.blogspot.com/2011/05/use-ilogic-to-change-sheet-orientation.html
I hope this helps.
Good luck with all of your Inventor and iLogic pursuits,
Curtis
Excellent, it worked
Thanks
Hi ravikmb5,
I pulled the enumeration information from the Inventor API help files that install with Inventor.
For example in 2011 look for: C:\Program Files\Autodesk\Inventor 2011\Help\admapi_15_0.chm
I hope that helps.
Good luck with all of your Inventor and iLogic pursuits,
Curtis
Thanks Once again
One more Question
i know that
Autodesk has Exteneded their support for Drive Constraints through API From IV 2012 version
i am trying to drive a constraint through ilogic in an assembly
as u suggested i have seen both object module and API
but was'nt able to figure it out
Could u give me an Example or code to do it
Hi ravikmb5,
Unfortunatly, I don't have any examples on hand that deals with driving constraints, and won't have time to look into anything like that anytime soon. But you might find a previous thread on that topic by searching the Customization Forum:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
If not, you might start a new topic on that forum asking about handling driving constraints via the API.
I hope that helps.
Good luck with all of your Inventor and customization pursuits,
Curtis