Hi,
I am trying to incorporate some custom lines I have created in AutoCAD into my drawing. When the form loads I call the following pieces of code to pre-load the linetypes:
' Load Standard Linetypes Into Drawing.
Dim StyleFile As String
StyleFile = StartPath & "\Standard.lin"
StyleFile = StyleFile.Replace("\\", "\")
DrawingForm.cAvax1.LoadLineStyles(StyleFile)
' Load ACAD Linetypes Into Drawing.
StyleFile = StartPath & "\ACAD.lin"
StyleFile = StyleFile.Replace("\\", "\")
DrawingForm.cAvax1.LoadACADLineStyles(StyleFile)
The problem I am having is that the Standard lines are loaded but not the AutoCAD lines. Calling the function below has TheLineIndex as 0, meaning the Linestyle ws not found?
Dim TheLineStyleName As String = ""
Dim TheLineIndex As Integer = 0
' Locate Linestyle Index By Name.
TheLineStyleName = Trim(LayerProperties(CurrentLayerID.SelectedIndex, 1))
TheLineIndex = DrawingForm.cAvax1.LineStyleIndexByName(TheLineStyleName)
Can you help me out on this? I am not sure if calling LoadACADLineStyles automatically places the ACAD Linestyles in my drawing (if so why does my code not work) or if I need to loop through each Linestyle in the ACAD.LIn file and add it to my drawing similar to the exmple you have provided:
Dim sStyleFile As String
Dim sStyleName As String
Dim sLineStyleString As String
sStyleFile = App.Path & "\acad1.lin"
sStyleName = "PHANTOMX2"
sLineStyleString = cAvax1.CreateACADLineStyleString(sStyleFile, sStyleName)
Call cAvax1.SetLineStyle(iStyle, sLineStyleString)
Thanks,
Terry
Page 1 of 1
ACAD Linestyles
#2 Guest_Terry_*
Posted 21 June 2005 - 03:52 PM
An added note, calling GetLineStyleNames does produces all of the ACAD linestyles, but none of the Standard linestyles show up in the list.
Also, the AutoCAD linestyle types ";; Linetypes using line patterns" are loaded but the AutoCAD linestyle types ";; Linetypes using text and shape patterns" do not get loaded. Is there any chance that these linestyles can be accomodated?
Shown below are partial examples of the two AutoCAD linestyles n I am trying to use:
;; Linetypes using line patterns
*LOT,---------- - ---------- - ---------- - ---------
A,0.03,-0.002,0.002,-0.002
*DEED,----- ----- ----- ----- ----- ----- ----- -----
A,0.02,-0.003
*DASH,---------- ---------- ---------- ----------
A,0.15,-0.050
;; Linetypes using text and shape patterns
*FENCE_X,---- x ---- x ---- x ---- x ---- x ---- x ----
A,0.014,-0.00000001,["x",LTYPE,S=0.00138750,R=0.0,X=-0.000363,Y=-0.000463],-0.00000001
*GAS_G,---- G ---- G ---- G ---- G ---- G ---- G ----
A,0.026,-0.002,["G",LTYPE,S=0.00138750,R=0.0,X=-0.000496,Y=-0.000694],-0.002
*WATER_W,---- W ---- W ---- W ---- W ---- W ---- W ----
A,0.026,-0.002,["W",LTYPE,S=0.00138750,R=0.0,X=-0.000661,Y=-0.000694],-0.002
Thanks again!
Also, the AutoCAD linestyle types ";; Linetypes using line patterns" are loaded but the AutoCAD linestyle types ";; Linetypes using text and shape patterns" do not get loaded. Is there any chance that these linestyles can be accomodated?
Shown below are partial examples of the two AutoCAD linestyles n I am trying to use:
;; Linetypes using line patterns
*LOT,---------- - ---------- - ---------- - ---------
A,0.03,-0.002,0.002,-0.002
*DEED,----- ----- ----- ----- ----- ----- ----- -----
A,0.02,-0.003
*DASH,---------- ---------- ---------- ----------
A,0.15,-0.050
;; Linetypes using text and shape patterns
*FENCE_X,---- x ---- x ---- x ---- x ---- x ---- x ----
A,0.014,-0.00000001,["x",LTYPE,S=0.00138750,R=0.0,X=-0.000363,Y=-0.000463],-0.00000001
*GAS_G,---- G ---- G ---- G ---- G ---- G ---- G ----
A,0.026,-0.002,["G",LTYPE,S=0.00138750,R=0.0,X=-0.000496,Y=-0.000694],-0.002
*WATER_W,---- W ---- W ---- W ---- W ---- W ---- W ----
A,0.026,-0.002,["W",LTYPE,S=0.00138750,R=0.0,X=-0.000661,Y=-0.000694],-0.002
Thanks again!
#4
Posted 22 June 2005 - 11:16 AM
Hi,
AVAX doesn't support Linetypes using text and shape patterns (Complex linetypes). The maximum number of linestyles allowed per drawing is 256 (from 0 to 255, where Linetype 0 is "CONTINUOUS").
Can you please send me by e-mail the ACAD.lin file at gardos@hol.gr?
AVAX doesn't support Linetypes using text and shape patterns (Complex linetypes). The maximum number of linestyles allowed per drawing is 256 (from 0 to 255, where Linetype 0 is "CONTINUOUS").
Can you please send me by e-mail the ACAD.lin file at gardos@hol.gr?
Athanasios Gardos
Avax-Software.com
Avax-Software.com
Page 1 of 1
Sign In
Register
Help
Add Reply
MultiQuote