Message 1 of 3
Not applicable
11-16-2014
01:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying with vb.net to assign a virtual component to a variable. The following code creates the virtual component "Assembly" if it doesn't exists :
Dim _asmCompDef As AssemblyComponentDefinition
_asmCompDef = _doc.ComponentDefinition
Dim identity As Matrix
identity = _invApp.TransientGeometry.CreateMatrix
Dim occs As ComponentOccurrence
occs = _asmCompDef.Occurrences.AddVirtual("Assembly", identity)
I don't know how to assign this virtual component to a variable.
This code creates an error :
Dim existingOcc As ComponentOccurrence
existingOcc = _asmCompDef.Occurrences.Item("Assembly")
Solved! Go to Solution.
