Inventor General Discussion

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

Ilogic error (changing sheet border and title blocks)

775 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,821
Registered: ‎03-08-2006
Message 2 of 3 (741 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,946
Registered: ‎05-18-2011
Message 3 of 3 (731 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 :-(

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube