-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A sketchpoint issue #116
Comments
I create a minium environment, only click a command to run above function, they all work well. In my code, first creat a sketch, then click a command to start a poperty manager page, as I click one button of the page to run the first code above, the sw app crashed. It seemes sw crashing when returning to my command page. |
I'm sure it does cause by my pmp closing when sketchtool raising. This command may not use pmp. |
There is a constance "OPTS_DEFAULT" in internal Show() which in Internal class PropertyManagerPagePage of Xarial.XCad.SolidWorks.UI.PropertyPage.Toolkit.Controls, it allow the other page to be a StackPage. Make it to a page attribute may resolve this issue. |
Yes, that makes sense to add an option to have StackPage. I will add one. Regarding the sketch. Yes, AddToDB is used: https://github.com/xarial/xcad/blob/!dev/src/SolidWorks/Sketch/SwSketchEntityCollection.cs#L73C2-L89 But if I am not mistaken this was added into the pre-release version (e.g. 8.X and not available in 7.X) |
I have changed "OPTS_DEFAULT = 1", it does not worked. The property manager page will not being closed when I click the OK or Cancle button. Here is my sample code: |
I used lockedPage attribue ([PageOptions(PageOptions_e.LockedPage)]) option to resolve the problem, avoiding the crashing of sw when inserting a point and adding dimension. But unfortunately in this option, the SelectById2 method will not work. Because some sketch points are com_object, it can not use Select4 method to select the point. It seems I have tried all the way, but I can't find the right answer. |
This code cause sw app crashing with no reason.
I change the code to solidworks api as below:
It also cause the app crashing. The CreatPoint() throw a exception: "This is often an indication that other memory is corrupt.”
I ask the ChatGpt, it changed the code to:
I noticed the code adding a SetAddToDB() method, and it worked. I wonder that xcad.net api having considered this issue.
The text was updated successfully, but these errors were encountered: