Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ilogic - sheet Format Drawing

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
ravikmb5
3980 Views, 6 Replies

ilogic - sheet Format Drawing

i wanted to change Portrait and Landscape using ilogic in Drawings

 

i have checked this inventor2012object module

but was'nt able to acess it

 

1.png

Please mark this response as Problem Solved if it answers your question.
----------------------------------------------------------------------------------------------
Ravi Kumar MB,
i7 860 Dell Studio XPS Win 7 64 bit 12 Gb RAM & HP Z220 SFF Workstation
Autodesk Inventor Certified professional 2016
Email: ravikmb5@gmail.com





6 REPLIES 6
Message 2 of 7
ravikmb5
in reply to: ravikmb5

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

Please mark this response as Problem Solved if it answers your question.
----------------------------------------------------------------------------------------------
Ravi Kumar MB,
i7 860 Dell Studio XPS Win 7 64 bit 12 Gb RAM & HP Z220 SFF Workstation
Autodesk Inventor Certified professional 2016
Email: ravikmb5@gmail.com





Message 3 of 7

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

http://inventortrenches.blogspot.com/

Message 4 of 7

Excellent, it worked

Thanks

 

 

kLandscapePageOrientation = 10242
kPortraitPageOrientation = 10243
Could u justify the above statement
 
Please mark this response as Problem Solved if it answers your question.
----------------------------------------------------------------------------------------------
Ravi Kumar MB,
i7 860 Dell Studio XPS Win 7 64 bit 12 Gb RAM & HP Z220 SFF Workstation
Autodesk Inventor Certified professional 2016
Email: ravikmb5@gmail.com





Message 5 of 7

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

http://inventortrenches.blogspot.com/

Message 6 of 7

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

 

2.png

 

 

Please mark this response as Problem Solved if it answers your question.
----------------------------------------------------------------------------------------------
Ravi Kumar MB,
i7 860 Dell Studio XPS Win 7 64 bit 12 Gb RAM & HP Z220 SFF Workstation
Autodesk Inventor Certified professional 2016
Email: ravikmb5@gmail.com





Message 7 of 7

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

http://inventortrenches.blogspot.com/

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

Post to forums  

Autodesk Design & Make Report