Skip to content

Change global variable - Use function parameters instead of constants #387

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Function SetEquationValue(eqMgr As SldWorks.EquationMgr, name As String, value A
index = GetEquationIndexByName(eqMgr, name)

If index <> -1 Then
eqMgr.Equation(index) = """" & name & """=" & NEW_VALUE
eqMgr.Equation(index) = """" & name & """=" & value
SetEquationValue = True
Else
SetEquationValue = False
Expand All @@ -54,7 +54,7 @@ Function GetEquationIndexByName(eqMgr As SldWorks.EquationMgr, name As String) A
eqName = Trim(Split(eqMgr.Equation(i), "=")(0))
eqName = Mid(eqName, 2, Len(eqName) - 2) 'removing the "" symbols from the name

If UCase(eqName) = UCase(VAR_NAME) Then
If UCase(eqName) = UCase(name) Then
GetEquationIndexByName = i
Exit Function
End If
Expand Down