Author Topic: Need Help Urget - will pay.  (Read 21926 times)

0 Members and 1 Guest are viewing this topic.

Jeff H

  • Needs a day job
  • Posts: 6083
Re: Need Help Urget - will pay.
« Reply #30 on: April 15, 2011, 09:06:13 PM »
Personally My father has no clue about what is source code and what is a compiled executable Code.
when he left company , what he gave owner  was a cd. No contact . No nothing.

Did your dad write the original Application?

vnsharifi

  • Guest
Re: Need Help Urget - will pay.
« Reply #31 on: April 16, 2011, 06:49:33 AM »
Jeff, I was joking around to tell This  "LE" , That,  owner of this company is very old and has no  clue about Computer.
The programmer took advantage of this and never give them source code. Are you teasing me !!!!!! ?

Jeff H

  • Needs a day job
  • Posts: 6083
Re: Need Help Urget - will pay.
« Reply #32 on: April 16, 2011, 07:00:13 AM »
Are you teasing me !!!!!! ?
Not at all,

Personally My father has no clue about what is source code and what is a compiled executable Code.
when he left company , what he gave owner  was a cd. No contact . No nothing.

Reading this,
I assumed your father use to work at that company and when he left he gave the owner a CD with the compiled ObjectARX application.

I was just wondering if he wrote it.


 


vnsharifi

  • Guest
Re: Need Help Urget - will pay.
« Reply #33 on: April 16, 2011, 07:18:13 AM »
Are you teasing me !!!!!! ?
Not at all,

Personally My father has no clue about what is source code and what is a compiled executable Code.
when he left company , what he gave owner  was a cd. No contact . No nothing.

Reading this,
I assumed your father use to work at that company and when he left he gave the owner a CD with the compiled ObjectARX application.

I was just wondering if he wrote it.


 


You are right , Again Grammer Error, Sorry.

Jeff H

  • Needs a day job
  • Posts: 6083
Re: Need Help Urget - will pay.
« Reply #34 on: April 16, 2011, 07:33:01 AM »
..... That,  owner of this company is very old and has no  clue about Computer.
The programmer took advantage of this and never give them source code......


Good thing  you work there,
You can keep people from taking advantage of him when it comes to compter related issues.


..................ehhhhhhh
nevermind

Jeff it was my Idea and I make them believe, it would work. God knows. Because I personally don't know.


Now that was teasing. :-)
I am just joking around.

vnsharifi

  • Guest
Re: Need Help Urget - will pay.
« Reply #35 on: April 16, 2011, 07:44:58 AM »
I know nothing abut Extension Dictionaries.   But before I start reading about extension
Dictionary, I have a question. Sql is very powerfull and programmer have any control over database, Like sorting, providing different reports,
filtering,searching and lots of other things . Just by a short Sql statement. Now If I store all those extra 80 fields, in Extension Dictionary.
Will I have all those  tools which I have with Sql ?
« Last Edit: April 16, 2011, 07:49:19 AM by vnsharifi »

vnsharifi

  • Guest
Re: Need Help Urget - will pay.
« Reply #36 on: April 16, 2011, 08:05:04 AM »
Thanks Jeff , I translated Your  Code to Vb( Using those Web Tools , I have no Idea about C#) , and code is working.
The hard part is a connection between 2 objects. I am just struggle to find a way to link 2 different objects on drawing.
How would it be possible? something similar to group command in autocad.
But we need some common  Identification for all objects inside the group.  What is that Identifiation?
I thought maybe a uniqe group name will help. Like when user change something. program looks to find what group it belongs to ?
This is  basic thing I am thinking. Any idea ?


Below is Jeff code in Vb. This would be one of my Function in Future Program for sure.
==============================

Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Module JeffCode1
    <CommandMethod("DynamicBlocksThingy")> _
    Public Sub DynamicBlocksThingy()
        Dim doc As Document = Application.DocumentManager.MdiActiveDocument
        Dim db As Database = doc.Database
        Dim ed As Editor = doc.Editor
        Using trx As Transaction = db.TransactionManager.StartTransaction()
            Dim bt As BlockTable = TryCast(db.BlockTableId.GetObject(OpenMode.ForRead), BlockTable)
            For Each objId As ObjectId In bt
                Dim btr As BlockTableRecord = DirectCast(objId.GetObject(OpenMode.ForRead), BlockTableRecord)
                If btr.IsDynamicBlock Then
                    Dim brefObjidColl As ObjectIdCollection = btr.GetBlockReferenceIds(True, True)
                    Dim anonObjIdsColl As ObjectIdCollection = btr.GetAnonymousBlockIds()
                    For Each anonObjId As ObjectId In anonObjIdsColl
                        Dim btrAnon As BlockTableRecord = DirectCast(anonObjId.GetObject(OpenMode.ForRead), BlockTableRecord)
                        Dim ObjidColl As ObjectIdCollection = btrAnon.GetBlockReferenceIds(True, True)
                        For Each Id As ObjectId In ObjidColl
                            brefObjidColl.Add(Id)
                        Next
                    Next
                    For Each brefObjId As ObjectId In brefObjidColl
                        Dim bref As BlockReference = TryCast(brefObjId.GetObject(OpenMode.ForWrite), BlockReference)
                        Dim dynBrefColl As DynamicBlockReferencePropertyCollection = bref.DynamicBlockReferencePropertyCollection
                        For Each dynBrefProps As DynamicBlockReferenceProperty In dynBrefColl
                            If dynBrefProps.PropertyName = "Distance1" Then
                                dynBrefProps.Value = 25.0
                            End If
                        Next
                    Next
                End If
            Next
            trx.Commit()
        End Using
    End Sub
Code: [Select]

Jeff H

  • Needs a day job
  • Posts: 6083
Re: Need Help Urget - will pay.
« Reply #37 on: April 16, 2011, 08:27:53 AM »

vnsharifi

  • Guest
Re: Need Help Urget - will pay.
« Reply #38 on: April 16, 2011, 09:16:32 AM »
Here is a 4 part seris that might give you some ideas or help
[/quote]

Thanks Jeff, I started to translate them  to vb. I believe that is what I want.

vnsharifi

  • Guest
Re: Need Help Urget - will pay.
« Reply #39 on: April 16, 2011, 09:21:54 AM »

GentleMen.
My intention  was to export ObjectID to an Access file upon creation any new objects in Autocad.
Now after file beeing close and reopen again , ObjectIds doesn't stay the same.
Now How would I find that Object in Access file?
What other permanent  unique number I could use to make a  link between objects in atuocad and objects outside of autocad ( Like Acess)?


Lee Mac

  • Seagull
  • Posts: 12411
  • London, England
Re: Need Help Urget - will pay.
« Reply #40 on: April 16, 2011, 09:26:29 AM »
What other permanent  unique number I could use to make a  link between objects in atuocad and objects outside of autocad ( Like Acess)?

Object Handle.

vnsharifi

  • Guest
Re: Need Help Urget - will pay.
« Reply #41 on: April 16, 2011, 11:06:46 AM »
What other permanent  unique number I could use to make a  link between objects in atuocad and objects outside of autocad ( Like Acess)?

Object Handle.
Thanks Lee ,

Jeff H

  • Needs a day job
  • Posts: 6083
Re: Need Help Urget - will pay.
« Reply #42 on: April 16, 2011, 11:29:21 AM »
Object Handles are not unique across different drawings.

Although what good is a handle if you do not know what drawing the object for the handle is in. So with drawing info & handle you can store it uniquley

fixo

  • Guest
Re: Need Help Urget - will pay.
« Reply #43 on: April 16, 2011, 12:23:12 PM »
From docs

Work with ObjectIds
 
 
 
Each object contained with in the Database object is assigned several unique ids. The unique ways you can access objects are:

Entity handle
ObjectId
Instance pointer
The most common method is to access an object by its Object Id. Object Ids work well if your projects utilize both COM interop and the managed .NET API. If you create custom AutoLISP functions, you may need to work with entity handles.

Handles are persistent between AutoCAD sessions, so they are the best way of accessing objects if you need to export drawing information to an external file which might later need to be used to update the drawing. The ObjectId of an object in a database exists only while the database is loaded into memory. Once the database is closed, the Object Ids assigned to an object no longer exist and maybe different the next time the database is opened.

vnsharifi

  • Guest
Re: Need Help Urget - will pay.
« Reply #44 on: April 16, 2011, 03:09:24 PM »
Thanks Fixo.
I am really glas so many people trying to help me here.
I decided to work with handle. Because when I close drawing and reopen it again. handles stage the same.