Trying to create autom drawings for the parts in a folder inside the master drawing on a different border and title block but Border API ❌Keeps blocking me because im using a different border

Trying to create autom drawings for the parts in a folder inside the master drawing on a different border and title block but Border API ❌Keeps blocking me because im using a different border

t_fransman
Advocate Advocate
104 Views
4 Replies
Message 1 of 5

Trying to create autom drawings for the parts in a folder inside the master drawing on a different border and title block but Border API ❌Keeps blocking me because im using a different border

t_fransman
Advocate
Advocate

How can i create drawings for all of the ipt's in a folder on a different template (smaller "b size") it keeps blocking the border api even if i have it in the drawing already won't accept t the Copy of border? I need to create them inside the master drawing after my weldments and First page main assembly.   basically i am here in the process 

Create Sheet
2
Read IPT Data
3
Title Block
4
Sketch Symbol
5
Prompt Population
6
Flat Pattern Views
7
Folded Views
8
 
9
Border API wont let me select the Copy of "my company" Border that i need for "b size" in the drawings

 

0 Likes
Accepted solutions (1)
105 Views
4 Replies
Replies (4)
Message 2 of 5

t_fransman
Advocate
Advocate

Everything works except i have to add the border manually and that's a p.i.t.a

I don't understand why i cannot program a way to add pick a border option or something select a border automatically based on size wow. so minimal 

 

 

0 Likes
Message 3 of 5

WCrihfield
Mentor
Mentor

Hi @t_fransman.  Is it showing an error message?  If so, does it indicate which line of code is encountering the exception?  Is it the line of code where you are using the Sheet.AddBorder method (Inventor API), or is it before that point?  That method's documentation says that if there is already a Border on the Sheet, then we need to delete that Border before we add a new Border to the Sheet, or it will throw an exception.  Also, does your border have any 'prompted entries'?  If so, then you would need to provide an array of Strings with the correct number of entries when adding the Border to the Sheet, or it will throw an error.

If oSheet.Border IsNot Nothing Then
   oSheet.Border.Delete()
End If
oSheet.AddBorder(oBorderDef, oPromptStringsArray)

Or are you having trouble copying the BorderDefinition you want to use from some other document like a template to your current document?  It will not let you use a border definition which is located in another document, so if the border definition you want only exists in another document, you will first have to copy it to the document you want to use it in.  If none of these are the problem, then please explain the exact step(s) where it is encountering the problem in as much detail as possible.

Or are you using the uniquely iLogic methods, like the ICadDrawingSheet.SetBorder method?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 4 of 5

t_fransman
Advocate
Advocate

Hi , thanks for the re- I have it in the drawing but it still selects the first one in the list, not sure how to cycle through or automatically select a different one for placement? Any ideas? I had it where it gets the one in yellow but i need it to grab the one w the red arrow. These are in the drawing that I a, trying to make the views of ea. fab'd piece. The option i tried next was to install the borders after which is annoying. 

 

 

t_fransman_0-1789383804053.png

 

0 Likes
Message 5 of 5

t_fransman
Advocate
Advocate
Accepted solution

Nevermind i solved itThe border def name had an extra space before the word Border ..Ugh not sure who did that. 

 

0 Likes