LoadFromMemory1 for IGES string buffer in VB6

Everything DG Kernel: Technical discussions and issues
Post Reply
TheLeePiper
Posts: 8
Joined: Wed Oct 16, 2024 3:00 pm

LoadFromMemory1 for IGES string buffer in VB6

Post 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.
Dino R
Posts: 1
Joined: Fri Oct 25, 2024 12:53 am

Re: LoadFromMemory1 for IGES string buffer in VB6

Post 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
TheLeePiper
Posts: 8
Joined: Wed Oct 16, 2024 3:00 pm

Re: LoadFromMemory1 for IGES string buffer in VB6

Post 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.
Prashant Kande
Posts: 65
Joined: Tue Jun 18, 2024 6:12 am

Re: LoadFromMemory1 for IGES string buffer in VB6

Post 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
TheLeePiper
Posts: 8
Joined: Wed Oct 16, 2024 3:00 pm

Re: LoadFromMemory1 for IGES string buffer in VB6

Post 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!
Post Reply