ialscorp
Automotive
- Aug 31, 2007
- 20
could anyone to help
I know in GRIP but in VB
how to work with drawing objects
i need just to check colors of object
if color number is wrong, prompt the user...
where is mistake
error:"Number of indices is less than the number of dimensions of the indexed array" in line with "askdisplayedobjects"
code:
Sub check_colors
Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim workPart As Part = theSession.Parts.Work
Dim drawingSheets() As DrawingSheet
Dim mySheet as DrawingSheet
drawingSheets = workPart.DrawingSheets.toArray
Dim dfviews() As DraftingView
Dim dfview As DraftingView
Dim num_objects As Integer
Dim objects() As Tag
For Each mySheet In drawingSheets
dfviews = mySheet.GetDraftingViews()
For Each dfview In dfviews
ufs.Draw.AskDisplayedObjects( dfview.tag,num_objects , objects())
Next
Next
End sub
I know in GRIP but in VB
how to work with drawing objects
i need just to check colors of object
if color number is wrong, prompt the user...
where is mistake
error:"Number of indices is less than the number of dimensions of the indexed array" in line with "askdisplayedobjects"
code:
Sub check_colors
Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim workPart As Part = theSession.Parts.Work
Dim drawingSheets() As DrawingSheet
Dim mySheet as DrawingSheet
drawingSheets = workPart.DrawingSheets.toArray
Dim dfviews() As DraftingView
Dim dfview As DraftingView
Dim num_objects As Integer
Dim objects() As Tag
For Each mySheet In drawingSheets
dfviews = mySheet.GetDraftingViews()
For Each dfview In dfviews
ufs.Draw.AskDisplayedObjects( dfview.tag,num_objects , objects())
Next
Next
End sub