Jump to content

DCL Compass Points Similar to DDVPOINT


David Bethel

Recommended Posts

David,

 

As you may already know, I set dimx_tile to 250 & dimy_tile to 250 with the MIMAGE2.lsp on the COMP10.lsp.

 

I just got to test the program on another computer with acad 2004, But it is a laptop.

 

I removed the local variables to test image_x & image_y to see what I would get returned between the two different systems.

 

My regular system that I used has 2009 with the graphic screen set to 1280 by 1024 pixels using a NVIDIA FX 500/FX 600 grapics card on a Dell Precision 360.

 

The laptop is a Inspiron 2650 with a NVIDIA GeForce2 Go which is standard for this computer with the graphics screen set to 1024 by 768 pixels.

 

I start the program on both computers and cancel. I then type !image_x and also !image_y at the respected command prompts to see what is returned.

 

I get 250 by 250 on both systems and I did the same thing for !CenPt and it returns 125,125.

 

It seems there is no difference between the two systems. It shows correctly and both systems are two different animals just the same. So I am very lost on whats happening with your systems. I just cannot understand why you are getting this problem.

 

When I view both dcl images they look fine as expected. I do not know what to tell you at this point.

 

Its just not making any sense to me.

Link to comment
Share on other sites

  • Replies 102
  • Created
  • Last Reply

Top Posters In This Topic

  • The Buzzard

    54

  • David Bethel

    30

  • Lee Mac

    11

  • TimSpangler

    8

David,

 

I posted a message with a suggested fix, But I deleted it because it was premature and I ended up with the original problem. I find that vector image will stay where I put it, But the external slide is a real problem. There must be a way around this, But nothing comes to mind. I thought I had this solved.

 

Sorry

Link to comment
Share on other sites

Ok,

 

At first you don't succeed. Give up!

I made another program similar to COMP8 only with vector image with a dimx_tile 300 & a dimy_tile 187. I ran this one several times on both computers and it returns the values correctly.

 

This one is COMP15.

 

I know you do not like vector image and want to make the slide work, But I am out of gas.

Note I used your drawing for the image.

 

Please try it.

COMP15.zip

Link to comment
Share on other sites

Buzzard, for the most part I got 300 x 187. Heres 1 that came out 399 x 230

 

R2000 @ 1024,768

 

I'm like you, scratching my head. Thanks! -David

m-r14.jpg

Link to comment
Share on other sites

  • 2 months later...
A sld & slb are complied files themselves. I am sure if you rename them they will be useless. I know you cannot add these types of file to a program to be compiled.

 

Before I had learned to use vector_image, Serveral experience programmers from another forum suggested to me to use this method. It had been explain to me as the method acad uses to make the dimstyle manager dialog image as well as several other acad dialogs. Upto this point I have used it for changing images by way of a popup list or radio button. It would stand to reason that when the program is compiled naturally the images go along with the program. This is a fool proof way of ensuring every part of the program is there and can not be tampered with. It just makes complete sense to do it this way.

 

Hey Buz, David,

 

Here is the link to the post that I remembered. You can add a .sld to a .vlx

 

http://www.theswamp.org/index.php?topic=29889.0;topicseen

Link to comment
Share on other sites

Hey Buz, David,

 

Here is the link to the post that I remembered. You can add a .sld to a .vlx

 

http://www.theswamp.org/index.php?topic=29889.0;topicseen

 

Tim,

 

Its not actually doing anything to a slide. Its creating a list from a drawiing similar to the method of a program I use for vector image. It does do a real nice job anyway.

 

Thanks for that Tim.

Link to comment
Share on other sites

Buzzard,

 

Did you check the link that Daniel posted in that thread?

 

Lee,

 

I tested the code from that link. Its another vector image program.

Its making a list. The difference between the way that one works and the one I use is it only generating the list where the one I use writes the code and dcl. I only use the list from the program I use anyway.

Link to comment
Share on other sites

Lee,

 

I tested the code from that link. Its another vector image program.

Its making a list. The difference between the way that one works and the one I use is it only generating the list where the one I use writes the code and dcl. I only use the list from the program I use anyway.

 

I believe you are mistaken Buzzard,

 

The Read/WriteStream functions as posted by Michael (MP) in that thread are not creating vector lists.

 

They use the FileSystemObject (FSO) to write the file as a list of information, and then the ReadStream converts it back into a file.

 

You will notice that the lists created by these functions are not in the form of vecor lists i.e: (x1) (y1) (x2) (y2) (colour).

 

But are rather a single list of information, which, (in the example that Daniel posted), are written to an SLD file, and used as a Slide.

 

I hope this clarifies things.

 

Lee

Link to comment
Share on other sites

I believe you are mistaken Buzzard,

 

The Read/WriteStream functions as posted by Michael (MP) in that thread are not creating vector lists.

 

They use the FileSystemObject (FSO) to write the file as a list of information, and then the ReadStream converts it back into a file.

 

You will notice that the lists created by these functions are not in the form of vecor lists i.e: (x1) (y1) (x2) (y2) (colour).

 

But are rather a single list of information, which, (in the example that Daniel posted), are written to an SLD file, and used as a Slide.

 

I hope this clarifies things.

 

Lee

 

 

Not exactly, Where is the slide?

Link to comment
Share on other sites

The link as Daniel posted, here, shows the Read/WriteStream functions.

 

And the code that uses them to make the SLD is here.

 

 

Not sure what is going on now.

 

I get this: ; error: bad argument type: stringp nil

Link to comment
Share on other sites

This may help you understand Michael's code -

 

He uses the FileSystemObject and opens the file as a TextStream, (or creates a new TextFile) and then proceeds to write the information.

http://msdn.microsoft.com/en-us/library/hwfw5c59%28VS.85%29.aspx

 

To read the File (i.e. get the Information encoded in the SLD file), he opens it as a TextFileStream and reads the byte information.

 

Just read up on the FileSystemObject - there is a ton you can do with it!

Link to comment
Share on other sites

As an example:

 

Say I have a Text File, with contents "This is a test".

 

If I read it with _ReadStream, I get:

 

"This is a test"

As expected.

 

Now say I have an SLD file, I can read this file using the same code, and I get:

 

"AutoCAD Slide\r\n\032\000V\002�*\004\r\002\177æ[\001\002\0004\022\007ÿ\007ÿ\"\001\022\001Ä\002\022\001\000ü"

Which can be turned into a list for ease of use through use of vl-string->list

 

(65 117 116 111 67 65 68 32 83 108 105 100 101 13 10 26 0 86 2 173 4 13 2 127 230 91 1 2 0 52 18 7 255 7 255 34 1 18 1 196 2 18 1 0 252)

With this list, I can use vl-list->string and _WriteStream to recreate my SLD file. Powerful stuff if you think of the implications.

 

Lee

Link to comment
Share on other sites

Buz,

 

The sld files are renamed to txt. Then are added to the vlx The lisp creates a variable list of the file names. Then it "steams" each of the files out of the vlx to a .sld file then the slide is loaded as normal. At the program completion the .sld file can be deleted.

 

Very cool stuff, MP is brilliant.

 

I looked a the zip file in that thread, i'm not sure why there is a vector list of each slide in the beginning of the file?

Link to comment
Share on other sites

As explained above - its not a vector list :)

 

 

I looked at the files in the zipped package and see what you mean now. That is interesting the way that is done, But much larger than vector image. I know how much you frown on the size of the lists using vector image, But these lists make the ones I create with vector image look puny. Whats all the fuss about using this type coding. I do notice it make solids look better, But is hardly worth the effort or the code size.

 

Anyway I can see how that is done now as far as viewing the slide goes.

 

I am still not sure what is creating the lists and where the lists are placed so you can get them and put into the code.

 

If you rename the sld files to txt, They are still compiled files and not readable as a list.

 

Where do these slide lists come from?

 

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...