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
Solved! Go to Solution.
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.
Chris Benner
Inventor Tube & Pipe, Vault Professional
Cad Tips Tricks & Workarounds | Twitter | LinkedIn
Autodesk University Classes:
Going With The Flow with Inventor Tube and Pipe | Increasing The Volume with Inventor Tube and Pipe | Power of the Autodesk Community | Getting to Know You | Inventor Styles & Standards |Managing Properties with Vault Professional | Vault Configuration | Vault - What is it & Why Do I Need It? | A Little Less Talk - Tube & Pipe Demo | Change Orders & Revisions - Vault, Inventor & AutoCAD | Authoring & Publishing Custom Content
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.
If this solved your issue please mark this posting "Accept as Solution".
Or if you like something that was said and it was helpful, Kudos are appreciated. Thanks!!!!
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
Congrads Sherlock!!! Nice digging.
Glad you found what you were looking for.
If this solved your issue please mark this posting "Accept as Solution".
Or if you like something that was said and it was helpful, Kudos are appreciated. Thanks!!!!
Thanks!
This was actually a combination of a code that I found on the Discussion Group and my own code.
Elementary my dear Watson!
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