Hi,
I am trying to return the sheet number (Shows as RD-0001) using the “SheetNumber” PropertyHandler in VBA but it returns the sequence number (11) and not the Sheet Number (RD-0001).
OpenRoads Designer 2020 R3
Any help would be greatly appreciated.
Hi Les,
be aware this is general Developer and Programming Forum, whereas your question is about civil product. I recommend to move your question to Civil Programming forum. To move existing discussion, use More > Move tool available under your original post.
Les Leayr said:Any help would be greatly appreciated.
It's hard to help and say what is wrong when you do share no piece of your code, so it's not possible to check even basic things like what Access string do you use in your code and whether the used id (access string) is correct one.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Sorry, here is some of the code -
Set oModel = oFile.Models(index) Set oPH = CreatePropertyHandler(oModel) oDescription = oModel.Description If oModel.Type = msdModelTypeSheet Then ShowSheetNumber oPH, "SheetNumber", sNumber 'Below is the ShowSheetNumber sub - 'Returns the sheet number property of the sheet Sub ShowSheetNumber(oPH As PropertyHandler, accessString As String, sNumber As String) On Error GoTo HandleError If Not oPH.SelectByAccessString(accessString) Then Debug.Print "NOT FOUND!!" Else If oPH.GetDisplayString = "0" Then Else sNumber = oPH.GetDisplayString End If End If Exit Sub HandleError: Debug.Print Err.Description End Sub
I am using the SheetNumber Access String but it is returning the sequence number.
I think you have to use "SheetName", not "SheetNumber" as access string.
Answer Verified By: Les Leayr