I cannot figure out how to do this:
Here is an example:
I have some existing linear patterns of some holes in a pipe.
I want to be able to vary the distance of certain "instances" of these holes.
I know I can do this in the feature manager, but I need to be able to do this using the API.
I found this excellent Solidworks article on how to "Create a linear pattern" from scratch and assign different spacing to specific instances.
http://help.solidworks.com/2013/English/api/sldworksapi/Create_Linear_Pattern_Example_VB.htm
The problem is that I am using complex parts with several linear patterns already created that have feature driven patterns relying on them.
I do not want to have to create these linear patterns and feature-driven patterns from scratch when I already have them created and set up.
I just cannot figure out how to "Modify the spacing" or "Skip instances" for these existing linear patterns using the API.
Any help would be greatly appreciated
Thanks
SolidworksApi macros
Check this thread. But use another definition for your patter type (LinearPatternFeatureData::SkippedItemArray) https://forum.solidworks.com/message/311589#311589
Thanks Artem,
I modified the code from this link you gave me and I am now able to "skip instances" in an existing linear pattern without having to create the pattern first using the API.
https://forum.solidworks.com/message/311589#311589
I had to do some slight tweaking to the code to get it to work for linear patterns correctly though.
If anyone ever needs this code, let me know and I can post it.
Have a great day!