[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

5560.0. "AUTOCAD DXF Map with 1 Color ?" by TLAV04::WICHAI () Fri Sep 03 1993 09:18

    Hello,
    
    I used AutoCAD and DXF2MAP w/o any problem, except 
    that the map (thailand) does not have any color on it 
    at all. I asked the drawer if we could have the map 
    as one single object and put just one color on it, 
    but he said he would need to use Polyline, which is 
    not supported by DXF2MAP (?)
    
    Is there any way I can put just one color on the map 
    at all ? Scanning might be a problem since it will 
    not appear on Navigation window.
    
    Thanks much,
    Wichai, DC Thailand
    
T.RTitleUserPersonal
Name
DateLines
5560.1what type object results?TOOK::R_SPENCENets don't fail me now...Fri Sep 03 1993 11:384
    Is the result a object type 4? If so, it should get the default
    object fill color.
    
    s/rob
5560.2Object type 2 only, all of themTLAV04::WICHAISun Sep 05 1993 00:3990
    Rob,
    
    All the objects are of type 2. I was actually expecting only 1 object
    for the map of Thailand, but the drawer said if he can't use polyline,
    he will have to "explode" the whole thing. I have attached the output
    from DXF2MAP and the original DXF file here. Since they are kind of
    long, I only post the first page of each. I would appreciate it if you
    can point me to the right direction. The customer, a medium size bank,
    will have a press release for his network (DECnet) and management (MCC)
    next week. We still have not quite figured out what message to give him
    regarding the Polycenter Netview stuff. He has been "high" on Digital's
    network technology and product, and hence has "some" expectation on
    DECmcc.
    
    Thanks a lot,
    Wichai
    
    Result from running DXF2MAP.EXE
    
    version 0
    domain test
    
     object_type 2
       var 1
       width 0.004000
       start_x 1.014765 start_y 0.824497
       stop_x 1.028859 stop_y 0.754027
    
     object_type 2
       var 1
       width 0.004000
       start_x 0.725839 start_y 5.503691
       stop_x 0.718792 stop_y 5.482550
    
     object_type 2
       var 1
       width 0.004000
       start_x 1.028859 start_y 0.754027
       stop_x 1.035906 stop_y 0.732886
    
     object_type 2
    ..............
    
    AUTOCAD file in DXF format (use only layer 0, no polyline)
    
      0
    SECTION
      2
    HEADER
      9
    $ACADVER
      1
    AC1009
      9
    $INSBASE
     10
    0.0
     20
    0.0
     30
    0.0
      9
    $EXTMIN
     10
    0.0
     20
    0.0
     30
    0.0
      9
    $EXTMAX
     10
    295.973154
     20
    420.0
     30
    0.0
      9
    $LIMMIN
     10
    0.0
     20
    0.0
      9
    $LIMMAX
     10
    270.0
     20
    ............
    
5560.3how to convertCTHQ::WOODCOCKTue Sep 07 1993 09:5357
Greetings,

I've been here before. In order to convert "object_type 2" to "object_type 4"
a little dcl can go a long way. "Object_type 2" describes simple lines while
"object_type 4" describes a polyline which starts at a single point, then goes
from point to point back to the start point. Here is your first challenge. 
AUTOcad dxf files are written out IN ORDER THE LINES WERE DRAWN. So in order
to convert the DXF all the lines **MUST** be drawn contiguously. Example, start
at point A with AUTOcad, retrace Thailand's border, and finish back on point
A. Think of this as tracing the border with a pencil without lifting it off
the paper. Next, create the DXF file with AUTOcad and you will end up with a
file similar to the one posted except all the lines will be in order going 
around the border.

Now you can convert the object from 2 to 4 because you have all the points you
need and in the proper order within this file. If you look at the example below
of object_type 4 you see the format you need to reproduce. Look closely and
you will see that it starts at a single point then ends back at this point.

 object_type 4
   count 14
   2.262512 1.271584
   2.241982 1.295534
   2.276198 1.340014
   2.252247 1.350279
   2.255668 1.381072
   2.300150 1.391337
   2.286463 1.405023
   2.300150 1.425552
   2.351475 1.422131
   2.372005 1.384494
   2.351475 1.370808
   2.358318 1.329749
   2.348053 1.298956
   2.262512 1.271584


Use a dcl search to get all the START points.

$ search dxf.file start_x/output=thailand.txt

Next edit thailand.txt, cut/paste the first line so it is present as BOTH the
first and last lines in the file. Now do some global substitutes to remove the
words start_x and start_y from the file.

*s/start_x/   /wh
*s/start_y//wh

The above commands also tell you how many lines are in the file. Go back to the
top of the file and put "count #" where #  equals the number of lines. Now 
place "object_type 4" at the top and you are done.

I'm not sure if all the commands given above are exactly right but you get the
idea anyway.

best regards,
brad...
5560.4Solution works great, thanksTLAV04::WICHAIThu Sep 09 1993 21:297
    Brad,
    
    Your solution works great. The customer, Siam City Bank (SCIB), asked
    me to say "thank you" to you. They've been waiting for it.
    
    Thanks a lot,
    Wichai