Message 1 of 5

Not applicable
04-01-2016
10:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys and gals,
I want to pick 2 points in a part file (IPT, not IAM) and get the minimum distance, and pass this value to a variable, all within an iLogic rule. Sounds fairly straightforward, right? Wrong. The command will not give me the value. I can pick 2 faces, but get this error : "No entity named "System.__ComObject" was found."
I created WorkPoints, WorkPlanes, Sketches and tried using filters, no result. I've seen some code to be used in assemblies, but that does not apply here.
Here's what I have, and if you ask me, it should be this simple:
SyntaxEditor Code Snippet
Dim Face1 as Face Dim Face2 as Face Dim DistPoints as Double Dim oDoc As PartDocument oDoc = ThisApplication.ActiveDocument Face1 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Pick Face 1 : ") Face2 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartFaceFilter, "Pick Face 2 : ") DistPoints = Measure.MinimumDistance(Face1, Face2) ' Do something with DistPoints
Can anyone help me please?
Thank you
Solved! Go to Solution.