Guest
(Guest)
July 19, 2011, 12:55pm
1
Ive been trying to use the professional version to set the imbedded Edit Controls with a label, however when I trying to get the object list I get an error -23 when trying to open the project.
With objLL
hProj = .LlProjectOpen(LL_PROJECT_LABEL, sPathAndFile, LL_PRJOPEN_AM_READWRITE)
Lret = .LlDomGetObject(hProj, "Objects", hObjList)
Ideally I want to populate two Edit Fields and then lock them both, but I’m falling over at the first hurdle.
Anyone have any ideas?
Guest
(Guest)
July 20, 2011, 5:42pm
2
Well finally got the code working… mostly
.LlDomSetProperty
doesn’t seem to work with the Locked and ReadOnly (hence the three variations)
Any one know the correct syntax?
With ListLabelObj
Call GrabData(sPathAndFile)
Call .LlSetOption(LL_OPTION_INCREMENTAL_PREVIEW, 0)
lRet = .LlPreviewSetTempPath("")
lRet = .LlPrintWithBoxStart(LL_PROJECT_LABEL, sPathAndFile, LL_PRINT_PREVIEW, LL_BOXTYPE_STDABORT, Me.hWnd, "Printing...")
lRet = .LlDomGetProject(hProj)
lRet = .LlDomGetObject(hProj, "Objects", hObjList)
lRet = .LlDomGetSubobjectCount(hObjList, lCount)
For i = 1 To lCount
lRet = .LlDomGetSubobject(hObjList, i, hSub)
lRet = .LlDomGetProperty(hSub, "Name", sVal)
Select Case sVal
Case "Losnummer"
lRet = .LlDomSetProperty(hSub, "DefaultValueText", "'" & m_sLossNumber & "'")
lRet = .LlDomSetProperty(hSub, "Locked", "True")
lRet = .LlDomSetProperty(hSub, "ReadOnly", "True")
Case "Deutschland"
lRet = .LlDomSetProperty(hSub, "DefaultValueText", "'" & m_sOrigin & "'")
lRet = .LlDomSetProperty(hSub, "Locked", True)
lRet = .LlDomSetProperty(hSub, "ReadOnly", True)
Case "ggn"
lRet = .LlDomSetProperty(hSub, "DefaultValueText", "'" & m_sGGN & "'")
lRet = .LlDomSetProperty(hSub, "Locked", "'True'")
lRet = .LlDomSetProperty(hSub, "ReadOnly", "'True'")
Case Else
End Select
Next i
lRet = .LlPrint()
lRet = .LlPrintEnd(0)
If lRet = -4 Then
b = False
GoTo exitHere
Else
'loads prieview file LL
LlView.FileURL = sPathAndFile
Call LlView.SetZoom(m_lZoom)
End If
End With
Guest
(Guest)
July 21, 2011, 10:46am
3
Had no joy with the .LlDomSetProperty setting the ReadOnly or Locked.
So in the end I had to settle for disabling the preview.
ie
LlView.endabled = false.
But it does mean if a label design with more controls is supplied by the customer then a code change will be required.