Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Error Public Member on type not found

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
shmartin89
3819 Views, 7 Replies

iLogic Error Public Member on type not found

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:

 

Error.JPG

 

 

My Code:

 

Code.JPG

 

7 REPLIES 7
Message 2 of 8
-niels-
in reply to: shmartin89

"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.

Programming_help.png


Niels van der Veer
Inventor professional user & 3DS Max enthusiast
Vault professional user/manager
The Netherlands

Message 3 of 8
mrattray
in reply to: shmartin89

To elaborate on Niels' response, try replacing "oView.ActiveSheet.Sheet" with "ActiveSheet.Name". I'm assuming that the name of the sheet is what you're trying to get from that line.
Mike (not Matt) Rattray

Message 4 of 8
shmartin89
in reply to: mrattray

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:

 

Code.JPG

 

Promted Entries List:

 

PE.JPG

Message 5 of 8
mrattray
in reply to: shmartin89

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".

Mike (not Matt) Rattray

Message 6 of 8
shmartin89
in reply to: mrattray

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

 

 

Message 7 of 8
mrattray
in reply to: shmartin89

I assumed you wanted the symbol to be inserted on the active sheet since you were trying to use the ActiveSheet property.
Try using "oView.Parent.Name".
Mike (not Matt) Rattray

Message 8 of 8
shmartin89
in reply to: mrattray

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!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report