Inventor General Discussion

Inventor General Discussion

Reply
Active Contributor
38 Posts
1 Kudo
Registered: ‎04-16-2012
Post 1 of 3

Ilogic error (changing sheet border and title blocks)

929 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*
3,002 Posts
1,705 Kudos
Registered: ‎03-08-2006
Post 2 of 3

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
1,986 Posts
404 Kudos
Registered: ‎05-18-2011
Post 3 of 3

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
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!