Reply

Deleting occurrence from an assembly when using patterns

Hello,

I am trying to delete some occurrences from my assembly using the API. Everything works fine when there are no patterns. However, when working with patterns, I do not want to delete the patterned occurrence as it would break the pattern.

I know I can check the properties IsPattern and IsPatternItem to learn if the occurrence is a part of a pattern. If the pattern is a regular assembly pattern, I also get the FeaturePattern by using the method AssemblyPattern.GetInputs() and from it I get the reference occurrence. 

But if the pattern is pattern along curve or duplicate pattern, I am unable to get the reference occurrence that was used to define the pattern. Anybody knows if there is something similar to AssemblyPattern.GetInputs() to get the info? When I call this method on these types of patterns, the returned FeaturePattern is null.

 

Thanks in advance 

4 REPLIES

Re: Deleting occurrence from an assembly when using patterns

Hi Kammie,
I did not try this until now. So I don't have a solution.
Could you file an IR for this problem to get the answer from development?
Please share the answer. I am sure others will be also interested in the answer.
regards

JB
VS2015, SE ST10

Re: Deleting occurrence from an assembly when using patterns

Hello,

thanks for the suggestion but I am not sure if I can do it. I am a newbie in Solid Edge and I've been using only the trial version so far. If I understand it correctly I need a webkey to file an IR and I'm not sure if I can get it as a trial version user Smiley Sad

Re: Deleting occurrence from an assembly when using patterns

Hello Kammie,

I did a deeper look in the API of AssemblyPattern using the sample in  the help.

The GetInputs() method corresponds to the Edit() method and is only usable for regular patterns.

Due to the parameters returned there are a lot of missing informations.

 

So there is obviosly missing functionality to get the inputs for AlongCurve and Duplicate pattern.

 

regards

JB
VS2015, SE ST10

Re: Deleting occurrence from an assembly when using patterns

Well, I was hoping there was a method I overlooked that could get the information I needed. Anyway, thanks for the help Smiley Happy