SolidWorks API: Controling a Cube with C#

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

ความคิดเห็น •

  • @TheEverydayEngineerGC
    @TheEverydayEngineerGC 8 หลายเดือนก่อน +2

    This was extremely useful, thank you very much!

    • @ajarivas72
      @ajarivas72 8 หลายเดือนก่อน

      It is my experience that Macros in SolidWorks sometimes don’t work. For example, sometimes a sketch is broken depending on where you begin drawing.

  • @yiliang5883
    @yiliang5883 10 หลายเดือนก่อน +1

    You explained it in great detail. If I want to extract the length, width, and height dimensions of the cude through a program, how should I implement it

    • @ajarivas72
      @ajarivas72 8 หลายเดือนก่อน

      Extract the edges of the cube.

  • @MushtaqAhmad-ro9qm
    @MushtaqAhmad-ro9qm 11 หลายเดือนก่อน +1

    Sir how we can make code for automation of FEA analysis in SOLIDWORKS??? Plz help i have a project on that.

    • @ajarivas72
      @ajarivas72 8 หลายเดือนก่อน

      That can be done very easily with a VBA macro.

  • @drsurfer61
    @drsurfer61 ปีที่แล้ว

    Do you have an idea why on my test PC swModel.Parameter("name") has not the .Value property (SW 2020)? I managed to get dimensions from model with this code:
    Dimension swDim;
    swDim = (Dimension)swModel.Parameter("width@Sketch1");
    txtWidth.Text = (swDim.SystemValue * 1000.0).ToString();
    Of course this has not immediate reverse form.
    I'm using .Net 5.0, I had to overcome the absence of Marshal method, but I don't think it's related at all.

    • @kalkhasse
      @kalkhasse  ปีที่แล้ว

      Sorry to say, I have no idea why .Value is not present. But according to SolidWorks API help its an old (obsolete) way of getting and setting the value. In your example it would be swDim.GetValue3() or swDim.SetValue3().
      Check the link below for more info.
      Hope it works out!
      help.solidworks.com/2020/english/api/sldworksapi/SolidWorks.Interop.sldworks~SolidWorks.Interop.sldworks.IDimension_members.html

  • @jccourtney317
    @jccourtney317 ปีที่แล้ว

    You talk pretty quietly. I had to have my volume on max to be able to hear you, which ends up jolting me because ads or other videos are much, much louder. If I can add a suggestion: increase your microphone volume by like 30 or 40 percent.

    • @kalkhasse
      @kalkhasse  ปีที่แล้ว

      Thanks for the feedback! I will keep that in mind in the future.