Page 1 of 1
LoadFromMemory1 for IGES string buffer in VB6
Posted: Tue Oct 22, 2024 11:13 pm
by TheLeePiper
We have a VB6 function to create an IGES 4.0 format file from a NURBS surface. We can export the IGES string and successfully import it with the Load function. Can the LoadFromMemory1 function directly use the string buffer? The VB6 Object Browser shows the argument as a byte array. We have tried several different forms of a byte array (including SafeArray manipulation), but the call to LoadFromMemory1 always fails. Thanks to all for any assistance.
Re: LoadFromMemory1 for IGES string buffer in VB6
Posted: Fri Oct 25, 2024 12:55 am
by Dino R
Have you tried the other one: LoadFromMemory(IBlob_DG data, ..)?
You can create a blob and use IBlob_DG.Copy() to set its data.
Regards
Re: LoadFromMemory1 for IGES string buffer in VB6
Posted: Fri Oct 25, 2024 12:15 pm
by TheLeePiper
Dino, I tried that option as well, but could not find a way to create a blob object from the string holding the IGES file text. Let me clarify that the LoadFromMemory1 function "runs" (i.e., doesn't crash or hang), but always returns a fail state. Writing the IGES file text to disk, then getting it back with Load() works fine.
Re: LoadFromMemory1 for IGES string buffer in VB6
Posted: Tue Oct 29, 2024 2:22 am
by Prashant Kande
Hello
We just have posted 5545 update with new set / get methods in IBlob_DG. It should work OK for VB6.
So, create IBlob_DG. Use
Set() in a loop to copy all bytes of the iges data (should be same as a file on the disk). Call
LoadFromMemory(theBlob, CADFormat_DG.IGES).
Regards
Re: LoadFromMemory1 for IGES string buffer in VB6
Posted: Wed Nov 06, 2024 8:16 pm
by TheLeePiper
Just some quick feedback. We haven't been able to implement fully as we're still doing principal coding with 7.1, but preliminary tests of this with 7.2 look good. Thanks!