Good afternoon everyone.
I've been trying to add chamfers to holes on a part that I use in a Assembly document, but when the assembling process is terminated, SE crashes and closes without launching any exception, with no explanation.
I've tryed many workarounds in the last 3 weeks but I haven't been able to fix this problem.
Has someonelse ever experienced something like this?
I was wondering if installing SE Maintenance packs could resolve.
I'm using SE ST5 with no MP. Where can I get them? Do I have to login to Siemens download server? If so, I'll have to ask for credentials here in my company.
These MP's fix the API, the Solid Edge or both?
Any help would be appreciated!
There is an example of how to use AddEqualSetBack in the Samples for Solid Edge on CodePlex. You might take a look at that example to see if it works and go from there. I'm not 100% positive but I'm pretty sure that specific example was tested against ST5.
Regarding Maintenance Packs, they do sometimes address API issues. MPs also come with a readme.txt that described what was fixed. I read through all of the ST5 readme.txt files but did not see a direct reference to Chamfer or AddEqualSetback(). That does not necessarily mean that it did not get fixed if there was indeed a problem.
To access Solid Edge downloads, you need a WEBKEY login. Typically a customer gets at least one WEBKEY login so whoever in your company has that will need to login to https://download.industrysoftware.automation.sieme
There was a bug (IR6791180) with the assembly chamfer command in ST5 (and all maintenance packs) that did not allow any selection by the user when trying to use the Edge/Corner option. Whether this affects what is done through API, I do not know, but thought I'd mention it. This issue was fixed in ST6.
First of all, I'd like to apologize for taking so long to answer. I was waiting for finalizing further investigation and for updating to ST 6 at work to give a better position.
Well, it will take some time until they update SE to ST6 at work, so I downloaded and tested it on ST6 student at home, trying the code provided by Jason Newell, but unfortunately, the same problem occured.
During my debugging sessions, I realized that SE crashes on the "OnCommandUdateUI" event. But only when I put Chamfers on the parts.
I thougth it could be something related to timing and deadlocking. I investigated the IOleMessageFilter interface. It's implemented according to the directions found on the SE Api reference. I didn't manage to do anything relevant on this matter.
I'm trying debbuging tools that help me find out why SE is crashing.
I realized that your code works fine in my workplace(ST 5/ MP6), while my code crashes.
The main diference between them is that you're placing the chamfers in corners and I'm placing chamfers in holes.
Is there any piece of advice in respect to placing chamfers in holes?
I'll try to reproduce what you're seeing with some hole examples that I have. In the mean time, you might reply with a snippet of your code so that I can try to help you with your specific example.
Here's my code snipet:
SolidEdgePart.ExtrudedCutout objExtCut = null;
objExtCut = model.ExtrudedCutouts.AddFinite(profile, SolidEdgePart.FeaturePropertyConstants.igLeft, SolidEdgePart.FeaturePropertyConstants.igLeft, 0.00952);
SolidEdgeGeometry.Edges edges1 = null;
edges1 = objExtCut.Edges[SolidEdgeGeometry.FeatureTopologyQ
Object edgeSetArray1 = new Object;
edgeSetArray1 = edges1.Item(0);
chamfer1 = model.Chamfers.AddEqualSetback(1, edgeSetArray1, 0.003);
Please, see if it works with you.
Thanks a lot!