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: 

TITLE BLOCKS AND ACTIVE STANDARD

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Anonymous
434 Views, 6 Replies

TITLE BLOCKS AND ACTIVE STANDARD

Gentlemen,

 

I have an .idw template that I use for both assembly drawings and detail drawings.

I have created a custom assembly parts list and always used sketch symbols for the detail parts lists.

 

I have recently created a custom detail parts list.

 

I would like to know if there is any way to set the custom assembly parts list standard to active when the assembly title block is selected and visa versa for the custom detail parts list as well.

 

I did a quick search of this discussion group to see if there was an answer to this question, but didn't see anything.

I'm also sort of pressed for time on this.

Does anyone know how to do this?

 

Len

6 REPLIES 6
Message 2 of 7
cbenner
in reply to: Anonymous

If you are talking about having two parts list styles set in your styles manager, there MAY be a way to do that with iLogic.  but, honestly I would go the route of having 2 different templates.  One for your assembly files, with the appropriate styles preset, and another for your details... also with the styles preset.  Much less work to just select the template and go. 

 

If there is an ilogic solution, you might try the Inventor Customization forum as well.

Message 3 of 7
Cadmanto
in reply to: cbenner

To piggy back what Chris said, you might also want to consider two different standards setup in the styles as well.  Each one having their own default parts lists.

 

check.PNGIf this solved your issue please mark this posting "Accept as Solution".

Or if you like something that was said and it was helpful, Kudoskudos.PNG are appreciated. Thanks!!!! Smiley Very Happy

 

New EE Logo.PNG

Inventor.PNG     vault.PNG

Best Regards,
Scott McFadden
(Colossians 3:23-25)


Message 4 of 7
Anonymous
in reply to: Cadmanto

Thanks guys, I have figured it out for myself.

Here is the answer I was looking for:

 

Dim drawingDoc as DrawingDocument = ThisApplication.ActiveDocument

Dim stylesMan as DrawingStylesManager = drawingDoc.StylesManager

 

If ActiveSheet.TitleBlock = "Your title block" Then

   If stylesMan.ActiveStandardStyle.Name <> "Your title block" Then

     stylesMan.ActiveStandardStyle = stylesMan.StandardStyles("Your standard")

   End If

 

ElseIf ActiveSheet.TitleBlock = "Your other title block" Then

   If stylesMan.ActiveStandardStyle.Name <> "Your other standard" Then

      stylesMan.ActiveStandardStyle = stylesMan.StandardStyles("Your other standard")

   End If      

End If

Message 5 of 7
Cadmanto
in reply to: Anonymous

Congrads Sherlock!!!  Nice digging.  Smiley Happy

Glad you found what you were looking for.

 

check.PNGIf this solved your issue please mark this posting "Accept as Solution".

Or if you like something that was said and it was helpful, Kudoskudos.PNG are appreciated. Thanks!!!! Smiley Very Happy

 

New EE Logo.PNG

Inventor.PNG     vault.PNG

Best Regards,
Scott McFadden
(Colossians 3:23-25)


Message 6 of 7
Anonymous
in reply to: Cadmanto

Thanks!

 

This was actually a combination of a code that I found on the Discussion Group and my own code.

 

Elementary my dear Watson!

 

Message 7 of 7
Anonymous
in reply to: Anonymous

The code above is slightly incorrect and the Discussion Group wouldn't allow me to correct it.

I placed "Your title block" in the second row and it should've been "Your standard".

 

Here is the corrected code:

 

Dim drawingDoc as DrawingDocument = ThisApplication.ActiveDocument

Dim stylesMan as DrawingStylesManager = drawingDoc.StylesManager

 

If ActiveSheet.TitleBlock = "Your title block" Then

   If stylesMan.ActiveStandardStyle.Name <> "Your standard" Then

     stylesMan.ActiveStandardStyle = stylesMan.StandardStyles("Your standard")

   End If

 

ElseIf ActiveSheet.TitleBlock = "Your other title block" Then

   If stylesMan.ActiveStandardStyle.Name <> "Your other standard" Then

      stylesMan.ActiveStandardStyle = stylesMan.StandardStyles("Your other standard")

   End If     

End If

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

Post to forums  

Autodesk Design & Make Report