Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Search results for query: *

  1. Santa123

    SettingsConstrolers

    Hej, I wan to create macro (vb.net) to turn on "Enable Hybrid Design In body", I tryied different approaches but I failed. First my macro checks if "Enable hybrid design inside part bodies and bodies" is on, then I would like to turn on "In a body" Dim SettingsConstrolers As...
  2. Santa123

    Constraint - vertical or horizontal

    Hej, I am trying to determine if Constraint (Length or Offset) is horizontal or vertical. If dimension is related to line there is no problem but if it's not I cant manage with it. Could you give me some tips? Respect Santa123
  3. Santa123

    Relation

    Sorry, I mean Relation
  4. Santa123

    Relation

    Hi, I created relation: Dim MassString As String MassString = "volume(Extract_For_Volume_Measure\Extract.1 )*7860 * 1kg_m3" MyParameterMasaForumla = MyPart.Relations.CreateFormula("FormulaMass", " ", MyProduct.UserRefProperties.Item("Mass"), MassString ) when I change my Part...
  5. Santa123

    Add material

    Hi LucasC Thank's for response, finaly I found mistake in my code. I only added Call and it works. Public Class Form1 Public MyActiveDocument As Document Public MyProduct As Product Public MyParamMass As Double Public MyPart As Part Private Sub Form1_Load(sender As...
  6. Santa123

    Add material

    Hello, I am creating a macro, which add material to part, read mass and put it to lblMassValue. Button2 add material to Body but weight is not updated, it stays the same as it was without material. Public Class Form1 Public MyActiveDocument As Document Public MyProduct As Product...
  7. Santa123

    GetDirection vb.net

    Hej I can't find this library in Reference Manager, strange. Regards Santa
  8. Santa123

    GetDirection vb.net

    Thank You.
  9. Santa123

    GetDirection vb.net

    Hej, it finally worked, but intellisense not showing me method GetDirection Imports INFITF Imports MECMOD Public Class Form1 Private Sub Form_Main_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim CATIA As Application Dim MyPart As Part Try...
  10. Santa123

    GetDirection vb.net

    Hej, I am trying to convert my macro from script to vb.net Function FuncIsHorizontal(MyPart As Part, i) As Boolean Dim MyDir() As Variant Dim MyGeomElementLine As GeometricElement Set MyGeomElementLine =...
  11. Santa123

    Userform show from CATIA toolbar

    Hi, I'm trying to run UserForm from CATScript using code above, but I am getting an error, Class UserForm does not exist
  12. Santa123

    Rename multiple parameters at one shot

    adapt this code to your needs Sub MyParam() Dim MyDocument As Document Dim myPart As Part Dim MyParametrsSet As ParameterSet Dim MyDirectParam As Parameters Dim i As Integer Set MyDocument = CATIA.ActiveDocument Set myPart = MyDocument.Part Set MyParametrsSet =...
  13. Santa123

    Enable or Disable Button

    Hej Put it under CheckBox1 Private Sub CheckBox1_Click() If CheckBox1.Value = True Then CommandButton1.Enabled = False ElseIf CheckBox1.Value = False Then CommandButton1.Enabled = True End If End Sub Regards Santa
  14. Santa123

    visual basic 2015

    I messed up a bit, it turns out that I can't run cnext.exe /regserver I got error: Creating registry key HKEY_CLASSES_ROOT\.CAT3DEXPOperation_ENOVIAV5 failed Access denied
  15. Santa123

    visual basic 2015

    Thank you Little Cthulhu, unfortunately It doe's not work as well.
  16. Santa123

    visual basic 2015

    I have 1 version instaled - 2017.
  17. Santa123

    visual basic 2015

    Thank you romaleee for your hepl, it is strange, although I had opened Catia I got error - "You don't have active Catia"?
  18. Santa123

    visual basic 2015

    I open Catia with drawing document. Is there any another parameters I should set up in visual studio? Regards Santa
  19. Santa123

    visual basic 2015

    I Added Referece: - COM + Services Type Library - CATIA V5 ApplicationFrame Object Library - CATIA V5 CATMatInterfaces Object Library - CATIA V5 DraftingInterfaces Object Library - CATIA V5 InfInterfaces Object Library - CATIA V5 SrtuctureInterfaces Object Library When I changed my code to...
  20. Santa123

    visual basic 2015

    I tried that too, it didn't help. Regards
Back
Top