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


Parents
  • Response #10:
    AndersI, I did a test and no luck. We are in manual mode, learning each point into the program as we measure manually on the tooling. After learning 5 hit points on a net pad, I re-executed the points and re-measured them individually. The THEO's picked up in the measured hit does not match the THEO seen in the OverRide Nominals Window when I bump the point to CAD model in Graphics Display Window.

    Could it be possible that the "Find Nominal on Execution" is for Scanning? I'm not sure myself seeing as I have not done any scanning to see how this works with scans. It doesn't appear to work (pick up nominals from cad model) using our Tracker Software.

    I guess my real issue is still 'Trying to access the CAD model in the Graphics Display Window' using a basic script. I can access the Edit Window features and even refresh the Report Window through commands in my script, but haven't figured out how to access the GDWindow.

    The CadModel Object description is:

    "The CadModel object allows you to work with the imported CAD model in PC-DMIS' Graphic Display Window".

    I haven't seen anywhere (Internet, pcdmis forum, etc...) where someone has the basic script calls to access the GDWindow. I have been in contact with Hexagon here in Michigan. Will give them a call back today and see if they can push this to a higher level to see if someone knows how to do this through a script. Not sure if the type declarations are correct in these CadModel Methods are correct and certainly not sure about the CadHandle Object and how that intertwines into all of this.

    Still in Limbo here at FCA, Alien
Reply
  • Response #10:
    AndersI, I did a test and no luck. We are in manual mode, learning each point into the program as we measure manually on the tooling. After learning 5 hit points on a net pad, I re-executed the points and re-measured them individually. The THEO's picked up in the measured hit does not match the THEO seen in the OverRide Nominals Window when I bump the point to CAD model in Graphics Display Window.

    Could it be possible that the "Find Nominal on Execution" is for Scanning? I'm not sure myself seeing as I have not done any scanning to see how this works with scans. It doesn't appear to work (pick up nominals from cad model) using our Tracker Software.

    I guess my real issue is still 'Trying to access the CAD model in the Graphics Display Window' using a basic script. I can access the Edit Window features and even refresh the Report Window through commands in my script, but haven't figured out how to access the GDWindow.

    The CadModel Object description is:

    "The CadModel object allows you to work with the imported CAD model in PC-DMIS' Graphic Display Window".

    I haven't seen anywhere (Internet, pcdmis forum, etc...) where someone has the basic script calls to access the GDWindow. I have been in contact with Hexagon here in Michigan. Will give them a call back today and see if they can push this to a higher level to see if someone knows how to do this through a script. Not sure if the type declarations are correct in these CadModel Methods are correct and certainly not sure about the CadHandle Object and how that intertwines into all of this.

    Still in Limbo here at FCA, Alien
Children
No Data