Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

IBL files crash Wildfire to desktop

treddie

New member
Howdie.
I have a little vb6 program that builds IBL points files for me so that I can import these into ProE as Datum curves.It works great (simple thing really), but I have one file that keeps crashing ProE to the desktop.I have gone through the file and selectively removed blocks of points to try to isolate where in the file the suspect point is, but each block I test has been successful (not crashed ProE).In this manner, I have tested all of the point sets in the file to find out whether there is a problem in my code, or in ProE.There are 353 points total in the file, with 3 sets containing 103 points each.It is these 3 large sets that I selectively removed points and tested the results.Is there a known bug in ProE concerning IBL files in general, or is there a limit to the amount of points that can be in an IBL file?Again, all of the data works when I remove points from the three long sets, I just can't get the WHOLE file to work with ProE all at once.I COULD break the file up into 3 separate files (and this works), but that's a bit of a drag, if this problem is fairly frequent.
Thanks everyone,
treddie
 
> A copy of the private messenger email:


Howdie wsylvester.


Thanks for responding.


I finally figured out the problem. I knew previously that file pathnames that are too long can crash W2 to the desktop, but I thought I tested that possibility for this file. Turns out I didn't. I went back and moved the IBL file to a location with a very short pathname and everything works fine now.The issue does not appear to betoo many subdirectories, but the overall amount of characters in the path.


I noticed, though, your sample file. Your sample has far more complexity to it than just a list of points with the standard "Begin" headers. Do you know of a good reference on the IBL file format? I have had about zero luck trying to find one. In fact, the reason I was able to build my simple files at all was because I found a sample on the web.


Thanks again!


treddie
Edited by: treddie
 
This is an update to everyone wanting to know about IBL files. A lot of what you see here was condensed from private messenger, so was not public.


------------------------------------------------------------ --------------------------


------------------------------------------------------------ ---------------------------------------------------------------------
I found your post on IBL files. I'm having the same problem figuring out how they work. Have you figured out anything more on IBL files and how to use the more complex features? If you could email me the IBL file with complex functions that you mentioned, that would be very helpful so I could try to figure out how it works.


Davido


------------------------------------------------------------ ----------------------------------------------------------------------


Howdie Davido,


These examples are the only ones I have or know of. In researching the IBL format, I have come to the conclusion that this is all there is to it, though, without an official file reference, I can't say for sure. Strange that something that is so important lacks any "history" or documentation at all other than what I gathered from web forums, and that was almost non-existent. As a result, I had to spend some hours to find it. So where did THEY get the info?! Outer space aliens I think.


From my personal library of ProE procedures:



This procedure uses the Imported Blend File (ibl), text file format, and is built in NotePad.


Simply create a header for the file:


Open Arclength


Immediately following the header, go the point coords for the first curve in xyz format:


Begin section ! 1


Begin curve ! 0


3.473 6.125 9.912


2.107 3.673 7.385


7.776 21.782 11.987


3.009 1.6707 3.312


Immediately following the last data, go the point coords for the next curve in xyz format:


Begin section ! 2


Begin curve ! 1


7.475 2.178 7.219


6.734 6.444 1.922


10.212 -3.326 -1.333


...And so on, for as many curves as you need.


Once the file has been created, be sure to change the .txt file extension to .ibl.


----------------------------------------


In ProE (W2), select menu Insert > Model Datum > Curve.


Select Menu Manager > CRV Options > From File > Done, then:


-Select desired CSys.


-File dialog will appear. Select file type - .ibl, and select the desired .ibl file.


The datum curves should appear.


With regards to building surfaces:
Next, choose to "Insert Boundary Blend", select the curves you want to skin from and to, and you will see your surfaces begin to appear (note the command for this way back in Pro/E 2001 and prior is "Feature > Create > Surface > New > Advanced > Boundaries").

If a change is required to the coordinate points, simply "Edit Definition" of the curve file and cut and paste the new XYZ data. You will see you surfaces update based on the new data.
------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ ---------------------------------------This code was offered by cadcamguy at ProE-Tips, illustrating a vb program to write out an .ibl file. This example appears to write out the points of an ellipse at a constant height (z). Inputs are the Semimajor Axis (x_val), Semiminor Axis (y_val) and (z).


Notice that he uses the header Closed Index Arclength, instead of Open Arclength. In examining this, I believe "Closed" refers to a closed path, "Open" for an open path. "Index" appears to do with the fact that each point triad is preceeded by an index which seems to do nothing more than give that particular triad a name.


Note that he drops the repeated use of the header, "Begin Section ! x", and only uses it once. For my uses I found that this did not work, but can't remember why, although I think it had to do with successfully getting the data into ProE, not just the way I particularly needed it.


From cadcamguy:



Dim ratio As Double
Dim x As Double
Dim y As Double
Dim z As Double
Dim so As Double
Dim rv As Double
Dim x_val As Double
Dim y_val As Double
Dim z_val As Double
Dim so_val As Double
Dim stepover As Double
Dim reps As Integer
Dim deg2rad As Double
Dim ang As Double
Dim pi As Double
Dim ofile As String
Dim frmt As String
Dim xf As String
Dim yf As String
Dim zf As String
Dim sof As String
Dim res As Double
Dim ibl_header As String
Dim ibl_head2 As String
Dim c As Integer


Dim x_incr As Double
Dim y_incr As Double


Private Sub Form_Load()


pi = 4 * Atn(1)
deg2rad = pi / 180
ofile = "vb.pts"
frmt = "###.####"
res = 0.0001
ibl_header = "Closed Index Arclength"
ibl_head2 = "Begin section ! 1"



End Sub
Private Sub Command1_Click()


x_val = Val(Text1.Text)
y_val = Val(Text2.Text)
z_val = Val(Text3.Text)


ratio = y_val / x_val


If Option1.Value = True Then make_ibl


Open ofile For Output As #1



For q = 0 To 180
ang = q * deg2rad


x = x_val * Cos(ang)
y = x_val * Sin(ang) * ratio
z = z_val


xf = Format(x, frmt)
If Abs(Val(xf)) < res Then xf = "0.0"
yf = Format(y, frmt)
If Abs(Val(yf)) < res Then yf = "0.0"
zf = Format(z, frmt)
If Abs(Val(zf)) < res Then zf = "0.0"


'Debug.Print xf, yf, zf


Print #1, xf, yf, zf


Next q


Close #1
End Sub


Public Sub make_ibl()


so_val = Val(Text4.Text)
rv = Val(Text5.Text)
z_val = -so_val


x_incr = Val(Text6.Text)
y_incr = Val(Text7.Text)


x_val = x_val - x_incr
y_val = y_val - y_incr


ofile = "myibl.ibl"


Open ofile For Output As #1


Print #1, ibl_header
Print #1, ""
Print #1, ibl_head2


For c = 1 To rv
z_val = z_val + so_val


x_val = x_val + x_incr
y_val = y_val + y_incr


ratio = y_val / x_val


'Debug.Print ratio


Print #1, " Begin curve ! "; c
For q = 0 To 180
ang = q * deg2rad


x = x_val * Cos(ang)
y = x_val * Sin(ang) * ratio
z = z_val


xf = Format(x, frmt)
If Abs(Val(xf)) < res Then xf = "0.0"
yf = Format(y, frmt)
If Abs(Val(yf)) < res Then yf = "0.0"
zf = Format(z, frmt)
If Abs(Val(zf)) < res Then zf = "0.0"



Print #1, (q + 1), xf, yf, zf



Next q
Next c


Close #1
End


End Sub


------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ ---------------------------------------


In one of my posts, I incorrectly mentioned that I noticed that cadcamguy's example had a lot of other symbols in it that appeared at first sight to be commands. Now I believe these were just formatting characters that did not translate over well when he posted the example online:


From cadcamguy:



i set the step to 45 ;


Closed Index Arclength


Begin section ! 1
Begin curve ! 1
1 ; 100. 0.0 &nb sp; 0.0
46 &nbs p; 70.7107 35.3553 0.0
91 &nbs p; 0.0 &nb sp; 50. &nb sp; 0.0
136 &nb sp; -70.7107 35.3553 0.0
181 &nb sp; -100. 0.0 &nb sp; 0.0
Begin curve ! 2
1 ; 100. 0.0 &nb sp; 10.
46 &nbs p; 70.7107 35.3553 10.
91 &nbs p; 0.0 &nb sp; 50. &nb sp; 10.
136 &nb sp; -70.7107 35.3553 10.
181 &nb sp; -100. 0.0 &nb sp; 10.


I believe this should have displayed as:



Closed Index Arclength


Begin section ! 1
Begin curve ! 1
1 100. 0.0 0.0
46 70.7107 35.3553 0.0
91 0.0 50. 0.0
136 -70.7107 35.3553 0.0
181 -100. 0.0 0.0
Begin curve ! 2
1 100. 0.0 10.
46 70.7107 35.3553 10.
91 0.0 50. 10.
136 -70.7107 35.3553 10.
181 -100. 0.0 10.


Hope this all helps,


treddie


------------------------------------------------------------ -----------------------------------------------


Treddie,

thanks for the information. Just a few updates for you in case you want to know. the exclamation mark in begin section!1 are note characters, anything after a ! doesn't execute as code. Also, if you have a bunch of cross sections forming a shape, you can directly import them as a surface using insert-->advanced-->blend from file-->protrusion. This automatically makes surfaces. Again, thanks.

Davido
------------------------------------------------------------ -------------------------------------------------


Thanks for the info there. Now it makes sense what's going on with the Section ! and Curve! headers. Just user reference info to the right of the !, like old REM statements, or " ' " in vb.


Tried the surface idea you suggested and it worked great! Sure beats doing that stuff by hand.


One thing I don't think I mentioned was something that had me really aggravated until I firgured it out. If you are building the file in WordPad or some other text editor, MAKE SURE YOU SAVE OUT AS A "TXT" FILE AND NOT "RTF". Even if you change the extension to .ibl before you actually save the file, make sure it is a TXT and not an RTF or some other file format, or you will raise an error in ProE, "Line 1: Can not identify keyword." I've run into this before and forgot about it tonight as I was playing with your surface idea, so I wasted 15 minutes.


treddie


-
 

Sponsor

Articles From 3DCAD World

Back
Top