Message 1 sur 6
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Lien permanent
- Imprimer
- Signaler
Hi Forum!
I am trying to measure from a component occurrence inside a sub assembly to the XZ work plane on the main assembly. The component occurrence gets selected by the user and has a work surface called "Face0". My goal is to measure from "Face0" of the selected occurrence to "XZ Plane".
Here's the code I've written:
Dim oAsm As AssemblyDocument = ThisApplication.ActiveDocument Dim oAsmComp As AssemblyComponentDefinition = oAsm.ComponentDefinition Dim Splice As ComponentOccurrence Splice = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select a splice plate") Dim Height As Double 'Height = Measure.MinimumDistance(Splice, "Face0", "", "GROUND PLANE") Height = Measure.MinimumDistance(Splice, "Face0", oAsm, "GROUND PLANE")
This code currently gets an error not sure why. I was wondering if someone has worked on a code similar to this before.
The occurrence part is inside "Assembly1" and I am running the code from "Assembly2" as shown in the snippet below
Thanks,
Felix
Résolu ! Accéder à la solution.