|
Welcome, Guest.
|
||||||
| AutoLISP AutoLISP or Visual LISP, learn both here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
I could stop if I wanted to
Join Date: 2003-05
Posts: 335
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I am having trouble changing a text object and then saving it in a file using ObjectDBX. Can someone shed any light on this for me. It seems to open and close the file properly because it losses the file preview, but it doesn't maintain the change to the text object.
I am working in ADT2005 on XP Pro. Someone please help,
__________________
Good Blockin' Will DeLoach AutoCad / ADT 2006 |
|
|
|
|
|
#2 | |
|
I could stop if I wanted to
Join Date: 2002-02
Location: Galloway, Oh
Posts: 227
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Try using (vla-saveas dbxDoc dwgName nil). I've been using this and it works well
dbxDoc is the open drawing. dwgName is the name and path to save it to. the last argument will let you specify which file format to use (though I'm having a little trouble with it in 2004 HTH,
__________________
Michael K. Sretenović Quote:
|
|
|
|
|
|
|
#3 |
|
I could stop if I wanted to
Join Date: 2003-05
Posts: 335
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Mike,
Opening and closing I get right, and even deleting objects, but getting it to keep changes to a text object is different. I'm missing something.
__________________
Good Blockin' Will DeLoach AutoCad / ADT 2006 |
|
|
|
|
|
#4 |
|
Administrator
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The Save method is broken in ObjectDbx, it doesn't work. You have to use SaveAs. Unless there's something wrong with your code that modifies the text. Maybe you need to show it.
__________________
──□ Ed □── |
|
|
|
|
|
#5 |
|
I could stop if I wanted to
Join Date: 2003-05
Posts: 335
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Saveas works for me. It's just the code the changes the text object that is messed up.
txtobj = Object for the text item news = new text string olds = old text string (defun fandr (txtobj) (vl-string-subst news olds (vla-get-textstring txtobj)) ) thanks,
__________________
Good Blockin' Will DeLoach AutoCad / ADT 2006 |
|
|
|
|
|
#6 |
|
Moderator
Join Date: 2002-12
Location: Denver, CO USA
Posts: 150
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Could it be that your two strings are different cases?
|
|
|
|
|
|
#7 |
|
I could stop if I wanted to
Join Date: 2003-05
Posts: 335
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
no the strings are the same case. I used a test drawing with strings that I set up with different cases to see which would work. When I step thru the code it shows the string changing, but for some reason never gets saved back to the dwg. Could it be as simple as saving to a variable.
__________________
Good Blockin' Will DeLoach AutoCad / ADT 2006 |
|
|
|
|
|
#8 | |
|
I could stop if I wanted to
Join Date: 2002-02
Location: Galloway, Oh
Posts: 227
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Are you using a vla-put-string anywhere
(setq string (vla-get-textString txtObj)) (setq string (vl-string-substr news olds string)) (vla-put-textString txtObj) Where txtObj is your text object. HTH
__________________
Michael K. Sretenović Quote:
|
|
|
|
|
|
|
#9 |
|
I could stop if I wanted to
Join Date: 2003-05
Posts: 335
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
dddduuuuuuhhhhhhhhhhh!!!!!!!!!!!!!!!!!
Thanks Mike. Sometimes I feel like a total idiot. It works now. Imagine that.
__________________
Good Blockin' Will DeLoach AutoCad / ADT 2006 |
|
|
|
|
|
#10 | |
|
Administrator
Join Date: 2001-08
Location: Seattle WA US
Posts: 4,393
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
|
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Saving to R2000 format | David.Hoole | ACA General | 4 | 2004-07-25 08:25 AM |
| saving from 6.1 to 5.1 | DanielleAnderson | Revit Architecture - General | 18 | 2004-07-13 06:54 PM |
| Saving and loading groups | jabberwoki | Revit Architecture - General | 2 | 2004-07-01 08:45 PM |
| Saving Quick Select Options | BrenBren | AutoCAD "Original" Wish List (Archived) | 4 | 2004-06-24 07:31 PM |
| Saving Schedules for other projects | razorx | Revit Architecture - General | 3 | 2003-12-23 02:44 AM |