How can I include a SLD file in a VLX application?

How can I include a SLD file in a VLX application?

Prof_Stancescu
Enthusiast Enthusiast
2,352 Views
9 Replies
Message 1 of 10

How can I include a SLD file in a VLX application?

Prof_Stancescu
Enthusiast
Enthusiast

Hi all,

 

I have the next problem.

 

In short, trying to create a VLX application, I see that I can put together LISPs and DCLs files, but not also SLDs files for including pictures in dialog boxes. Is there any way to do this, and obtaining an unique VLX file to contain all this files?

 

On the other hand, beside including all files in a VLX application, an image given as SLD file takes a long time to be presented on screen, even when that image is really small. If I omit the SLD file, the dialog box is loaded instantly. Is there a possibility to use a JPG, BMP, TIFF picture instead a SLD to be included in a dialog box to reach a shorter time to be presented?

 

Practically, instead of the remark that "a picture is worth a thousand words" you can say that "a picture takes a longer time to be presented than a thousand lines (expressions) in AutoLISP to be processed"...

 

Any suggestion is worth a lot for me...
Constantin from Romania

0 Likes
Accepted solutions (1)
2,353 Views
9 Replies
Replies (9)
Message 2 of 10

phanaem
Collaborator
Collaborator
Accepted solution

Buna ziua

 

You cannot attach a sld file to vlx, but  you can use "vector_image" to fill the image tile. This way, the image definition is part of the lisp file.

The function is simple to use:

(vector_image x1 y1 x2 y2 color)

If you use static slides, you can roll your own function to get each coordinate from the model space geometry. The best part of vector_image is that you can use dynamic slides as you can see in the attached video.

DoorArch.gif

 

 

Message 3 of 10

well20152016
Contributor
Contributor

Phanaem can send a case / I want to learn! Thank you

0 Likes
Message 4 of 10

Prof_Stancescu
Enthusiast
Enthusiast

Thank you phanaem, this is great to know, especially when a parametric dynamic image is the goal.

 

However, the image I try to place in the dialog box is complicated, with lines and colors which are difficult to reproduce in AutoCAD.

If I do not receive any other suggestion, I shall work to convert that image with AutoCAD and I'll consider your answer as a solution.

 

Thank you once again!

0 Likes
Message 5 of 10

phanaem
Collaborator
Collaborator

@Prof_Stancescu wrote:

Thank you phanaem, this is great to know, especially when a parametric dynamic image is the goal.

 

However, the image I try to place in the dialog box is complicated, with lines and colors which are difficult to reproduce in AutoCAD.

If I do not receive any other suggestion, I shall work to convert that image with AutoCAD and I'll consider your answer as a solution.

 

Thank you once again!


 

Hello Mr. Stancescu

 

It is not necessary to consider my answer as a solution, it is just an idea and it is far from solving your task.

However, I would like to help you, so, if you want, please consider to send me a dwg sample. I already have something, but I would like to test it first.

 

 

 

 

PS. Domnule Profesor, ma bucur ca ne-am intalnit aici si ca am ocazia sa va multumesc pentru efortul si generozitatea dvs. Am fost si eu un fan al revistei "Hello CAD Fans".

ing. Stefan Muntean

 

Message 6 of 10

Prof_Stancescu
Enthusiast
Enthusiast

Oh, thank you again!

I am already in an advanced stage of solving my problem (by using your advice).

It is not so simple, because it must be converted to a vectorial version, but I have enough patience to finish it.

I think that Autodesk would have in attention to introduce a possibility to include pictures which are not vectorial - like a Van Gogh picture - in a dialog box, isn't it? So, this could be an IDEA to be submitted to Autodesk.

 

Constantin from Romania

PS Mă bucur să mai aud de vechii mei prieteni, mai ales atunci când apar în postură de experți.

Citiți despre revista „Hello CAD Fans” aici: http://www.fastgrup.ro/ro/Revista_Hello_CAD_Fans 

0 Likes
Message 7 of 10

wkmvrij
Advocate
Advocate

"So, this could be an IDEA to be submitted to Autodesk." 

 

There is no need for them to wait for a submission; it happened to me a number of times to see appearing commands in ACAD updates that were worked out by my self and others in this forum previously. E.G. Objectsnap to middle is one of them (I still use that LSP instead of the current command :)) All forums are public and what one writes is accessable to anyone.

 

BTW, I am currently working on the insertion of BMP files in a DCL's and onwards into VLX Patience please..

0 Likes
Message 8 of 10

well20152016
Contributor
Contributor

Which friend is willing to help write an example, to learn from me? Thank you

0 Likes
Message 9 of 10

Prof_Stancescu
Enthusiast
Enthusiast

Hi wkmvrij,

 

I am an AutoCAD user since 1991 (AutoCAD 10 on PC XT, without mouse), so I know a lot about the Autodesk history.

This is why I wonder that, after so many years, such solution was not implemented by Autodesk.

After slide_image and vector_image, a new function, say, bitmap_image would be very fruitful for developers, isn't it?

For the moment, I solved my problem by using the vector_image function, after a lot of work, by using the suggestion of phanaem (see above).

I wait for you to implement your new function BMP_image (!!!) - so keep in touch...

 

Constantin from Romania

Message 10 of 10

wkmvrij
Advocate
Advocate

Hi Stancescu,

 

I started a new thread under the name of 

BMP2DCL just yesterday. Admittedly I did not mention how I constructed the TXT files, that represent the pixel layout in the bitmaps in vector_image form. I wrote a small application in C++ that will do it, both one by one and in batch. It is not entirely bug free, so not ready for publication, but given a BMP, I could produce a valid TXT file for you. 

 

To incorporate it in a VLX file feel free to try it out with the LSP files I supplied. I do'nt think there should be any problems, as long as you provide a LSP that constructs and calls a DCL on the fly, as I am sure you would be able to.

0 Likes