Sorry if this has already been solved,
I have this error in my iLogic code for inserting sketch symbols. "Public Member 'ActiveSheet' on type 'Drawing View' not found"
I have declared everything in the code. I dont understand what it cant find.
Thanks.
Error:
My Code:
Solved! Go to Solution.
Solved by mrattray. Go to Solution.
"ActiveSheet" is part of the "DrawingDocument" object, not the drawing view object.
Hope this helps.
Btw, do you know about the programming help in inventor?
I looked this up in there, might be usefull.
Niels van der Veer
Inventor professional user & 3DS Max enthusiast
Vault professional user/manager
The Netherlands
Hi Mike,
I changed my code to suit but it flashes error : Index outside bounds of array.
However, I replay the Name prompted entry with the ActiveSheet.Name it displays the sheet name fine.
I think it may be a problem with more then 2 prompted entries?!
I Dont know how to link the prompted entries to the code in the order it appears.
See my attached updated code & prompted strings.
Thanks
Sandy
Code:
Promted Entries List:
I think the index error comes from the fact that you have your sPromptStrings varibale defined as an array from 0 to 1 and you're trying to fill it from 0 to 2. In other words you're saying "this box holds two things, put three in."
Try changing "Dim sPromptStrings(1) As String" to "Dim sPromptStrings(2) As String".
Thanks for explaining Mike.
The prompted entry is still entering the active sht though & not the active sheet of the view I select in the browser.
Also, If I select a view in the browser (on a different sht) to insert the symbol under, it inserts it on the active sheet in the correct position rather then on the sht where i selected the view.
Do you know any way around this?
Thanks
Sandy
HI Mike,
No that doesnt work. The symbol still appears on the active sheet rather then the sheet with the view I have selected in the browser. It appears to be inserted in the relevant position, according to the insertion coordinates, just on the wrong sheet!