Message 1 of 22
ObjectDBX and saving.

Not applicable
08-24-2000
08:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all, and help!
I am trying to save a document after having altered the path
of an attached image file, using ObjectDBX.
Everything is smooth until it comes time to save and close.
The path is indeed being altered but I'm having a hard time
grasping what kind of argument the save method wants.
Since the documentation is "VBA and ActiveX centric",
I'm hearing Twighlight Zone, and X-files theme music
as I try to apply it.
The sticking point is at ***, at the bottom of
the hastily written fragment below. Any help would
sure be appreciated.
(defun process (pathhandname)
(setq dbxdoc
(vla-GetInterfaceObject
(vlax-get-acad-object)
"ObjectDBX.AxDbDocument"
)
)
(vla-open dbxdoc pathhandname)
(setq mdl (vla-get-modelspace dbxdoc))
(setq lis nil)
(vlax-for thing mdl (setq lis (cons thing lis)))
(setq ilis nil)
(foreach obj lis (if (= "AcDbRasterImage" (vla-get-objectname
obj))(setq ilis (cons obj ilis))))
(setq k 0 )
(while (< k (length ilis))
(setq imagefile (vla-get-imagefile (nth k ilis))
pieces (parse "\\" imagefile)
newimagefile (strcat newpath (last pieces))
)
(vla-put-imagefile (nth k ilis) newimagefile)
(setq k (1+ k))
);
(vla-save dbxdoc);*** what do we want here?
(vla-close dbxdoc);*** or, what kind of argument am I supposed to
supply?
(vlax-release-object dbxdoc)
)
I am trying to save a document after having altered the path
of an attached image file, using ObjectDBX.
Everything is smooth until it comes time to save and close.
The path is indeed being altered but I'm having a hard time
grasping what kind of argument the save method wants.
Since the documentation is "VBA and ActiveX centric",
I'm hearing Twighlight Zone, and X-files theme music
as I try to apply it.
The sticking point is at ***, at the bottom of
the hastily written fragment below. Any help would
sure be appreciated.
(defun process (pathhandname)
(setq dbxdoc
(vla-GetInterfaceObject
(vlax-get-acad-object)
"ObjectDBX.AxDbDocument"
)
)
(vla-open dbxdoc pathhandname)
(setq mdl (vla-get-modelspace dbxdoc))
(setq lis nil)
(vlax-for thing mdl (setq lis (cons thing lis)))
(setq ilis nil)
(foreach obj lis (if (= "AcDbRasterImage" (vla-get-objectname
obj))(setq ilis (cons obj ilis))))
(setq k 0 )
(while (< k (length ilis))
(setq imagefile (vla-get-imagefile (nth k ilis))
pieces (parse "\\" imagefile)
newimagefile (strcat newpath (last pieces))
)
(vla-put-imagefile (nth k ilis) newimagefile)
(setq k (1+ k))
);
(vla-save dbxdoc);*** what do we want here?
(vla-close dbxdoc);*** or, what kind of argument am I supposed to
supply?
(vlax-release-object dbxdoc)
)