It is currently Thu May 23, 2013 11:18 pm

All times are UTC





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Parts list style
PostPosted: Thu Dec 09, 2010 7:40 am 
Offline
MCAD Lurker
User avatar

Joined: 09 Dec 2010
Posts: 17
Country: Netherlands
State: Non US/CAN Resident
CAD System: Inventor
I've been struggling to find a way to change the parts list style in a drawing.
In the Style and Standard Editor I have set a parts list style for parts as standard and made another for using with assemblies. When I insert a parts list with VBA it uses the standard style and there seems no way to change the parts list style via VBA (i.e. activate the other one).
I tried to change the PartsListStyle with
1. StylesManager.ObjectDefaultsStyles.Item(i).PartsListStyle
2. StylesManager.ActiveStandardStyle.ActiveObjectDefaults
3. StylesManager.PartsListStyles.Item(i)
but the only thing I succeed in is creating a new style (if it doesn't exist already), but not in activating the other one.
Is there a VBA-way or must I change the parts list style manually?

Bobcad


Share on FacebookShare on TwitterShare on DiggShare on DeliciousShare on TumblrShare on Google+
Top
 Profile  
 
 Post subject: Re: Parts list style
PostPosted: Tue Aug 23, 2011 10:12 am 
Offline
MCAD Lurker
User avatar

Joined: 09 Dec 2010
Posts: 17
Country: Netherlands
State: Non US/CAN Resident
CAD System: Inventor
And here's the answer (thanks to viewtopic.php?f=15&t=12431), assuming the drawing is the active doc/sheet and MyPLStyleName is the name of the desired partslist style and PartsLists.Item(1) is the right partslist:

ThisApplication.ActiveDocument.ActiveSheet.PartsLists.Item(1).Style = ThisApplication.ActiveDocument.StylesManager.PartsListStyles.Item("MyPLStyleName")


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
POWERED_BY