AutoCAD Map 3D General Discussion

AutoCAD Map 3D General Discussion

Reply
Contributor
andras.zelenka
Posts: 13
Registered: ‎01-20-2014
Message 1 of 6 (258 Views)

How to set NULL value on integer Object Data property?

258 Views, 5 Replies
02-12-2014 09:10 AM

Hi all!

 

While i'm create a simple object class in Map3D, i can choose in the Properties List from the available properties, or create my own. If i create a new custom property, i can choose in the drop down list from these data types: Text String, Integer, 3D point, Real, Boolean (Yes/No). If i choose the Integer type, i can't set the default value to NULL. - these settings displayes on the "Define Object Classification" window.

 

After creating the object class, and run the classification, i can't set my Custom property on the classified CAD object to NULL (Properties pane), it would be very important. 

Any Idea, or method to create Nullable Custom Object Data field?

 

Map3D2013 

Regards,

Andras

*Expert Elite*
Murph
Posts: 1,989
Registered: ‎11-13-2006
Message 2 of 6 (232 Views)

Re: How to set NULL value on integer Object Data property?

02-12-2014 02:48 PM in reply to: andras.zelenka

Integers are whole numbers that do not contain a decimal point, therefore it requires a value. If you want it as NULL set it as a string. 

Murph
Supportting the troops daily.
Contributor
andras.zelenka
Posts: 13
Registered: ‎01-20-2014
Message 3 of 6 (224 Views)

Re: How to set NULL value on integer Object Data property?

02-13-2014 12:15 AM in reply to: Murph

Thank you for your reply, Murph!

 

This is a problem for me, because set the datatype to string isn't an option. How to set NO DATA value without nullable integer data type?

 

Andras

 

 

*Expert Elite*
Murph
Posts: 1,989
Registered: ‎11-13-2006
Message 4 of 6 (211 Views)

Re: How to set NULL value on integer Object Data property?

02-13-2014 03:20 AM in reply to: andras.zelenka

Use Text-String, what type of data are you wanting the field for in that data set? 

Murph
Supportting the troops daily.
Contributor
andras.zelenka
Posts: 13
Registered: ‎01-20-2014
Message 5 of 6 (204 Views)

Re: How to set NULL value on integer Object Data property?

02-13-2014 06:05 AM in reply to: Murph

Hi Murph!

 

Unfortunately using Text-String isn't a good solution, because i want to move my data into postgis database. As i know, the whole "Object Data concept" was made to move simple CAD objects to GIS datastore. (define classes, classification CAD objects, export the classified CAD data via mapexport or bulk copy into GIS datastores). I can't understand, how can i do this workflow successfully without nullable integer OD fields.

 

An example:

I need to create a GIS database, which contains streets, and they are stored the number of parking places.

Suppose that, i get the streets like CAD polylines, so i need to create my own object class, which has only one custom field: parkingplaces

- If the parkingplaces field is integer: i can't set the NO DATA value, because the '0' is a value too

- If the parkingplaces field is text: i can set the NO DATA value, but few problems comes later:

   - The user type accidental text, instead of number

   - While copying the CAD objects with bulk copy, i need to choose the fields in a drop down list in the From, and of course the To side. My field types will different, because in the datastore the parkingplaces field is an integer. Set the datatype to text in the datastore isn't an option. How can i running spatial query, create statistic, create thematic maps on a text field? Not at all.

 

Regards,

Andras 

 

     

*Expert Elite*
Alfred.NESWADBA
Posts: 9,099
Registered: ‎06-29-2007
Message 6 of 6 (182 Views)

Re: How to set NULL value on integer Object Data property?

02-15-2014 05:49 AM in reply to: andras.zelenka

Hi,

 

>> If the parkingplaces field is integer: i can't set the NO DATA value, because the '0' is a value too

If a "NULL"-value is allowed or not depends on the type of database, not all databases support a NULL value for integers (or even any numeric value).

And I do understand that you have to differentiate between the two states:

  • I know there a 0 parking places
  • I don't know the number of parking places, so "0" is not correct
  • And now you have two chances:

  • if you know that only positiv values are allowed you might preset the value to -1 as like a flag for "unknown number of parking places"
  • add a second field like a boolean "parking places evaluated/valid" or a date-field for "when was the field "parking places" evaluated. So whatever number is stored in field "parking places" you know based on the content of this second field if that value is valid or when it was evaluated/updated.
  •  

    Just my 2c, - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Need installation help?

    Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.