solidworks

Some extrusions in loop in solidworks VBA don't work

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 18:46:12
问题 I am attempting to run a loop of extrusions in solidworks API using VBA. The height of each extrusion is determined by the brightness of the pixels in a bitmap. For the most part the code works as expected however about a quarter of the extrusions simply don't work. The Sketches are made but the extrusions aren't. I am at a loss as to the reason behind this as I don't see any pattern between the ones that don't work. I ran a quickwatch on the FeatureExtrusion2 and in the ones that didn't work

Learning solidworks(01)

淺唱寂寞╮ 提交于 2019-12-14 02:39:58
目录 转换实体、等距实体 转换实体 等距实体 镜像 线性阵列 转换实体、等距实体 转换实体 把不同草图上的线条转化到同一草图上 操作: 选择 转换实体引用 没有太明白后面的操作,详细的过程待记录??? 等距实体 1.操作:选择 等距实体 2.向外等距: 反向 不选 2.向内等距: 勾选 反向 2.取消 选择链 (只等距一条线,类似于 特征 里的 出壳 ) 镜像 操作示例: 1.横竖分别画一条中心线 选择 直线 –> 中心线 2.镜像操作 选择 镜像实体 选择 要镜像的实体 –图中的圆弧; 选择 镜像点 —刚才画的中心线: 线性阵列 1.命令 线性草图阵列 还可以修改角度: 如改为45度: 2. 命令 线性草图阵列 –> 圆周草图阵列 : 来源: CSDN 作者: 宁弈 链接: https://blog.csdn.net/qq_44516871/article/details/103529336

Is there an alternative to View.GetOutline() which DOES include Temporary Axes?

被刻印的时光 ゝ 提交于 2019-12-13 03:36:26
问题 Note: This is not answered by the suggested question - it is practically the opposite of it. Besides, it is me who asked that question too and I also linked to it below . I am fixing someone else's VBA code for SolidWorks which places drawing views next to each other based on their size. Size of a view is taken from bounding box returned by View.GetOutline() and view's position is set by changing View.Position property. The code processes multibody parts, creating one drawing sheet per body.

Solidworks API and Winforms C# swApp (Standalone)

南楼画角 提交于 2019-12-12 01:38:10
问题 This is what solidworks tells you to do to reference swApp , but I keep getting NullReferenceException on the line that it is referenced. Does anyone have any idea why? or How I go about repairing? Can I reference it later on such as swApp = ???? private void button5_Click(object sender, EventArgs e) { //Save Drawing ModelDoc2 swDoc = null; int longstatus = 0; swDoc = ((ModelDoc2)(swApp.ActiveDoc)); longstatus = swDoc.SaveAs3( @"C:\Engineering\Engineering\SW Automation\Linear Actuator

Is there an alternative to View.GetOutline() which gives a better outline?

孤者浪人 提交于 2019-12-11 04:29:42
问题 Outline returned by View.GetOutline() method does not quite correspond to the visible drawing - it returns a bit more than the selection outline shown by SolidWorks GUI. The screenshot below shows the selection outline (light blue dotted rectangle) and diagonal of the outline returned by View.GetOutline() (red line): Is there a way to get bounding box that corresponds to the actually visible drawing? Note: Original title of this question was "Is there an alternative to View.GetOutline() which

How to open Solidworks, run macro, and close Solidworks from vb.net script? [closed]

风流意气都作罢 提交于 2019-12-10 18:59:54
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 months ago . I am running a VBA Macro in solidworks that stops working and requires me to restart Solidworks after exactly 478 loop-itterations every time I run it. Inside my loop, I open an STEP file, verify it, and then save it as an STL file. It appears as if Solidworks is struggling to

XpsDocument GetFixedDocumentSequence return null for files generated by a specific computer

牧云@^-^@ 提交于 2019-12-10 18:53:31
问题 Solidworks generate "EDRWX" files. Usually, those are opened with Microsoft XPS viewer. Issue : An application use .net XPSDocument to open them and do some manipulation with them before printing. The faulting method is "GetFixedDocumentSequence". It returns null with files generate from a specific computer. It does so even when the application is running on the specific computer. But it is working fine with file generated by other computer. When trying to open the file with XPS document

solidworks的几个关键操作

醉酒当歌 提交于 2019-12-10 12:55:24
对于要DIY的童鞋来说,建模是少不了的,很多的造型甚至配件要想在网上淘到也是不大现实的,所以最好的办法是自己建模,然后通过3D打印来完成,那么solidworks必然成为首选。 对于有无CAD或者3Dmax基础的人来说学习solidworks基本没有差别,相反,我感觉比CAD和3Dmax更容易上手,更容易实现我们DIY的建模。根据我的摸索,感觉下面的几点了解清楚非常利于solidworks的操作。 一、三维建模的常规操作流程 (1)选取绘图平面 (2)进入草图绘制 (3)大致绘制草图 (4)尺寸标注、添加几何关系 (5)退出草图绘制 (6)进行特征操作 重复上述步骤完成三维的建模。 二、三维图和草图的相互切换 一般对于新手而言,知道如何完成拉伸进入三维模式,但拉伸后发现平面图有问题重新回到平面图就不会了,其实,在导航栏中有选择实体,调出右键菜单。 右键菜单中第一个图标就是编辑实体,第二就是编辑平面草图。 当然,我们还可以直接在导航栏中选择实体或者草图来进行编辑: 三、在三维物体某面上添加平面草图 1、选择三维实体 一、如果文件中只有一个实体,那么就可以简单粗暴的用CTRL+A来选择整个实体。 二、如果有几个实体,可以通过鼠标左键点选一个实体,然后通过下面的导航条来选择整个实体或者实体的一部分。如下图: 提示:选择实体后,我们在编辑区域的左上角,可以看到上图的图标导航

How do you pass parameters from a VBA script in excel to an external executable (C#) as arguments?

◇◆丶佛笑我妖孽 提交于 2019-12-08 01:54:30
问题 I have an embedded button in an excel sheet that calls a VBA script. In this script I am reading the current directory, parsing, and using that to generate values to pass string[] args to an external C# executable. I have gone through many iterations of this and it does call the executable, but it appears that the parameters being passed are null(empty) when the C# .exe runs. I am able to use this C# .exe in other programs and pass the arguments, but this VBA script isn't working as expected.

Pointer callout for SelectById2

随声附和 提交于 2019-12-07 15:39:32
问题 I'm trying to port over some code I wrote in VBA to control Solidworks in to Python. Specifically automating sketch edits. I am having problems using Solidworks SelectById2 in Python. In VBA the following code works fine: Part.Extension.SelectByID2("Sketch1", "SKETCH", 0, 0, 0, False, 0, Nothing, 0) The problem I am having is replacing VBA's "Nothing" value with some Python equivalent. From the Solidworks API Docs, what SelectByID2 is looking for is: SelectByID2(Name, Type, X, Y, Z, Append,