You can use the Workbook_Open and Workbook_Close event within the ThisWorkbook module in the VB Editor to accomplish what you are looking for.
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
The result is returned as a single. The decimal places represent the smaller portions of a second. For one millisecond (1/1000th of a second), you would use the decimal 0.001 seconds.
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums...
Look into the Timer function.
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
You can create a form, add a textbox, and change the Textbox.PasswordChar property. If you enter an asterisk "*", you'll have the standard masked entry field.
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit...
If you are in the code window for the form, you don't need to add the form name, simply use the control name.
ListBox1.AddItem "8000"
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
You can access the properties from the ModelSpace or PaperSpace objects.
Ex.
ThisDrawing.ModelSpace.Layout.PlotType = acExtents
ThisDrawing.ModelSpace.Layout.StandardScale = acScaleToFit
ThisDrawing.Plot.NumberOfCopies = 1
ThisDrawing.Plot.PlotToDevice
DimensionalSolutions@Core.com...
I am not sure I completely understand your model, but you can create a sketch of the cross section on the face it would be contacting. Then, rebuild, select the sketch and the face and do an Insert > Curve > Split Line. This will create a separate selectable face on the main face to which you...
You can use an If statement to see if the denominator is zero. If so, set the cell to an empty string otherwise display the result.
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
That may work.
Also, if Test is an object, you'll have to define it using the Set method.
Sub OnLButtonDown(...)
Dim dummy, Test
Set Test = HMIRuntime.Tags(“Test”)
Dummy = HMIRuntime.Tags(“Dummy”).value
If Dummy = 1 Then
Set Test = HMIRuntime.Tags(“Pers3”)
ElseIf Dummy = 2...
First thing I notice is that you are comparing an object to a value. The Set command indicates you are setting an object. Objects can not be compared to values. You may have to access a property of the object to compare it to.
Set Dummy = ...
If Dummy = 1 - Probably causing problem
Maybe...
Does the above method not work for trapping the situation?
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
You can access the login name using several methods.
Via Windows API (preferred and most reliable method)
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Sub Main()
Dim sUser As String
Dim...
If you refer to Jkaen's post, you'll see it is the macro he wanted to run between calculations. I can only presume that the automatic sheet recalculation did not trigger his custom calculations, requiring it to be run for each step.
Glad to help...
DimensionalSolutions@Core.com
While I welcome...
rocheey:
Actually, I am not sure. I just assumed that the ActiveDoc failed because a document was not active. I also thought that this method would work around that issue because it returns all documents, regardless of their active status. Since the swApp is still hooked, it should function (at...
Here is a more detailed function for Option 2 mentioned above. You can modify your code to include the test.
If Model Is Nothing Then
If IsFalsePositive = False Then
swApp.SendMsgToUser2 "A file must be opened..."...
Else
'At least one file is open, but SW is not the...
Option 1:
You may have to dig into the Windows API to make sure that SolidWorks is the active window. However, I am not sure why the macro would trap the keypad use if it's not the active application.
Option 2:
Put an additional trap to catch this situation. You obviously need to use the...
Yeah, it does seem to have difficulty as advertized. Since you are only fetching one modeldoc at a time, I just lost the array.
Private Sub cmdEnum()
Dim eList As SldWorks.EnumDocuments2
Dim eItem As SldWorks.ModelDoc2
Dim Celt As Long
Dim rGelt As Object
Dim pCeltFetched As...
glad to help...
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
Why don't you just process this via the command line? Instead of creating a selection set of a ton of entities, utilize the "ALL" method already built into AutoCAD.
ThisDrawing.SendCommand "_Scale" & vbCr & "ALL" & vbCr & vbCr & "0,0,0" & vbCr &...
Using VBA you can access the text items and append the data from Excel. You could write the program in Excel VBA, include the AutoCAD object library and you're on your way. It shouldn't be that complex, but will take a little time to write.
DimensionalSolutions@Core.com
While I welcome e-mail...