Saturday, November 27, 2004

ADT: Restrict access to PSDs

Do you need to restrict the access to PSD's (Property Set Definition) in ADT? With the hidden command AecPropertySetAccess you can make a PSD visible or hidden, writeable or read only.

ADT: Restrict access to PSD's

Do you need to restrict the access to PSD's (Property Set Definition) in ADT? With the hidden command AecPropertySetAccess you can make a PSD visible or hidden, writeable or read only.

Friday, November 19, 2004

IE vs Firefox

Here is an interesting interview I've read with a Microsoft Windows Executive about this.
Part 1
Part 2

PS. I'm using Avant Browser with IE 6 SP2 when I write this. I'm quite satisfied with it. I've also started to try Firefox at home. What do you use?

Monday, November 15, 2004

ADT Update Space Tips

Here is a ADT tips how to create a tool on the tool palette to quickly update a space if the boundaries have been changed.
  • Start the CUSTOMIZE command.
  • Select the Commands tab.
  • Select the User defined category.
  • Drag and drop the User Defined Button to the palette.
  • Close the Customize dialog box.
  • Right click on the new tool and select properties.
  • As Command string enter: ^C^C(command "SPACEAUTOGENERATE" "UP" (setq p (getpoint)) p "" "")
Now all you have to do to update the space is to click on the tool and then click on the space.

DWF Composer SP1 released

DWF Composer has been around for a while and now the first service pack is released. One for DWF Composer and another one for DWG Viewer.

Thursday, November 11, 2004

Pedit on steroids

I've updated this lisp that is useful if you want to quickly join lines, arcs and polylines into a polyline including a fuzz distance.

http://www.jtbworld.com/lisp/pljoinfuzz.htm

Technorati:

Friday, November 5, 2004

Create a data link file (UDL) using code

Have you ever wondered how create a data link file (UDL) using code? Here is a sample using VB.NET:
Private Sub CreateUDL()
  Dim sStr As String
  Dim bStr() As Byte

  FileOpen(1, "c:\temp.udl", OpenMode.Binary, OpenAccess.Write)

  FilePut(1, CByte(&HFFS), 1)
  FilePut(1, CByte(&HFES), 2)

  sStr = "[oledb]" & vbCrLf
  bStr = System.Text.UnicodeEncoding.Unicode.GetBytes(sStr)
  FilePut(1, bStr)

  sStr = "; Everything after this line is an OLE DB initstring" & vbCrLf
  bStr = System.Text.UnicodeEncoding.Unicode.GetBytes(sStr)
  FilePut(1, bStr)

  ' Access Database
  ' sStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
  '        "C:\accessDB.mdb;Persist Security Info=False"

  ' SQL Server connection
  ' sStr = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" & _
           "Persist Security Info=False;" & _
           "Initial Catalog=GB1114;Data Source=EMTNT15"

  ' ODBC data
  sStr = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=GB1114"
  bStr = System.Text.UnicodeEncoding.Unicode.GetBytes(sStr)
  FilePut(1, bStr)

  FileClose(1)
End Sub
Here is one using VB or VBA:
' Sample that shows how to create a data link file (UDL) using VB or VBA.
Sub Main()
    Dim bStr() As Byte

    Open "c:\temp.udl" For Binary Access Write As 1

    Put #1, 1, CByte(&HFF)
    Put #1, 2, CByte(&HFE)

    bStr = "[oledb]" & vbCrLf
    Put #1, , bStr

    bStr = "; Everything after this line is an OLE DB initstring" & vbCrLf
    Put #1, , bStr

    ' Access Database
    ' bStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\accessDB.mdb;" & _
             "Persist Security Info=False"

    ' SQL Server connection
    ' bStr = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" & _
             "Persist Security Info=False;" & _
             "Initial Catalog=GB1114;Data Source=EMTNT15"

    ' ODBC data
    bStr = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=GB1114"
    Put #1, , bStr

    Close #1
End Sub

Technorati: , ,

Welcome to my blog

I will cover things I hope you will find interesting like code samples, tips & trix, news and other stuff related to CAD, engineering, software development and more.

If you want to subscribe using a RSS Aggregator use this: http://jtbworld.blogspot.com/atom.xml

Best regards Jimmy Bergmark www.jtbworld.com


Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner