hexagon logo

Problem accessing CadModel.CADProjectPoint from Basic Script

Trying to access the my Cad model in the Graphics Display Window using a PC-DMIS basic script. Getting a "Missing parameter(s)" error message. Here's what I have with the error being generated on the last line seen below;

'==================
Sub GetProjectPointData()
'==================
Dim App As Object
Dim Part As Object
Dim Cmds As Object
Dim GWindow As Object
Dim CadWin As Object
Set App = CreateObject("PCDLRN.Application")
Set Part = App.ActivePartProgram
Set Cmds = Part.Commands
Set GWindow = Part.CadWindows
Set CadWin = GWindow.Item(1)
Dim CADMod As CadModel
Set CADMod = Part.CadModel
'
'
Dim RetVal As Boolean
Dim XT, YT, ZT, DIRX, DIRY, DIRZ, PX, PY, PZ, PDIRX, PDIRY, PDIRZ As Double
Dim FeatureName, FID As String
'
CadWin.Visible = True

XT=NetData(7,1)
YT=NetData(7,2)
ZT=NetData(7,3)
CADMod.CADProjectPoint(XT, YT, ZT,7,0,0, PX, PY, PZ, PDIRX, PDIRY, PDIRZ,2)



The Function info in the help menus has 13 parameters, (as do I). Haven't tried accessing the Graphics display window from a script before and not sure if i have everything right here, but it does compile without errors, so...

If anyone that has basic script/Pcdmis knowledge about this topic, it would be much appreciated if you could take a peek at this and steer me in the right direction if there are blaring issues seen at first glance. Alien


  • I assume you have FIND NOMS selected in the auto vector point dialog? And have done an alignment?
  • No and Yes. Had F5 Setting in General box 'Find Nominals' checked and 'Find Nominals on Execution' checked. Looked at auto vector_point feature and was set to 'Nominal'. Will perform test again and get back with results.
    Alien
  • Well that works. Not sure what is faster.

    Currently we measure all the net pad hits, then right-click on each feature to access OverRide Nominals Window, pick the surface to bump point onto, select the drop point from menu and click override button.

    With this new method, we would measure 5 hits on net pad. Edit each hit to activate "Find Nominals", re-execute hits and re-measure again by pressing A button on T-probe and then B button to end.

    6 of one, half a dozen of the other as far as saving time I think. Thank for your help AnderdI. I'll still play with accessing cad model in graphics window and update this thread if I come up with anything.

    X DEA employee (13 year), current FCA employee (24 years). Alien
  • "X DEA employee" it all makes sense now...
  • Response 14.1

    Yeah, I guess that shows my age and being a little old school (using memory sucking, multi-dimensional arrays and all, KEK).

    So Kp61dude!, any thoughts on how to access my cad model in the Graphics Display Window using the basic script editor?
    Or using the CadHandle object, or the CadModel.CADProjectPoint in a script?
  • Response 14.1

    Yeah, I guess that shows my age and being a little old school (using memory sucking, multi-dimensional arrays and all, KEK).

    So Kp61dude!, any thoughts on how to access my cad model in the Graphics Display Window using the basic script editor?
    Or using the CadHandle object, or the CadModel.CADProjectPoint in a script?


    I've not had any success with the object you speak of. I attempted to help a fellow user on here, he was attempting to highlight features on the graphics screen, never got what we were after. I'm hoping you come across fresh discoveries.