Jump to content

Lee Mac

Recommended Posts

I don't believe the location of the .lin file in which the linetype may be defined is disclosed, one would have to search all .lin files for the appearance of the definition should it be there at all.
You're correct! The linetype definition is saved within the DWG - in the LTYPE table. You can of course save the DXF data for the linetype, so this can be re-imported into another DWG without even having the LIN file. Although complex linetypes may cause problems - as the SHX is not saved within the DWG.

 

As another thing: most XML viewers complain about "whitespace". That "shouldn't" be, but usually a XML file does not contain new lines and spaces between tags. It's a bit silly I know, but what can you do? You may want to try using MS's XML parser to have it format the XML file for you instead of doing it manually:

(setq xml (vlax-get-or-create-object "Msxml2.DOMDocument.5.0"))

You may also want to make the XML compatible with Excel, instead of creating a link to Excel using COM (when and if you do the one DWG / per tab idea): http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx

It should be much faster to generate the XML file without needing to load Excel and use its ActiveX interface.

Link to comment
Share on other sites

  • Replies 34
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    19

  • pBe

    5

  • kam1967

    4

  • irneb

    2

Top Posters In This Topic

  • 1 month later...

After spending a bit of time studying XSL, I have upated the code in the first post to Version 1.3 - as you will see from the image on my site, this enables you to view the XML data in a HTML Table styled with CSS.

 

Enjoy!

 

Lee

Link to comment
Share on other sites

Lee,

Is it possible to take the program you currently have created and use it instead of layerstates?

 

for example

 

what if you could export a list of layers and all there characteristics, modify them to your liking in say excel or csv. Reimport them to a folder containing any amount if files. the control of plot styles line weights colors would all be a thing of the past on file at a time.

 

your the MASTER great program thus far!

Link to comment
Share on other sites

what if you could export a list of layers and all there characteristics, modify them to your liking in say excel or csv. Reimport them to a folder containing any amount if files. the control of plot styles line weights colors would all be a thing of the past on file at a time.

 

As you can imagine, the 'import' question has actually already been asked (elsewhere), the difficulty arises as I have offered so many different formatting options for the user to export the data, so the program would have to be set by the user to exactly match the format of the data - not impossible, but certainly difficult.

 

your the MASTER great program thus far!

 

Thanks mate! :)

Link to comment
Share on other sites

  • 3 months later...
You may also want to make the XML compatible with Excel, instead of creating a link to Excel using COM (when and if you do the one DWG / per tab idea): http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx

It should be much faster to generate the XML file without needing to load Excel and use its ActiveX interface.

 

Finally got around to adding this functionality to the program :)

 

If you choose to write the output to an XML file, there are additional options as to whether the XML file is created using XML Spreadsheet Schema (XMLSS) and also whether an XSL Stylesheet is generated (to create the output shown in the description my site).

 

New Version here.

 

Lee

Link to comment
Share on other sites

  • 6 months later...

It is probably just me failing to use it correctly, although when I try to use it I keep getting the error "** Error: too few arguments **" (when the drawing does in fact have multiple layers in it).

Link to comment
Share on other sites

It is probably just me failing to use it correctly, although when I try to use it I keep getting the error "** Error: too few arguments **" (when the drawing does in fact have multiple layers in it).

 

Hi Dink,

 

Seems like you're having a bad day with my programs! :shock:

 

I've just tested the latest version of this program (LayerExtractV1-4.lsp), and cannot seem to reproduce the error that you are reporting.

 

At what point do you receive the error? i.e. Before the dialog appears, or after?

 

Lee

Link to comment
Share on other sites

bumping a very old thread. I am sorry.

 

Anyway you can add a function to print to a table in AutoCAD where each line is on the layer it describes? Someone made a lisp for this recently in another post and it works, but i like the dialog box and the ability to select what you want to have displayed.

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...