Inventor General Discussion

Inventor General Discussion

Reply
Active Contributor
helmartins
Posts: 38
Registered: ‎04-16-2012
Message 1 of 3 (851 Views)

Ilogic error (changing sheet border and title blocks)

851 Views, 2 Replies
06-18-2012 05:37 AM

Hi

 

I'm having an error with Ilogic parameters (see the attachments).

 

I just wanna change the border and the title blocks with Ilogic. This should be simple. Isn't this?

 

Thanks

 

Helder Martins

 

 

*Expert Elite*
Curtis_Waguespack
Posts: 2,947
Registered: ‎03-08-2006
Message 2 of 3 (817 Views)

Re: Ilogic error (changing sheet border and title blocks)

06-18-2012 11:09 AM in reply to: helmartins

Hi helmartins, 

It's difficult to know what the problem might be with the information provided, but here are a couple of links that might help you get it sorted:

 

http://inventortrenches.blogspot.com/2011/05/use-ilogic-to-change-sheet-orientation.html

http://inventor-tales.blogspot.com/2010/11/drawing-conclusions-on-formatting.html

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com




  solution.png  Did you find this reply helpful ? If so please use the Accept as Solution or  Kudos button below.





*Pro
jletcher
Posts: 1,975
Registered: ‎05-18-2011
Message 3 of 3 (807 Views)

Re: Ilogic error (changing sheet border and title blocks)

06-18-2012 12:00 PM in reply to: helmartins

this is my code works great you may have to take out the style change

 

trigger=iTrigger0

Dim drawingDoc as DrawingDocument = ThisDoc.Document
Dim stylesMan As DrawingStylesManager = drawingDoc.StylesManager
Trace.WriteLine(" --- Active drawing standard = " & stylesMan.ActiveStandardStyle.Name )

'Pick Sheet Size
Sheet_Size= InputListBox("Select Sheet Size", MultiValue.List("Sheet_Size"), Sheet_Size, Title := "Sheet Size", ListName := "Choose Sheet Size")

'A size
If Sheet_Size = "A (8 1/2 X 11)" Then
ActiveSheet.ChangeSize("A", MoveBorderItems := True)
ActiveSheet.TitleBlock = "Uni Pak A"
ActiveSheet.Border = "Uni Pak A"
stylesMan.ActiveStandardStyle = stylesMan.StandardStyles("Uni Pak A")

'B size
ElseIf Sheet_Size = "B (11 X 17)" Then 
ActiveSheet.ChangeSize("B", MoveBorderItems := True)
ActiveSheet.TitleBlock = "Uni Pak B"
ActiveSheet.Border = "Uni Pak B"
stylesMan.ActiveStandardStyle = stylesMan.StandardStyles("Uni Pak B")

'C size
ElseIf Sheet_Size = "C (17 X 22)" Then 
ActiveSheet.ChangeSize("C", MoveBorderItems := True)
ActiveSheet.TitleBlock = "Uni Pak C"
ActiveSheet.Border = "Uni Pak C"
stylesMan.ActiveStandardStyle = stylesMan.StandardStyles("Uni Pak C, D")

'D size
ElseIf Sheet_Size = "D (22 X 34)" Then 
ActiveSheet.ChangeSize("D", MoveBorderItems := True)
ActiveSheet.TitleBlock = "Uni Pak D"
ActiveSheet.Border = "Uni Pak D"
stylesMan.ActiveStandardStyle = stylesMan.StandardStyles("Uni Pak C, D")

'E size
ElseIf Sheet_Size = "E (34 X 44)" Then 
ActiveSheet.ChangeSize("E", MoveBorderItems := True)
ActiveSheet.TitleBlock = "Uni Pak E"
ActiveSheet.Border = "Uni Pak E"
stylesMan.ActiveStandardStyle = stylesMan.StandardStyles("Uni Pak E")

End If
Trace.WriteLine(" --- Active drawing standard = " & stylesMan.ActiveStandardStyle.Name )
'update all 
InventorVb.DocumentUpdate()
'zoom all
ThisApplication.ActiveView.Fit

 


Please mark this response as "Accept as Solution" if it answers your question.

James Letcher
2012 Factory Design Suite ( will not load 2013)
What happen to my Inventor :-(
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.