Author Topic: how to get the insertion scale  (Read 2676 times)

0 Members and 1 Guest are viewing this topic.

PanHasan

  • Guest
how to get the insertion scale
« on: September 11, 2009, 06:34:56 PM »
Hi
i have no idea how to dig it. Normally it is located in autocad drawing utilities and then units but how to get there from vb .net has anybody a diagram or something how should i find that kind of things

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: how to get the insertion scale
« Reply #1 on: September 11, 2009, 07:08:14 PM »
Do you mean the Application SystemVariable "DIMSCALE" ?
« Last Edit: September 11, 2009, 07:15:17 PM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: how to get the insertion scale
« Reply #2 on: September 11, 2009, 07:22:20 PM »
Perhaps ...
Autodesk.AutoCAD.DatabaseServices.DataBase.get_Dimscale();
or
Autodesk.AutoCAD.DatabaseServices.Dimension.get_Dimscale();
or
Autodesk.AutoCAD.DatabaseServices.BlockReference.get_ScaleFactors();
« Last Edit: September 11, 2009, 07:49:10 PM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

PanHasan

  • Guest
Re: how to get the insertion scale
« Reply #3 on: September 12, 2009, 04:22:20 AM »
No
I've meant insertion units and i found it here so its OK

Application.DocumentManager.MdiActiveDocument.Database.Insunits

and its returns if the insertion scale are a millimeters or centimeters or something else

but i wonder why i don't have non of them (get_Dimscale(),get_ScaleFactors())

i can get that far

Autodesk.AutoCAD.DatabaseServices.DataBase.
Autodesk.AutoCAD.DatabaseServices.Dimension.
Autodesk.AutoCAD.DatabaseServices.BlockReference.

SEANT

  • Bull Frog
  • Posts: 345
Re: how to get the insertion scale
« Reply #4 on: September 12, 2009, 06:29:03 AM »

but i wonder why i don't have non of them (get_Dimscale(),get_ScaleFactors())


Indeed. 

Kerry, are those custom extension methods.  That seems sensible enough for get_ScaleFactors() – to “blackbox” the Scale3d object.   A requirement for extension method get_Dimscale is not so obvious.
Sean Tessier
AutoCAD 2016 Mechanical

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8706
  • AKA Daniel
Re: how to get the insertion scale
« Reply #5 on: September 12, 2009, 11:57:41 AM »
I believe those are just properties of the objects

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: how to get the insertion scale
« Reply #6 on: September 12, 2009, 06:24:43 PM »

Yes, DimScale and ScaleFactors are public propertys, with get/set accessors  ;


kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.