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.

Create Surface from *.ibl File

würfel

New member
Hi,

I'm happy I made some proceedings with my gearing-application, but now there raises a new problem.

I want my toolkit application to create a surface from an *ibl file. In Pro/Engineer it works like this: Insert->Advanced->Blend from File->Surface...
The *.ibl file looks e.g. like this (just an example, the real data is much more complex):

------------------------------
open
arclength
begin section !1
begin curve
1 0 -10 0 //x, y,z coordinates, points 1-2-3 create a "V" in y,z plane
2 0 0 -10
3 0 10 0
begin section !2
begin curve
1 10 -10 0 // same "V" but displaced on x-axis
2 10 0 -10
3 10 10 0
-------------------------------

Pro/Engineer connects these two curves and creates the surface.

Unfortunatly I don't exactly know how to do this automatically with a Pro/Toolkit application.
The surface should be referenced to a selected coordinate system.

It is not quite clear to me whether I can use ProSurface or ProSurfaceData in this case or whether there is a function in Pro/Toolkit I disregarded.
Has anybody an idea how I can realize this?


Thanks a lot!
w
 
Hi,


I'm now trying to solve my problem with mapkeys.


The following mapkey works well inPro/Engineer:


mapkey xxx @MAPKEY_LABELcreate_surface;~ Command `ProCmdSurfFromFile` ;\
mapkey(continued) #CS0;\
mapkey(continued) ~ Update `file_open` `Inputname` \
mapkey(continued) `U:\\gearing_data\\test_surface.ibl`;\
mapkey(continued) ~ Activate `file_open` `Inputname`;\
mapkey(continued) #OKAY;\
mapkey(continued) ~ Activate `Odui_Dlg_01` `okay`;


Pro/Engineer reads the file and creates the surface. OK.


But when I enter the following into the code of my Pro/Toolkitapplication:


{
ProMacro macro_wstring;
char *macro = "~ Command `ProCmdSurfFromFile`; #CS0; ~ Update `file_open` `Inputname` `U:\\gearing_data\\test_surface.ibl`; ~ Activate `file_open` `Inputname`; #OKAY; ~ Activate `Odui_Dlg_01` `okay`;"; //all in one line in the source code!


ProStringToWstring (macro_wstring, macro);
ProMacroLoad(macro_wstring);
ProMacroExecute();
}


then Pro/Engineer opens the "SurfaceFromFile"-dialog and selcects the right coordinate system, but then the error"Illegal characters in input" occurs and Pro/engineer wants me to enter the path manually. Also, something seems to be wring with the #OKAY; ("Illegal characters").


Does anybody know what I am doing wrong here?


Thanks a lot,
w
 
Hello wurfel,


Let check the macro string length,does it exceed the specified limit of the ProMacro.I guess some time you can give such errors as well.


With regards,


Kishore V
 
Hi,


It works now. I removed the blanks ahead of # and ~. That's what the trail files look like and it really seems to be important ;-)
 

Sponsor

Back
Top