×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Extract special coordinates

Extract special coordinates

Extract special coordinates

(OP)
Hello, that's me again but for another question

I got some pipes where I need to extract some special coordinates.
I'm attaching a file to show what kind of pipes I have.
For the T, I need to extract the origin coordinates, the end coordinates and the branch coordinates.
For the other one, I would like to extract the intersection of the neutral fibers.

How can I make that?

Moreover, how can I extract the diameter?

Best regards

RE: Extract special coordinates

(OP)
I'm not searching for free job made by another person, I'm just trying to have an idea of how doing that (e.g. like putting nodes on each part) and the type of command I have to write (e.g. product.Coordinates.GetOrigin MyVPOrigin)
I can write the rest by myself

RE: Extract special coordinates

you have to find those point in the part (I guess they are published) and get their XYZ and you might have to combine this with part position in order to get those point in root coordinate system and not just the part system.

Eric N.
indocti discant et ament meminisse periti

RE: Extract special coordinates

(OP)
Is it possible to extract points whose are in the sketcher mode through a macro?

RE: Extract special coordinates

if the point is in construction mode i dont know... if in standard mode it should be ok as a vertex.

Eric N.
indocti discant et ament meminisse periti

RE: Extract special coordinates

You can get sketcher entities through GeometricElements collection of Sketch Object.

Tesak
http://scripts4all.eu/txtoncurve/ - Curved text for Catia V5

RE: Extract special coordinates

(OP)

Quote (itsmyjob)

you have to find those point in the part (I guess they are published)

I think the publication isn't automatic but made by the person who design the sketch, so if the person doesn't do it, that won't work I think.

Ok tesak, so it will be something like
Dim oPoint As GeometricElement
Sub GetCoordinates( CATSafeArrayVariant oPoint) ?

RE: Extract special coordinates

Not exactly, try something like this:

CODE --> vba

Sub GetAllSketchPoints()
    Dim doc, mySketches, mySketch, elements
    
    Set doc = CATIA.ActiveDocument
    Set mySketches = doc.Part.MainBody.Sketches
    Set mySketch = mySketches.Item(1)
    Set elements = mySketch.GeometricElements
    
    For i = 1 To elements.Count
        If elements.Item(i).GeometricType = catGeoTypePoint2D Then
            Dim coords(1)
            
            elements.Item(i).GetCoordinates coords
            MsgBox "Point coordinates are: " & coords(0) & "," & coords(1)
        End If
    Next
End Sub 

This snippet will show you coordinates of all points in sketch.

Tesak
http://scripts4all.eu/txtoncurve/ - Curved text for Catia V5

RE: Extract special coordinates

(OP)
Actually I have something like that

And the global assembly has 250+ pieces, so I need to extract the information I need, no more. So I need those specific points of origin, end and branch.

The problem is: I don't know if the points in the sketcher will be in the same organized way from one part to another.

I thought about it after some tries and now I think the ideal solution would be to work on the surfaces directly.
I looked on the Automation file and I found some nice commands like GetOrigin, GetCenter, or GetOrigin, but on a part like this, I don't know how to organize my code

RE: Extract special coordinates

Hi,

Maybe is better to give more details...how are those pipe parts done? Ribs with curves (for guide curve and profile) or curves/lines in 3D and sketches for profile) or in another way (imported solids without history)?

Even better, few samples uploaded here could make us understand how your assy is done. Is it CATIA v5 or v6?

Regards
Fernando

https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU

RE: Extract special coordinates

If the structure of the part is always different and unique, such a task is almost impossible to automate and it always requires some manual input. If you have more assemblies like this sharing same parts then try perhaps to create this points manually, expose them and then you can get them whenever you need.

Tesak
http://scripts4all.eu/txtoncurve/ - Curved text for Catia V5

RE: Extract special coordinates

(OP)

Quote (ferdo)

Maybe is better to give more details...how are those pipe parts done? Ribs with curves (for guide curve and profile) or curves/lines in 3D and sketches for profile) or in another way (imported solids without history)?

Even better, few samples uploaded here could make us understand how your assy is done. Is it CATIA v5 or v6?
I'll upload some of the pieces as you asked.
It is Catia V5-6R2014

Quote (tesak)

If the structure of the part is always different and unique, such a task is almost impossible to automate and it always requires some manual input. If you have more assemblies like this sharing same parts then try perhaps to create this points manually, expose them and then you can get them whenever you need.
I'm not saying that it will always be different and unique, I'm just considering the case where it would be the worst.

I started to write a code as a test to extract centers of faces in my solid, but it still is on "beta testing" because I picked some commands everywhere and put them together to have my own code

CODE --> CATScript

Sub CATMain()

Dim InputObjectType(0)
Set Document = CATIA.ActiveDocument
 Set Selection = Document.Selection

 'We propose to the user that he select the face to extract coordinates
 InputObjectType(0)="Face"
 Status=Selection.SelectElement2(InputObjectType,"Select the face",true)
 if (Status = "cancel") then Exit Sub
 Set FaceToDraft = Selection.Item(1).Value
 Selection.Clear
 
 Dim Coordinates(2)
 FaceToDraft.GetCOG Coordinates

 MsgBox "x = " & Coordinates(0) & " ; y = " & Coordinates(1) & " ; z = " & Coordinates(2)

End Sub 
(Code not working atm)
As you can see, this is mainly the code you can find in the Automation about PlanarFace, but I'm trying to implement code that will allow me to select automatically the faces and give me the center in an Excel File.
Moreover, I'm trying to make a loop that will select the part once at the time

Edit: Parts uploaded

RE: Extract special coordinates

(OP)
I'm still thinking about the ways of doing such a job.
Could it be possible if the macro automatically identified points in the center of Planar faces, and then at each point I would make a GetFirstPointCoordinates?
It is really frustrating that commands like GetCenter work only on circle or sphere and not on Planar faces... shadessad

RE: Extract special coordinates

If you select circular edge, you can measure circle center coordinates this way:

CODE --> vba

Sub GetCenterPoint()
    Dim doc, sel, spa, ref, measurable
    
    Set doc = CATIA.ActiveDocument
    Set sel = doc.Selection
    Set spa = doc.GetWorkbench("SPAWorkbench")
    Set ref = sel.Item(1).Reference
    Set measurable = spa.GetMeasurable(ref)
    
    Dim coords(2)
    measurable.GetCenter coords
    
    MsgBox "Center coordinates are: " & coords(0) & "," & coords(1) & "," & coords(2)
End Sub 

To run this example you have to preselect a circular edge on your part.

Tesak
http://scripts4all.eu/txtoncurve/ - Curved text for Catia V5

RE: Extract special coordinates

you working backward... don't look at some code and say how can i use this? define the logic you want first then say: what is the code to get this?

the script you're doing is big. if you don't use a smart logic it will be a mess.

I guess you already have the output of your script: create file with proper information / format from CATIA to other tubing app.

now define the input: will it be a product of part with dumb solid, solid from tubing workbench, just tubing run, user created tube geometry... define what is in scope what is not.

then process with logic from geometry to get the info then from info to output format. The logic to extract the info will be different from one input (tubing run) to another (user created geometry). Try to have the least interaction with the user, make the application smart : why would you ask the user to select a solid if there is only one in the file? (the logic definition would help you define smart opportunities).

for your standard parts I would search for edges in the solid then keep only circle one and get circle center, from that you can also get the normal direction if you need.

for the tube, if you use the tubing workbench and have the run, you should be able to get the points (and bend radius) from the run. If you don't have the run but used the tubing workbench you should be able to identify the sketch that define the tube center line and then get info from vertices or edges regarding the info you need.

When a code is playing with selection is might be wise to prevent user from interacting... pop up a modal form that eventually inform the user about the process evolution : found tube name xxx, processing points, found standard part name yyy, processing points... this could also help you !

Eric N.
indocti discant et ament meminisse periti

RE: Extract special coordinates

(OP)
Ok, so just to see if it could work, I adapted the code tesak gave me above for a selection on my part and it doesn't work because "This object does not handle this property or method: EdgeToCenter.GetCenter". So I'm guessing I have a problem in my Dim or about the method (probably the selection method).
Here's my script

CODE --> CATScript

Sub CATMain()

 Dim InputObjectType(0)
 Set Document = CATIA.ActiveDocument
 Set Selection = Document.Selection
 
 'Selection of circular edge
 InputObjectType(0)="TriDimFeatEdge"
 Status=Selection.SelectElement2(InputObjectType,"Select the edge",true)
 if (Status = "cancel") then Exit Sub
 Set EdgeToCenter = Selection.Item(1).Value
 Selection.Clear
 
 Dim Coordinates(2)
 EdgeToCenter.GetCenter Coordinates


 MsgBox "x = " & Coordinates(0) & " ; y = " & Coordinates(1) & " ; z = " & Coordinates(2)

End Sub 

Quote (itsmyjob)

I guess you already have the output of your script: create file with proper information / format from CATIA to other tubing app.
Indeed, I have to put some information of the part into another format

Quote (itsmyjob)

now define the input: will it be a product of part with dumb solid, solid from tubing workbench, just tubing run, user created tube geometry... define what is in scope what is not.
Here's the thing: there will be runs and dumb solids so Product all the time

Quote (itsmyjob)

then process with logic from geometry to get the info then from info to output format. The logic to extract the info will be different from one input (tubing run) to another (user created geometry). for your standard parts I would search for edges in the solid then keep only circle one and get circle center, from that you can also get the normal direction if you need. for the tube, if you use the tubing workbench and have the run, you should be able to get the points (and bend radius) from the run. If you don't have the run but used the tubing workbench you should be able to identify the sketch that define the tube center line and then get info from vertices or edges regarding the info you need.
The problem is: I already have a macro working fine with my runs (I succeeded to extract the nodes, the coordinates of each nodes, the diameter and the bend of my runs), so my problem is on the parts because of the different components of a piping circuit. Since I will have circuit with over 100 parts in it, I have to make an autoselection

Actually, I know some programming way, but it's the first time I have something this big to do.
I may have a way to do it in a global way, but the problem is, I don't have the details to do it, like commands (and the automation file is not the best to find infos)

So thanks to everyone trying to help me!

RE: Extract special coordinates

You have forgotten to use measurable object. I adjusted your code a bit, it works now:

CODE --> vba

Sub CATMain()
    Dim doc, sel, spa, ref, measurable
    Dim inputObjectType(0)
    
    Set doc = CATIA.ActiveDocument
    Set sel = doc.selection
    Set spa = doc.GetWorkbench("SPAWorkbench")
 
    'Selection of circular edge
    inputObjectType(0) = "TriDimFeatEdge"
    Status = sel.SelectElement2(inputObjectType, "Select the edge", True)
    If (Status = "cancel") Then Exit Sub
        
    Set ref = sel.Item(1).Reference
    Set measurable = spa.GetMeasurable(ref)
    sel.Clear
    
    Dim Coordinates(2)
    measurable.GetCenter Coordinates
    
    MsgBox "x = " & Coordinates(0) & " ; y = " & Coordinates(1) & " ; z = " & Coordinates(2)
End Sub 

Tesak
http://scripts4all.eu/txtoncurve/ - Curved text for Catia V5

RE: Extract special coordinates

(OP)
Oh yes right! Thank you tesak!

RE: Extract special coordinates

(OP)
Humm, I tried to add
Dim Radius As Long
Set Radius = measurable.GetRadius
But it failed "GetRadius does not handle this property", but in the automation, it says that GetRadius works on circles.
And I tried Set Radius = measurable.Radius , same results.

Tried Dim oCoords(2)
measurable.GetCOG oCoords
Doesn't work too (I don't need the COG but just for test)

Did I forget something? Normally, it's on the measurable workbench and I called it before
ponder

I don't get why it works on GetCenter but not on GetRadius!

RE: Extract special coordinates

Radius is Long, not Object variable, so do not use Set keyword, just

CODE --> vba

Dim radius As double
radius = NewMeasurable.Radius 

Tesak
http://scripts4all.eu/txtoncurve/ - Curved text for Catia V5

RE: Extract special coordinates

(OP)
Ok thank you, works perfectly now!

RE: Extract special coordinates

(OP)
I got a little problem with my loop: on multiple selections, I only got the 1st element selected which gives me the results but after I got an error "Coordinates: type non compatible", so either I've got a problem in my loop or the selection method is wrong.

CODE --> CATScript

Sub CATMain()

    Dim intNbEdges As Integer
    Dim doc, sel, spa, ref, measurable
    Dim inputObjectType(0)
    Dim i As Integer
    
    Set doc = CATIA.ActiveDocument
    Set sel = doc.selection
    Set spa = doc.GetWorkbench("SPAWorkbench")
 
    'Selection of circular edge
    inputObjectType(0) = "TriDimFeatEdge"
    Status = sel.SelectElement3(inputObjectType, "Select the edge", True, CATMultiSelTriggWhenUserValidatesSelection, True)
    If (Status = "cancel") Then Exit Sub
  
  intNbEdges = sel.Count

  For i = 1 To intNbEdges

  Set ref = sel.Item(i).Reference
  Set measurable = spa.GetMeasurable(ref)
  
    Dim Coordinates(2)
    measurable.GetCenter Coordinates
    Dim Radius As Long
    Radius = measurable.Radius
    
    MsgBox "x = " & Coordinates(0) & " ; y = " & Coordinates(1) & " ; z = " & Coordinates(2) & " ; radius = " & Radius

    Next

End Sub 

Moreover: the selection palette is useful but it doesn't take the TriDimFeatEdge with the selection palette. How can I make it automatically?
I thought about a objGCATIASelection0.Search "(CATLndSearch.TriDimFeatEdge),all" but it doesn't seem to work

RE: Extract special coordinates

do you actually select a circular edge (planar)?

Eric N.
indocti discant et ament meminisse periti

RE: Extract special coordinates

(OP)
Yes, the inputObjectType(0) = "TriDimFeatEdge" only allows me to select circular edges, I tried it on several models.
I presume the error is in the loop but where is the question... Do I need to reinitialize one of the variables? Like coordinates?

RE: Extract special coordinates

i was able to select not planar edge with your code. I had problem only if I selected an edge that was not a circle.

Eric N.
indocti discant et ament meminisse periti

RE: Extract special coordinates

this s where you can use on error resume next / on error goto 0

Eric N.
indocti discant et ament meminisse periti

RE: Extract special coordinates

(OP)
But when I select all the edges of my part one at a time, there won't be any problem, and on this part I'm sure all I have are circular edges (start and end of a pipe).
If I put a "on error goto 0", I will have to make a new selection, right?

RE: Extract special coordinates

the on error goto 0 is here to cancel on error resume next.

so when you have something like an edge curve and want the circle center. you know circle center will fail if edge curve is not a circle so you do:

CODE -->

for i = 1 to x
    on error resume next
    create center point of edge (assuming it's a circle)
    if err.level <>0 then edge is not circle  but system continue (resume next)
    if err.level = 0 then point is created = edge is circle
    on error goto 0   ' this will bring err.level to 0 and stop script if any error is found = back to normal behavior.
next 

Eric N.
indocti discant et ament meminisse periti

RE: Extract special coordinates

(OP)
Yes! It works! Thanks Eric!

For the selection, do you have an idea about why the edges are not selected by the Tools Palette? I can't find anything about it on internet.

Also, I tried to automatize it, making a selection by the edges, but the command I tried (sel.Search "(CATLndSearch.TriDimFeatEdge),all" ) does not work that way. Do you have an idea about it?
The macro makes a selection of the part, then find all the edges and extract the wanted datas of all edges

RE: Extract special coordinates

(OP)
I'm still stuck on my problem of edges so I have to ask again, but in a better way:
Does anyone knows what are the items selected by the tools palette when you make

CODE --> CATScript

Status = sel.SelectElement3(inputObjectType, "Select the edge", True, CATMultiSelTriggWhenUserValidatesSelection, False) 
?
Because I can select the edges when I click on it but it's not included in the selection trap.

Same type of question with the command

CODE --> CATScript

sel.Search "(CATLndSearch.Product),all" 
How can I replace the .Product in a way that includes the edges? .TriDimFeatEdge doesn't seem to be good.

I'm sorry to ask here again but I can't find those informations in the automation doc nor on the web

RE: Extract special coordinates

(OP)
I tried a new way to do it but it failed, maybe you can tell me where is the error.

I tried "sel.Search("Type=TriDimFeatEdge, all")" but Method Search failed. So I wanted to add TriDimFeatEdge as a new support of search.
In automation it says that Add method will take an AnyObject, but when I wrote CATIA.ActiveDocument.Selection.Add(TriDimFeatEdge), still not working.
Do I have to put some line before? I know it's this hierarchy: AnyObject => Reference => Boundary => Edge => TriDimFeatEdge

RE: Extract special coordinates

(OP)
Ok, I found how to do it:
- Selection of all the edges with sel.Search "Topology.CGMEdge,all"
- Selection of only the TriDimFeatEdge

RE: Extract special coordinates

(OP)
Hey guys, likely the last time I'm asking you something but I need a little help again
Here is my loop to select the edges, that works alone

CODE --> CATScript

Sub CATMain()

    Dim intNbEdges As Integer
    Dim doc, sel, spa, ref, measurable
    Dim inputObjectType(0)
    Dim i As Integer
  
    Set doc = CATIA.ActiveDocument
    Set sel = doc.Selection
    Set spa = doc.GetWorkbench("SPAWorkbench")
 
    sel.Search "Topology.CGMEdge,all"
    intNbEdges = sel.Count
    MsgBox intNbEdges
    For i = 1 To intNbEdges
  
        Set myCircle = sel.Item(i)
        If myCircle.Type = "TriDimFeatEdge" Then

             On Error Resume Next
             Set ref = sel.Item(i).Reference
             Set measurable = spa.GetMeasurable(ref)
             Dim Coordinates(2)
             measurable.GetCenter Coordinates
             Dim Radius As Long
             Radius = measurable.Radius
             On Error Goto 0
             MsgBox "x = " & Coordinates(0) & Chr(10) & "y = " & Coordinates(1) & Chr(10) & "z = " & Coordinates(2) & Chr(10) & "Diametre = " & 2 * Radius
            
             Err.Clear
    End If
    Next

End Sub 

And I've got my first macro that will select the pieces, which is this one:

CODE --> CATScript

'//---------- Get current selection & root product
  Set objGCATIASelection1 = objGCATIADocument0.Selection
  Set objGCATIAProduct1 = objGCATIADocument0.Product

  If objGCATIASelection1.Count = 0 Then
    objGCATIASelection1.Search "(CATLndSearch.Product),all"
  End If

  Err.Clear


  Dim objProduct As Product
  Dim objProductMat As Product
  Dim intNbParts As Integer
  Dim k As Integer

  intNbParts = objGCATIASelection1.Count

  For k = 1 To intNbParts
    Set objProduct = Nothing
    Set objProductMat = Nothing

    Set objProduct = objGCATIASelection1.Item(k).Value
    Set objProductMat = objGCATIASelection1.Item(k)

    Err.Clear

    Dim objInertia As Inertia
    'On Error Resume Next
    Set objInertia = objProduct.GetTechnologicalObject("Inertia")
    Dim getMass As String
    getMass = objInertia.Mass
    Dim partName As String
    partName = objProduct.Name
    Dim Mat As Material
    Dim oManager As MaterialManager
    Set oManager = objProductMat.Item(k).GetItem("CATMatManagerVBExt")
    oManager.GetMaterialOnPart objProductMat.ReferenceProduct.Parent.Part,Mat
    matName = Mat.Name
    'MsgBox matName
    Dim Coordinates(2)
    objInertia.GetCOGPosition Coordinates

      intGReportCurrentRow = intGReportCurrentRow + 1
      InsertAnEXCELRowAt (intGReportCurrentRow)

      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleMass, getMass
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitlePartName, partName
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleMaterial, matName
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleCOGX, Coordinates(0) & "mm"
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleCOGY, Coordinates(1) & "mm"
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleCOGZ, Coordinates(2) & "mm"

    Next

    intGReportCurrentRow = intGReportCurrentRow + 1
    InsertAnEXCELRowAt (intGReportCurrentRow) 

But when I put the 1st one into the 2nd one, I don't succeed:

CODE --> CATScript

Sub CATMain()

  Dim objProduct As Part
  Dim objProductMat As Part
  Dim intNbParts As Integer
  Dim i As Integer
    Dim intNbEdges As Integer
    Dim doc, sel, spa, ref, measurable
    Dim inputObjectType(0)
    Dim j As Integer

  StartCATIA
  If Err.Number <> 0 Then
    Exit Sub
  End If

  StartEXCEL
  If Err.Number <> 0 Then
    Exit Sub
  End If

  Set objGCATIASelection0 = objGCATIADocument0.Selection
  Set objGCATIAProduct0 = objGCATIADocument0.Product

  If objGCATIASelection0.Count = 0 Then
    objGCATIASelection0.Search "(CATLndSearch.Part),all"
  End If

  intNbParts = objGCATIASelection0.Count

  For i = 1 To intNbParts
    Set objProduct = Nothing
    Set objProductMat = Nothing

    Set objProduct = objGCATIASelection0.Item(i).Value
    Set objProductMat = objGCATIASelection0.Item(i)

    Err.Clear
    'On Error Resume Next

    Dim objInertia As Inertia
    On Error Resume Next
    Set objInertia = objProduct.GetTechnologicalObject("Inertia")
    Dim getMass As String
    getMass = objInertia.Mass
    Dim partName As String
    partName = objProduct.Name
    'Dim Mat As Material
    'Dim oManager As MaterialManager
    'Set oManager = objProductMat.GetItem("CATMatManagerVBExt")
    'oManager.GetMaterialOnPart objProductMat.ReferenceProduct.Parent.Part,Mat
    'matName = Mat.Name
    Dim Coordinates(2)
    objInertia.GetCOGPosition Coordinates
  
    Set sel = CATIA.ActiveDocument.Item(i)
    Set spa = doc.GetWorkbench("SPAWorkbench")

'// Now for the second loop

    sel.Search "Topology.CGMEdge,all"
    intNbEdges = sel.Count
MsgBox intNbEdges
    For j = 1 To intNbEdges
  
        Set myCircle = sel.Item(j)
        If myCircle.Type = "TriDimFeatEdge" Then
              
             Set ref = sel.Item(j).Reference
             Set measurable = spa.GetMeasurable(ref)
             Dim oCoordinates(2)
             measurable.GetCenter oCoordinates
             Dim Radius As Long
             Radius = measurable.Radius
             
             MsgBox "x = " & oCoordinates(0) & Chr(10) & "y = " & oCoordinates(1) & Chr(10) & "z = " & oCoordinates(2) & Chr(10) & "Diametre = " & 2 * Radius
            
             Err.Clear
    End If
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleDepX, oCoordinates(0) & "mm"
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleDepY, oCoordinates(1) & "mm"
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleDepZ, oCoordinates(2) & "mm"

    Next

      intGReportCurrentRow = intGReportCurrentRow + 1
      InsertAnEXCELRowAt (intGReportCurrentRow)

      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleMass, getMass
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleMaterial, matName
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleCOGX, Coordinates(0) & "mm"
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleCOGY, Coordinates(1) & "mm"
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleCOGZ, Coordinates(2) & "mm"
      'WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleDepX, oCoordinates(0) & "mm"
      'WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleDepY, oCoordinates(1) & "mm"
      'WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitleDepZ, oCoordinates(2) & "mm"
      WriteToEXCELRunSheet intGReportCurrentRow, strGReportTitlePartName, partName

Next
    intGReportCurrentRow = intGReportCurrentRow + 1
    InsertAnEXCELRowAt (intGReportCurrentRow)

End Sub '/////////////////////////////////////////////////////////// CATMain 
I'm guessing it's about the selection "sel" which is likely wrong because the MsgBox intNbEdges shows up empty.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources