Message 1 of 3
passing a value of a variable in VBA to iLogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have created a recursive function that count mass of assemblies/ sub assemblies based on the current view representations.
I created an ilogic rule to set a specific view representation with the correct parts.
I want to calculate the total weight of that view representation to use it later on in a particular drawings
the point is, I want to pass the value of the created global variable in VBA to equal the local variable of the ilogic rule. How can I do that?
Public Global_W As Double
Public Global_STout As String
Sub main()
Global_W = 0
Global_STout = ""
Dim oDOC As AssemblyDocument
Set oDOC = ThisApplication.ActiveDocument
Dim COD As AssemblyComponentDefinition
Set COD = oDOC.ComponentDefinition
Call WeightSubAswembly(oDOC)
MsgBox ("Total Weight: " & oParameter.Value)
End Sub
----------------------------------------------------------------
Sub WeightSubAswembly(AssemblyDoc As AssemblyDocument)
'some code here
End Sub
I hope I made myself clear;
Regards;