PDA

View Full Version : Redraw Error on Gear operated Handwheel



Packin31
11-15-2006, 10:46 AM
Has any seen this error when you perform an AutoPLANT Representation/Redraw.

Command:
AT_DDREP Select the components to redraw
Select objects: 5 found, 1 group

Select objects:

at_CADCylinder_create: Execution error.

at_CADObject_addToDrawing: NULL object parameter.

See attach PDF and see what happens to gear operated hand wheel.

This also happens when we copy components.

polekaat
11-16-2006, 09:27 AM
I've ran into a similar problem when copying operators. If you just double click on the screwed up operator, it opens the edit window, then hit OK, the problem is fixed. Just save after you've fixed them all.

Trevor

Packin31
11-16-2006, 12:35 PM
Trevor,

Yes I know you can do that but I was wondering if there is a fix for this instead of having to click on ever actuator that you copy over?

WiZardOz
11-16-2006, 06:01 PM
The problem is that when you do a representaion/redraw it doesn't get P2Dir from the component. It also changes the handwheel spindle diameter because poor placement of a if not AT_SUCCESS in the code..

This can all be fixed by making the following changes in topgrac1.ebs to the Sub gear_draw3D routine

Find this part of the routine

'// Get height and diameter from a component database

status = at_Component_getPoint (basePt, compID, "P1.Loc")
status = at_Component_getPoint (midPt, compID, "P2.Loc")
status = at_Component_getReal (length1, compID, "Length")
status = at_Component_getReal (length2, compID, "GearID")
status = at_Component_getReal (length3, compID, "HandleL")
status = at_Component_getReal (diam, compID, "GearThick")
status = at_Component_getReal (offset, compID, "HandleD")
status = at_Component_getReal (currentOption, compID, "LeftOffset")
status = at_Component_getCurrParentID(parentCompID)
status = at_Component_getReal (valvD, parentCompID, "PIPE_OD_M")
status = at_Component_getVector (P2Dir,compID, "P2.Dir")
valvD = valvD / 3

If ((status <> AT_SUCCESS) Or (valvD = 0)) Then
status = at_Component_getReal(valvD, compID, "HandleD")
valvD = valvD / 5
End If
status = at_Component_getReal (val, parentCompID, "YGLOBE")

Modify it as per below

'// Get height and diameter from a component database

status = at_Component_getPoint (basePt, compID, "P1.Loc")
status = at_Component_getPoint (midPt, compID, "P2.Loc")
status = at_Component_getReal (length1, compID, "Length")
status = at_Component_getReal (length2, compID, "GearID")
status = at_Component_getReal (length3, compID, "HandleL")
status = at_Component_getReal (diam, compID, "GearThick")
status = at_Component_getReal (offset, compID, "HandleD")
status = at_Component_getReal (currentOption, compID, "LeftOffset")
status = at_Component_getCurrParentID(parentCompID)
status = at_Component_getReal (valvD, parentCompID, "PIPE_OD_M")

'#### Following line commented out - fix for representaion/redraw glitch
' status = at_Component_getVector (P2Dir,compID, "P2.Dir")
'####

valvD = valvD / 3

If ((status <> AT_SUCCESS) Or (valvD = 0)) Then
status = at_Component_getReal(valvD, compID, "HandleD")
valvD = valvD / 5
End If

'#### New Code Added - fix for representaion/redraw glitch
status = at_Component_getVector (P2Dir,compID, "P2.Dir")
If (status <> AT_SUCCESS) Then
Call at_Vector_computeNormal (P2Dir, basePt, midPt)
End If
'####

status = at_Component_getReal (val, parentCompID, "YGLOBE")

Problem SOLVED !!
I haven't experienced the problem when copying tho .. only on redraws

Packin31
11-17-2006, 03:51 AM
Thanks Wizard it works for redraw and when I copied a few valves.

Isn't this site great to get quick and great answers on our question :)