Ponza85
Bioengineer
- Feb 3, 2011
- 6
Hi to everybody..
Within the Macro I'm going to create, there is a part in which I wish to get some entities selections from an assembly.
I explain it better.
At a certain point of the macro, an assembly is opened.
A CommandButton in a Form says "Select the XXXX plane".
The macro now has to wait in standby that I select manually the plane I desire from the Assembly view, "store" this selection in a variable and then, create a "Plane1" which is coincident with that plane of my selection.
This is the code I thought to, but I'm on the wrong way ..
I wish you can help me..
thanks a lot.
Within the Macro I'm going to create, there is a part in which I wish to get some entities selections from an assembly.
I explain it better.
At a certain point of the macro, an assembly is opened.
A CommandButton in a Form says "Select the XXXX plane".
The macro now has to wait in standby that I select manually the plane I desire from the Assembly view, "store" this selection in a variable and then, create a "Plane1" which is coincident with that plane of my selection.
This is the code I thought to, but I'm on the wrong way ..
I wish you can help me..
thanks a lot.
Dim swApp As SldWorks.SldWorks
Dim feature As Object
Dim SelMgr As SelectionMgr
Set swApp = Application.SldWorks
Set Assembly = swApp.ActiveDoc
Set SelMgr = Assembly.SelectionManager
'***************************************
Form.Hide
Set feature = SelMgr.GetSelectedObject6(1, 0)
feature = Assembly.GetSelectedItems()
Set feature = Assembly.FeatureManager.InsertRefPlane(swRefPlaneReferenceConstraint_Coincident, 0, 0, 0, 0, 0)