AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set NULL value on integer Object Data property?

7 REPLIES 7
Reply
Message 1 of 8
andras.zelenka
1601 Views, 7 Replies

How to set NULL value on integer Object Data property?

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

7 REPLIES 7
Message 2 of 8
Murph_Map
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
Supporting the troops daily.
Message 3 of 8
andras.zelenka
in reply to: Murph_Map

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

 

 

Message 4 of 8
Murph_Map
in reply to: andras.zelenka

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

Murph
Supporting the troops daily.
Message 5 of 8
andras.zelenka
in reply to: Murph_Map

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 

 

     

Message 6 of 8

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 ... blog.hollaus.at ... CDay 2024
    ------------------------------------------------------------------------------------
    (not an Autodesk consultant)
    Message 7 of 8
    drenaud
    in reply to: Alfred.NESWADBA

    I'm following the tutorials in Map3d 2016. I'm supposed to select an existing parcel, select all of the O:Schema_Parcels in the Properties List, and set all default values to null. It won't let me edit or change the default values (initially found when I picked a representative parcel so I could define the Parcel object class). Help isn't very. Any ideas? I've got Text strings, real numbers, Integers, etc.

    Message 8 of 8

    I have the same problem with empty numerical values, and with real. The main thing for me of check whether values were entered into data fields.

     

    I agree with Alfred. Post 6.

     

     

    Only I defined all numerical fields by default as -20000 - improbable value. Because in certain cases some negative values can be too.


    -- Alexander, private person, pacifist, english only with translator 🙂 --

    Object-modeling _ odclass-odedit.com _ Help

    Can't find what you're looking for? Ask the community or share your knowledge.

    Post to forums  

    Autodesk Design & Make Report

    ”Boost