Saturday, November 21, 2009
Home   |   Search   |   About AUGI   |   My AUGI   |   Join Now

Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP
 Welcome, Guest. 

Login

Join Now FAQ Members List Calendar Search Today's Posts Mark Forums Read

AutoLISP AutoLISP or Visual LISP, learn both here!

Reply
 
Thread Tools Display Modes
Old 2004-07-28, 04:27 PM   #1
whdjr
I could stop if I wanted to
 
Join Date: 2003-05
Posts: 335
whdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of light
Default Saving in ObjectDBX

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
whdjr is offline   Reply With Quote
Old 2004-07-28, 04:43 PM   #2
msretenovic
I could stop if I wanted to
 
msretenovic's Avatar
 
Join Date: 2002-02
Location: Galloway, Oh
Posts: 227
msretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of light
Default RE: Saving in ObjectDBX

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:
Most folks are about as happy as they make up their minds to be.
-Abraham Lincoln (1809-1865)
-16th president of The United States of America (1861 - 1865)
msretenovic is offline   Reply With Quote
Old 2004-07-28, 05:12 PM   #3
whdjr
I could stop if I wanted to
 
Join Date: 2003-05
Posts: 335
whdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of light
Default RE: Saving in ObjectDBX

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
whdjr is offline   Reply With Quote
Old 2004-07-28, 05:34 PM   #4
Ed Jobe
Administrator
 
Ed Jobe's Avatar
 
Join Date: 2000-11
Location: Turlock, CA
Posts: 3,411
Ed Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining starEd Jobe is a shining star
Default

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 ──
Ed Jobe is offline   Reply With Quote
Old 2004-07-28, 05:53 PM   #5
whdjr
I could stop if I wanted to
 
Join Date: 2003-05
Posts: 335
whdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of light
Default RE: Saving in ObjectDBX

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
whdjr is offline   Reply With Quote
Old 2004-07-28, 06:27 PM   #6
mathew.worland
Moderator
 
mathew.worland's Avatar
 
Join Date: 2002-12
Location: Denver, CO USA
Posts: 150
mathew.worland has a bright futuremathew.worland has a bright futuremathew.worland has a bright futuremathew.worland has a bright futuremathew.worland has a bright futuremathew.worland has a bright futuremathew.worland has a bright future
Default RE: Saving in ObjectDBX

Could it be that your two strings are different cases?
mathew.worland is offline   Reply With Quote
Old 2004-07-28, 08:01 PM   #7
whdjr
I could stop if I wanted to
 
Join Date: 2003-05
Posts: 335
whdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of light
Default RE: Saving in ObjectDBX

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
whdjr is offline   Reply With Quote
Old 2004-07-28, 08:07 PM   #8
msretenovic
I could stop if I wanted to
 
msretenovic's Avatar
 
Join Date: 2002-02
Location: Galloway, Oh
Posts: 227
msretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of lightmsretenovic is a beam of light
Lightbulb RE: Saving in ObjectDBX

Are you using a vla-put-string anywhere . Because vl-string-subst will only replace the pattern but will not place it in the text object.

(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:
Most folks are about as happy as they make up their minds to be.
-Abraham Lincoln (1809-1865)
-16th president of The United States of America (1861 - 1865)
msretenovic is offline   Reply With Quote
Old 2004-07-28, 08:13 PM   #9
whdjr
I could stop if I wanted to
 
Join Date: 2003-05
Posts: 335
whdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of lightwhdjr is a beam of light
Default RE: Saving in ObjectDBX

dddduuuuuuhhhhhhhhhhh!!!!!!!!!!!!!!!!!

Thanks Mike. Sometimes I feel like a total idiot.
It works now. Imagine that.
__________________
Good Blockin'

Will DeLoach
AutoCad / ADT 2006
whdjr is offline   Reply With Quote
Old 2004-07-28, 08:18 PM   #10
RobertB
Administrator
 
RobertB's Avatar
 
Join Date: 2001-08
Location: Seattle WA US
Posts: 4,393
RobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the starsRobertB is shooting for the stars
Exclamation RE: Saving in ObjectDBX

Quote:
Originally Posted by msretenovic
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
Warning! Using (vla-SaveAs) is not the same as using the ObjectDBX version of SaveAs. See this post.
RobertB is offline   Reply With Quote
Reply


Go Back   AUGI Forums > AUGI Technical (English) > Programming > AutoLISP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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


All times are GMT +1. The time now is 03:31 PM.