hexagon logo

IsFeature?

PT501 =FEAT/POINT,CARTESIAN
THEO/<39.8049,-1.2775,-1.5851>,<0.5235208,0.8519339,0.0116005>
ACTL/<39.8049,-1.2775,-1.5851>,<0.5235208,0.8519339,0.0116005>
MEAS/POINT,1,WORKPLANE
HIT/BASIC,NORMAL,<39.8049,-1.2775,-1.5851>,<0.5235208,0.8519339,0.0116005>,<39.8049,-1.2775,-1.5851>,USE THEO=YES
ENDMEAS/

DIM D501= LOCATION OF POINT PT501 SD=0.0000 UNITS=IN ,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
AX MEAS NOMINAL +TOL -TOL DEV OUTTOL
X 39.8049 39.8049 0.0150 0.0150 0.0000 0.0000 ----#----
Y -1.2775 -1.2775 0.0150 0.0150 0.0000 0.0000 ----#----
Z -1.5851 -1.5851 0.0150 0.0150 0.0000 0.0000 ----#----
T 0.0000 0.0000 0.0150 0.0150 0.0000 0.0000 ----#----
END OF DIMENSION D501

PT501 is a DMIS point, not a PCDMIS vector or surface point.
Have to leave them in program and not convert to a PCDMIS point.
I have a script the tests if a Cmd is a feature.
IF Cmd.IsFeature THen
Count = Count + 1.

PT501 is detected as a feature,
but the Cmd.IsFeature is detecting another feature incrementing
the counter when I don't want it incremented.

Would it be the MEAS/POINT,1/WORKPLANE that is considered
a feature and how would I test for that and not have the counter
incremented?

Hope that makes sense!

Parents
  • Not very impressive, but I think I got it.
    It does what I wanted.
    Had to decrease the counter when Cmd.ID was " ".
    Sorry I bothered you all Slight smile

    Count = InputBox("Enter the start number :","start number")
    feecher = InputBox("Enter the feature name :","feature name")

    For Each Cmd In Cmds

    IF ((Cmd.IsDccFeature) OR (Cmd.IsFeature)) AND (Cmd.Marked) Then
    IF Cmd.ID = "" THEN
    Count = Count-1
    END IF
    Cmd.ID = feecher + "" + STR(count)
    count = count + 1
    END IF


    Cmd.Redraw


    Next Cmd
    MsgBox "PROGRAM IS DONE"
    End Sub​
Reply
  • Not very impressive, but I think I got it.
    It does what I wanted.
    Had to decrease the counter when Cmd.ID was " ".
    Sorry I bothered you all Slight smile

    Count = InputBox("Enter the start number :","start number")
    feecher = InputBox("Enter the feature name :","feature name")

    For Each Cmd In Cmds

    IF ((Cmd.IsDccFeature) OR (Cmd.IsFeature)) AND (Cmd.Marked) Then
    IF Cmd.ID = "" THEN
    Count = Count-1
    END IF
    Cmd.ID = feecher + "" + STR(count)
    count = count + 1
    END IF


    Cmd.Redraw


    Next Cmd
    MsgBox "PROGRAM IS DONE"
    End Sub​
Children
No Data